LS::RDF::SimpleDocument - Simple RDF Document object


lsid-perl documentation  | view source Contained in the lsid-perl distribution.

Index


NAME

Top

LS::RDF::SimpleDocument - Simple RDF Document object

SYNOPSIS

Top

 my $rdfDoc = LS::RDF::SimpleDocument->new();

 $rdfDoc->addTripleLiteral($lsid->as_string(), 
 			   'http://purl.org/dc/elements/1.1/#title', 
 			   $approved_gene_name);

 $rdfDoc->addTripleResource($lsid->as_string(), 
 			    'urn:lsid:myauthority.org:predicates:external_link', 
			    'urn:lsid:ncbi.nlm.nih.gov.lsid.i3c.org:pubmed:' . lc($pmid1ID));

 print '<?xml version="1.0"?>' . "\n" . $rdfDoc->output();

DESCRIPTION

Top

This class provides a simple interface to create RDF documents.

METHODS

Top

addTripleResource ( $subject, $predicate, $object )

Adds an RDF triple which contains a resource as its object.

addTripleLiteral ( $subject, $predicate, $object )

Adds an RDF triple which contains a literal as its object.

output ( )

Returns the RDF represented by this object as text.

COPYRIGHT

Top


lsid-perl documentation  | view source Contained in the lsid-perl distribution.