Module:Analyte
Revision as of 14:50, 12 November 2015 by Valerie cantonny (talk | contribs) (Created page with "local p = {} function p.infobox(f) local capiunto = require 'capiunto' local linkedwiki = require 'linkedwiki' local endpointUpsud = 'http://opendata1.opendata...")
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('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