
RDFStore::NodeFactory - An RDF node factory implementation

use RDFStore::NodeFactory;
my $factory = new RDFStore::NodeFactory();
my $statement = $factory->createStatement(
$factory->createResource("http://pen.com"),
$factory->createResource("http://purl.org/schema/1.0#author"),
$factory->createLiteral("Peter Pan")
);
my $reified_statement = $factory->createReifiedStatement(
$factory->createResource("http://pen.com"),
$factory->createResource("http://purl.org/schema/1.0#author"),
$factory->createLiteral("Lady Oscar")
);

An RDFStore::NodeFactory implementation using RDFStore::RDFNode, RDFStore::Resource and RDFStore::Literal

This is a class method, the constructor for RDFStore::NodeFactory.
Create a new RDFStore::Resource. If the method is called with a single perl scalar as parameter a new RDF Resource is created with the string passed as indentifier (LOCALNAME); a fully qualified RDF resource can be constructed by invoching the constructor with two paramter s where the former is the NAMESPACE and the latter is the LOCALNAME. By RDF definition we assume that LOCALNAME can not be undefined. If LOCALNAME is a perl reference the new Resource is flagged as anonymous-resource or bNode.
bNodes can also be created using the createbNode or createAnonymousResource methods below
Create a new anonymous RDFStore::Resource like in the createResource method above but the method is setting the RDFStore::Resource(3) internal bNode flag.
Create a new anonymous RDFStore::Resource like in the createResource method above but the method is setting the RDFStore::Resource(3) internal bNode flag.
Create a new RDFStore::Literal. The only parameter passed is either a plain perl scalar (LITERAL) - see RDFStore::Literal(3)
Create a new RDFStore::Statement. SUBJECT and PREDICATE must be two RDFStore::Resource while OBJECT is RDFStore::RDFNode
Creates a new RDFStore::Resource with a unique ID using a random seed.
Creates a new RDFStore::Resource ordinal property (rdf:li, rdf:_N). The only parameter INTEGER is the scalar number to set the property to.

http://www.w3.org/TR/rdf-primer/ http://www.w3.org/TR/rdf-mt http://www.w3.org/TR/rdf-syntax-grammar/ http://www.w3.org/TR/rdf-schema/ http://www.w3.org/TR/1999/REC-rdf-syntax-19990222 (obsolete)

RDFStore::RDFNode(3) RDFStore::Resource(3) RDFStore::Literal(3) RDFStore(3)

Alberto Reggiori <areggiori@webweaving.org>