RDF::Core::Model - RDF model
use RDF::Core::Model; use RDF::Core::Storage::Memory; use RDF::Core::Statement;
my $storage = new RDF::Core::Storage::Memory; my $model = new RDF::Core::Model (Storage => $storage); my $subject = new RDF::Core::Resource('http://www.gingerall.cz/employees/Jim'); my $predicate = $subject->new('http://www.gingerall.cz/rdfns#name'); my $object = new RDF::Core::Literal('Jim Brown'); my $statement = new RDF::Core::Statement($subject, $predicate, $object);
$model->addStmt($statement);
print "Model contains ".$model->countStmts."statement(s).\n"
Model provides interface to store RDF statements, ask about them and retrieve them back.
new(%options)
setOptions(\%options)
addStmt($statement)
removeStmt($statement)
existsStmt($subject,$predicate,$object)
countStmts($subject,$predicate,$object)
getStmts($subject,$predicate,$object)
This package is subject to the MPL (or the GPL alternatively).
Ginger Alliance, rdf@gingerall.cz
RDF::Core::Statement, RDF::Core::Storage, RDF::Core::Serializer, RDF::Core::Parser, RDF::Core::Enumerator