Module:Analyte

From DAAP
Revision as of 16:41, 12 November 2015 by Valerie cantonny (talk | contribs)
Jump to navigation Jump to search

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('nomAnalyte', linkedwiki.checkUser(daapProp..'abbreviationMetabolite',f.args.abbreviationMetabolite))
	:addRow('formule_bruteAnalyte', linkedwiki.checkString(daapProp..'casRegistryNumberMetabolite',f.args.casRegistryNumberMetabolite))
	:addRow('casAnalyte', linkedwiki.checkString(daapProp..'chemicalFormula',f.args.RegistrychemicalFormula))	
	:addRow('masse_molaireAnalyte', linkedwiki.checkString(daapProp..'commentary',f.args.casRegistryNumberMetabolite)	)
	:addRow('masse_monoisotopiqueAnalyte', linkedwiki.checkString(daapProp..'iupacMatabolite',f.args.casRegistryNumberMetabolite))	
	:addRow('abreviationAnalyte', linkedwiki.checkString(daapProp..'keggMetabolite',f.args.casRegistryNumberMetabolite)	)
	:addRow('spectreAnalyte', linkedwiki.checkString(daapProp..'casRegistryNumberMetabolite',f.args.casRegistryNumberMetabolite))	
	:addRow('defaut_quant_massAnalyte', linkedwiki.checkString(daapProp..'molarMass',f.args.casRegistryNumberMetabolite))	
	:addRow('indice_retentionAnalyte', linkedwiki.checkString(daapProp..'otherName',f.args.casRegistryNumberMetabolite))
	:addRow('isotopologueAnalyte', linkedwiki.checkString(daapProp..'otherName',f.args.casRegistryNumberMetabolite))
	:addRow('commentaireAnalyte', linkedwiki.checkString(daapProp..'otherName',f.args.casRegistryNumberMetabolite))
	:addRow('nom_module_referenceAnalyte', linkedwiki.checkString(daapProp..'otherName',f.args.casRegistryNumberMetabolite))
	:addRow('modeAnalyte', linkedwiki.checkString(daapProp..'otherName',f.args.casRegistryNumberMetabolite))
	:addRow('temps_retentionAnalyte', linkedwiki.checkString(daapProp..'otherName',f.args.casRegistryNumberMetabolite))
	:addWikitext( linkedwiki.getMaintenanceCategory() .. "[[Category:Metabolite]]" )
end
 
return p