Difference between revisions of "Module:Metabolite"

From DAAP
Jump to navigation Jump to search
(Created page with "local p = {} function p.infobox(f) local capiunto = require 'capiunto' local linkedwiki = require 'linkedwiki' local endpointUpsud = 'http://opendata1.opendata...")
 
Line 22: Line 22:
 
bottom = linkedwiki.checkExternLink('Website',rdfs..'seeAlso',f.args.Website)
 
bottom = linkedwiki.checkExternLink('Website',rdfs..'seeAlso',f.args.Website)
 
} )
 
} )
:addRow('Contact', linkedwiki.checkUser(daapProp..'contact',f.args.Contact))
+
 
:addRow('Signature', linkedwiki.checkString(daapProp..'signature',f.args.Signature))
+
 
 +
 
 +
:addRow('Abbreviation', linkedwiki.checkUser(daapProp..'abbreviationMetabolite',f.args.abbreviationMetabolite))
 +
:addRow('casRegistryNumberMetabolite', linkedwiki.checkString(daapProp..'casRegistryNumberMetabolite',f.args.casRegistryNumberMetabolite))
 +
:addRow('casRegistryNumberMetabolite', linkedwiki.checkString(daapProp..'casRegistryNumberMetabolite',f.args.casRegistryNumberMetabolite))
 +
:addRow('chemicalFormula', linkedwiki.checkString(daapProp..'chemicalFormula',f.args.RegistrychemicalFormula))
 +
:addRow('commentary', linkedwiki.checkString(daapProp..'commentary',f.args.casRegistryNumberMetabolite) )
 +
:addRow('iupacMatabolite', linkedwiki.checkString(daapProp..'iupacMatabolite',f.args.casRegistryNumberMetabolite))
 +
:addRow('keggMetabolite', linkedwiki.checkString(daapProp..'keggMetabolite',f.args.casRegistryNumberMetabolite) )
 +
:addRow('casRegistryNumberMetabolite', linkedwiki.checkString(daapProp..'casRegistryNumberMetabolite',f.args.casRegistryNumberMetabolite))
 +
:addRow('molarMass', linkedwiki.checkString(daapProp..'molarMass',f.args.casRegistryNumberMetabolite))
 +
:addRow('otherName', linkedwiki.checkString(daapProp..'otherName',f.args.casRegistryNumberMetabolite))
 
:addWikitext( linkedwiki.getMaintenanceCategory() .. "[[Category:Metabolite]]" )
 
:addWikitext( linkedwiki.getMaintenanceCategory() .. "[[Category:Metabolite]]" )
 
end
 
end
 
   
 
   
 
return p
 
return p

Revision as of 14:43, 12 November 2015

Documentation for this module may be created at Module:Metabolite/doc

local p = {}
 
function p.infobox(f)
    local capiunto = require 'capiunto'
    local linkedwiki = require 'linkedwiki'
    
	local endpointUpsud = 'http://opendata1.opendata.u-psud.fr/sparql'
	
   local rdfs = 'http://www.w3.org/2000/01/rdf-schema#'
   local daapProp = 'http://daap.eu/wiki/Property:'
   local geo = 'http://www.w3.org/2003/01/geo/wgs84_pos#'
   local vcard = 'http://www.w3.org/2006/vcard/ns#'
   
   linkedwiki.setEndpoint(endpointUpsud)
   linkedwiki.setSubject(linkedwiki.getCurrentIRI())
   
	return capiunto.create( {
	    -- bodyStyle = 'border: 15px solid red',
		title =  linkedwiki.checkLink(linkedwiki.getCurrentIRI(), rdfs..'label',f.args.Title)  ,
        top = 'Metabolite',
		topStyle = 'background:#cfc;font-size:larger',		
		bottom = linkedwiki.checkExternLink('Website',rdfs..'seeAlso',f.args.Website)
	} )



	:addRow('Abbreviation', linkedwiki.checkUser(daapProp..'abbreviationMetabolite',f.args.abbreviationMetabolite))
	:addRow('casRegistryNumberMetabolite', linkedwiki.checkString(daapProp..'casRegistryNumberMetabolite',f.args.casRegistryNumberMetabolite))
	:addRow('casRegistryNumberMetabolite', linkedwiki.checkString(daapProp..'casRegistryNumberMetabolite',f.args.casRegistryNumberMetabolite))	
	:addRow('chemicalFormula', linkedwiki.checkString(daapProp..'chemicalFormula',f.args.RegistrychemicalFormula))	
	:addRow('commentary', linkedwiki.checkString(daapProp..'commentary',f.args.casRegistryNumberMetabolite)	)
	:addRow('iupacMatabolite', linkedwiki.checkString(daapProp..'iupacMatabolite',f.args.casRegistryNumberMetabolite))	
	:addRow('keggMetabolite', linkedwiki.checkString(daapProp..'keggMetabolite',f.args.casRegistryNumberMetabolite)	)
	:addRow('casRegistryNumberMetabolite', linkedwiki.checkString(daapProp..'casRegistryNumberMetabolite',f.args.casRegistryNumberMetabolite))	
	:addRow('molarMass', linkedwiki.checkString(daapProp..'molarMass',f.args.casRegistryNumberMetabolite))	
	:addRow('otherName', linkedwiki.checkString(daapProp..'otherName',f.args.casRegistryNumberMetabolite))	
	:addWikitext( linkedwiki.getMaintenanceCategory() .. "[[Category:Metabolite]]" )
end
 
return p