The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PLUTO - Son of ODO -> Ontologies, Databases and, Optimization

SYNOPSIS

 use ODO::Parser::XML;
 use ODO::Graph::Simple;

 print "Parsing RDF/XML file: 'some/path/to/data.rdfxml'\n"n
 my $statements = ODO::Parser::XML->parse_file('some/path/to/data.rdfxml');

 print "Creating in memory graph named: 'http://testuri.org/graphs/#name1'\n";
 my $graph = ODO::Graph::Simple->Memory(name=> 'http://testuri.org/graphs/#name1');

 print "Adding parsed statements to the graph\n";
 $graph->add($statements);

 print 'The graph contains ', $graph->size(), " statements\n";

 # or $graph->add(@{ $statements }); if you are just adding a couple statements
 # and then...

 print "Querying for all statements in the graph\n";
 my $result_set = $graph->query($ODO::Query::Simple::ALL_STATEMENTS);
 my $result_statements = $result_set->results();

 print "Removing statements found in previous query from the graph\n";
 $graph->remove($result_statements);

 print "The graph's size should be 0. Its size is: ", $graph->size(), "\n";

DESCRIPTION

PLUTO is a repackaged version of ODO. ODO is a framework for processing RDF data.

CAVEATS

This package contains relatively experimental code and should be treated appropriately.

AUTHOR

IBM Corporation - ODO creators

Edward Kawas - new ODO (a.k.a PLUTO) maintainer

SEE ALSO

ODO::Statement, ODO::Graph, ODO::Graph::Simple, ODO::Parser, ODO::Parser::XML, ODO::Query::Simple, ODO::Exception