ODO::Statement - Encapsulation of an RDF triple for graphs
use ODO::Node; use ODO::Statement;
my $s = ODO::Node::Resource->new('urn:lsid:testuri.org:ns:object:');
my $p = ODO::Node::Resource->new('http://testuri.org/predicate');
my $o = ODO::Node::Literal->new('literal');
my $statement_1 = ODO::Statement->new($s, $p, $o);
# or
my $statement_2 = ODO::Statement->new(s=> $s, p=> $p, o=> $o);
# and then..
if($statement_1->equals($statement_2)) {
print "\$statement_1 == \$statement_2\n";
}
else {
print "The statements are not equal\n";
}
A simple container that encapsulates a single RDF statement. This object also provides tests for equality.
ODO::Statement::Virtual - Encapsulation of an virtual RDF triple pattern.
my $s = ODO::Node::Resource->new('urn:lsid:testuri.org:ns:object:');
my $p = ODO::Node::Resource->new('http://testuri.org/predicate');
my $o = ODO::Node::Literal->new('literal');
my $virtual_1 = ODO::Statement::Virtual->new($s, $p, $o);
my $virtual_2 = ODO::Statement::Virtual->new(s=> $s, p=> $p, o=> $o);
if($statement_1->equals($statement_2)) {
print "\$statement_1 == \$statement_2\n";
}
else {
print "The statements are not equal\n";
}
These objects are used in the presences of a reasoner to create statements that have been inferred in order to differentiate them from statements that are actually 'in' the graph.
the ODO::Node manpage, the ODO::Graph manpage, the ODO::Query::Simple manpage, the ODO::Statement::Group manpage
Copyright (c) 2004-2006 IBM Corporation.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
=cut
1;
__END__