Module:Analyte

From DAAP
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'
    linkedwiki.setCurrentFrame(mw.getCurrentFrame())
    
   local subject = f.args.iri or linkedwiki.getCurrentIRI();
	
   local rdfs = 'http://www.w3.org/2000/01/rdf-schema#'
   local daapProp = 'http://daap.dsi.universite-paris-saclay.fr/wiki/Property:'
   local geo = 'http://www.w3.org/2003/01/geo/wgs84_pos#'
   local vcard = 'http://www.w3.org/2006/vcard/ns#'

   local object =  linkedwiki.new(subject)
   
	return capiunto.create( {
	    -- bodyStyle = 'border: 15px solid red',
		title =  object:checkLabelOfInternLink(subject, rdfs..'label',f.args.Title)  ,
        top = 'Analyte',
		topStyle = 'background:#cfc;font-size:larger',		
		bottom = object:checkExternLink('Website',rdfs..'seeAlso',f.args.Website)
	} )

	:addRow('nomAnalyte', object:checkUser(daapProp..'nomAnalyte',f.args.abbreviationMetabolite))
	:addRow('chemicalFormulaAnalyte', object:checkString(daapProp..'chemicalFormulaAnalyte',f.args.casRegistryNumberMetabolite))
	:addRow('casAnalyte', object:checkString(daapProp..'casAnalyte',f.args.RegistrychemicalFormula))	
	:addRow('MolarMassAnalyte', object:checkString(daapProp..'MolarMassAnalyte',f.args.casRegistryNumberMetabolite)	)
	:addRow('monoIsotopicMasseAnalyte', object:checkString(daapProp..'monoIsotopicMasseAnalyte',f.args.casRegistryNumberMetabolite))	
	:addRow('abbreviationAnalyte', object:checkString(daapProp..'abbreviationAnalyte',f.args.casRegistryNumberMetabolite)	)
	:addRow('spectralDataAnalyte', object:checkString(daapProp..'spectralDataAnalyte',f.args.casRegistryNumberMetabolite))	
	:addRow('defautQuantMassAnalyte', object:checkString(daapProp..'defautQuantMassAnalyte',f.args.casRegistryNumberMetabolite))	
	:addRow('retentionIndiceAnalyte', object:checkString(daapProp..'retentionIndiceAnalyte',f.args.casRegistryNumberMetabolite))
	:addRow('isotopologueAnalyte', object:checkString(daapProp..'isotopologueAnalyte',f.args.casRegistryNumberMetabolite))
	:addRow('commentaryAnalyte', object:checkString(daapProp..'commentaryAnalyte',f.args.casRegistryNumberMetabolite))
	:addRow('nameInReferenceModuleAnalyte', object:checkString(daapProp..'nameInReferenceModuleAnalyte',f.args.casRegistryNumberMetabolite))
	:addRow('modeAnalyte', object:checkString(daapProp..'modeAnalyte',f.args.casRegistryNumberMetabolite))
	:addRow('retentionTimeAnalyte', object:checkString(daapProp..'retentionTimeAnalyte',f.args.casRegistryNumberMetabolite))
	:addWikitext( object:getMaintenanceCategory() .. "[[Category:Metabolite]]" )
end
 
return p