Motivation
RDF (Resource Descrition Framework) is a W3C Recommendation for structuring data over the Web, using the Web itself. Web resources or just simply data can be represented and described as a set of resources having properties with some specific property values; properties and property values can be resources themself. A RDF description expresses a statement (or triple) as a subject having a value via a predicate. Subjects and predicates are resources; values can either be literals (scalars) or resources. A model represents a set of statements about certain resources with some characteristics, attributes or relationships. Primitive data elements can be structured together using containers of resources or literals. A description of another description is obtained using the reification construct which model a statement as yet another resource of which other statements can be made about. Meaning is RDF is expressed through reference to a schema via a namespace; a RDF Schema specifies the mechanisms needed to define vocabulary elements, to define the classes of resources they may be used with, to restrict possible combinations of classes and relationships, and to detect violations of those restrictions. All basic RDF constructs can be described using RDF self e.g. resources, properties, statements, classes, containers and so on.
Application development require well-defined software API and tools that allow to manage RDF models and constructs in a easy and straightforward way. Several different approaches has been undertaken by the user community trying to provide an omogeneous and intuitive interface over the RDF data model. Two main approaches has been recognised: model or statement centric and resource centric. The former uses the RDF model as the main concept to structure and manage information; a model is seen as a set of statements. Add, remove, find/query, count triples primitives together with set operations on models (union, difference, intersection) are available to the application developer. The latter approach allows to manipulate an RDF model in terms of resources with properties. Add, remove, set property methods are available to the user to interact with the undelying model.
There are different advantages and benefits in favour of one approach or the other by neither of the two is still being preferred; an hybrid approach is probably most more valuable for future API development.
RDFStore is a pure Perl implementation of a model centric API over RDF constrcuts. It inherits most of its class definitions from the Draft Java API from the Stanford University DataBase Group by Sergey Melnik and from the RADIX proposal by Ron Daniel.
API overview
Packages overview
Here are the packages and methods as defined in the latest RDFStore snapshot.
Package | Generalisation | Interface signature | See also |
---|---|---|---|
RDFStore::Stanford::RDFNode | getLabel() | org.w3c.rdf.model.RDFNode | |
RDFStore::Stanford::Literal | RDFStore::Stanford::RDFNode | org.w3c.rdf.model.Literal | |
RDFStore::Stanford::Resource | RDFStore::Stanford::RDFNode | getURI() getNamespace() getLocalName() |
org.w3c.rdf.model.Resource |
RDFStore::Stanford::Statement | RDFStore::Stanford::Resource | subject() predicate() object() |
org.w3c.rdf.model.Statement |
RDFStore::Stanford::NodeFactory | createResource() createLiteral() createStatement() createUniqueResource() createOrdinal() |
org.w3c.rdf.model.NodeFactory | |
RDFStore::Stanford::Model | RDFStore::Stanford::Resource | setSourceURI() getSourceURI() size() isEmpty() elements() contains() add() remove() isMutable() find() duplicate() create() getNodeFactory() |
org.w3c.rdf.model.Model |
RDFStore::Stanford::SetModel | RDFStore::Stanford::Model | intersect() subtract() unite() |
org.w3c.rdf.model.SetModel |
RDFStore::Stanford::VirtualModel | RDFStore::Stanford::Model | getGroundModel() |
org.w3c.rdf.model.VirtualModel |
RDFStore::Stanford::Vocabulary::Generator | createVocabulary() |
edu.stanford.db.rdf.vocabulary.Generator |
|
RDFStore::Stanford::Digest | getDigestAlgorithm() getDigestBytes() |
org.w3c.rdf.digest.Digest |
|
RDFStore::Stanford::Digest::Abstract | RDFStore::Stanford::Digest | hashCode() equals() toString() |
|
RDFStore::Stanford::Digest::Generic | RDFStore::Stanford::Digest::Abstract | getDigestAlgorithm() | |
RDFStore::Stanford::Digest::SHA1 | RDFStore::Stanford::Digest::Abstract | getDigestAlgorithm() | |
RDFStore::Stanford::Digest::MD5 | RDFStore::Stanford::Digest::Abstract | getDigestAlgorithm() | |
RDFStore::Stanford::Digest::Util | computeDigest() createFromBytes() getHashCode() digestBytes2HashCode() xor() equal() toHexString() |
org.w3c.rdf.digest.DigestUtil |
|
RDFStore::Stanford::Digest::Digestable | getDigest() |
org.w3c.rdf.digest.Digestable |
|
RDFStore::RDFNode | RDFStore::Stanford::RDFNode RDFStore::Stanford::Digest::Digestable |
getLabel() getDigest() hashCode() toString() equals() |
edu.stanford.db.rdf.model.i.RDFNodeImpl |
RDFStore::Literal | RDFStore::Stanford::Literal RDFStore::RDFNode |
getContent() getLabel() getURI() equals() |
edu.stanford.db.rdf.model.i.LiteralImpl |
RDFStore::Resource | RDFStore::Stanford::Resource RDFStore::RDFNode |
getLabel() getURI() getNamespace() getLocalName() getLabel() equals() |
edu.stanford.db.rdf.model.i.ResourceImpl |
RDFStore::Statement | RDFStore::Stanford::Statement RDFStore::Resource |
subject() predicate() object() node2string() toString() getNamespace() getLocalName() getLabel() getURI() hashCode() getDigest() equals() |
edu.stanford.db.rdf.model.i.StatementImpl |
RDFStore::NodeFactory | RDFStore::Stanford::NodeFactory | createResource() createLiteral() createStatement() createUniqueResource() createOrdinal() |
edu.stanford.db.rdf.model.i.NodeFactoryImpl |
RDFStore::Model | RDFStore::Stanford::Model RDFStore::Resource RDFStore::Stanford::Digest RDFStore::Stanford::Digest::Digestable |
getOptions() getNamespace() getLocalName() toString() setSourceURI() getSourceURI() size() isEmpty() elements() contains() add() remove() isMutable() find() duplicate() create() getNodeFactory() getLabel() getDigest() getURI() getDigestAlgorithm() getDigestBytes() toStrawmanRDF() |
edu.stanford.db.rdf.model.i.ModelImpl |
RDFStore::Stanford::SetModel | RDFStore::Stanford::SetModel RDFStore::Model |
intersect() subtract() unite() |
|
RDFStore::VirtualModel | RDFStore::Stanford::VirtualModel RDFStore::Model |
getGroundModel() |
|
RDFStore::SchemaModel | RDFStore::VirtualModel | getNamespace() getLocalName() getLabel() getURI() getGroundModel() setSourceURI() getSourceURI() size() isEmpty() elements() contains() add() remove() isMutable() find() duplicate() create() getNodeFactory() toString() computeRDFSClosure() computeClosure() validateRawSchema() validate() |
edu.stanford.db.rdf.schema.RDFSchemaModel |
RDFStore::Vocabulary::RDF | $RDF::Description, $RDF::parseType, $RDF::about, $RDF::resource, $RDF::aboutEach, $RDF::aboutEachPrefix, $RDF::ID, $RDF::Statement, $RDF::Alt, $RDF::object, $RDF::subject, $RDF::value, $RDF::predicate, $RDF::Property, $RDF::Seq, $RDF::type, $RDF::Bag | Resource Description Framework (RDF) Model and Syntax Specification | |
RDFStore::Vocabulary::RDFS | $RDFS::Class, $RDFS::Container, $RDFS::subClassOf, $RDFS::isDefinedBy, $RDFS::seeAlso, $RDFS::comment, $RDFS::Resource, $RDFS::Literal, $RDFS::label, $RDFS::domain, $RDFS::ConstraintResource, $RDFS::range, $RDFS::ConstraintProperty, $RDFS::subPropertyOf | Resource Description Framework (RDF) Schema Specification 1.0 | |
RDFStore::Vocabulary::DC | $DC::contributor, $DC::description, $DC::creator, $DC::date, $DC::coverage, $DC::rights, $DC::subject, $DC::title, $DC::type, $DC::source, $DC::relation, $DC::language, $DC::format, $DC::identifier, $DC::publisher | DC Element Set | |
RDFStore::Vocabulary::DCQ | (all dcq classes and properties) | DC Qualifiers | |
RDFStore::Vocabulary::DAML | (all daml classes and properties) | DARPA Agent Markup Language (DAML) | |
RDFStore::Parser::SiRPAC | setHandlers() setSource() parse_start() parse() parsestring() parsefile() |
org.w3c.rdf.implementation.syntax.sirpac.SiRPAC | |
RDFStore::Parser::OpenHealth | setHandlers() parse_start() parse() parsestring() parsefile() |
Extracting and reifying RDF from XML | |
RDFStore::Parser::Styles::MagicTie | Init() Final() Assert() Start_XML_Literal() Stop_XML_Literal() Char_Literal() |
||
Data::MagicTie | TIEHASH() TIEARRAY() get_Options() set_parent() get_parent() reset_parent() FETCHSIZE() FETCH() EXISTS() FIRSTKEY() NEXTKEY() find_dup() get_dup() copyOnWrite() sync() STORESIZE() del_dup() STORE() inc() DELETE() CLEAR() |
Perl TIE interface over local and remote Berkeley DB files containing BLOBs |
Summary of Recent Discussions about an Application Programming Interface for RDF
The RADIX proposal by Ron Daniel
Jena: Implementing the RDF Model and Syntax Specification
The Design and Implementation of the Redland RDF Application Framework
Web Resource Application Framework (WRAF)
Storing RDF in relational databases
Redland Notes - RDF and RDF Schema Concepts
A Proposed Interpretation of RDF Containers
RDF API in perl convergence
UUIDs and GUIDs