Difference between revisions of "Module:Analyte"

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 25: Line 25:
  
  
:addRow('Abbreviation', linkedwiki.checkUser(daapProp..'abbreviationMetabolite',f.args.abbreviationMetabolite))
+
:addRow('Truc', 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('casRegistryNumberMetabolite', linkedwiki.checkString(daapProp..'casRegistryNumberMetabolite',f.args.casRegistryNumberMetabolite))
 
:addRow('casRegistryNumberMetabolite', linkedwiki.checkString(daapProp..'casRegistryNumberMetabolite',f.args.casRegistryNumberMetabolite))

Revision as of 16:20, 12 November 2015

Documentation for this module may be created at Module:Analyte/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 = 'Analyte',
		topStyle = 'background:#cfc;font-size:larger',		
		bottom = linkedwiki.checkExternLink('Website',rdfs..'seeAlso',f.args.Website)
	} )



	:addRow('Truc', 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