Package | ISA | Members, Methods, Notes |
RDF::Literal |
| |
RDF::Resource |
| |
RDF::Property | RDF::Resource |
Note: See Below |
RDF::Statement |
| |
RDF::Bag | RDF::Resource |
|
RDF::Sequence | RDF::Resource |
|
RDF::Alternative | RDF::Resource |
|
Comments: For Literal, Resource, Property and Statement, an instance is a member of the respective set. For Bag, Sequence and Alternative, an instance is a member of Resource, of the respective container type. Bag, Sequence and Alternative are expected to maintain ordered collections of Resources and/or Literals. |
Bundle API Extension:
See the Bundle Spec
Package | ISA | Members, Methods, Notes |
RDF::Bundle |
|
Other Possible API Extensions:
Package | ISA | Members, Methods, Notes |
RDF::LiteralCollection | ||
RDF::ResourceCollection | ||
RDF::PropertyCollection | ||
RDF::StatementCollection | ||
RDF::Storage::* | For various storage implementations. | |
RDF::Parser::* | For parsers. | |
RDF::Agent::* (RDF::Peer::*) (RDF::Query::*) | For Peer 2 Peer operations. Could be equivilant to, or basis for, SemWeb::UserAgent. | |
RDF::Namespace | For the rdf and rdfs namespaces and their properties, classes etc. | |
RDF::Namespace::* | For other namespaces and their properties, classes etc. | |
RDF::Namespace::Map | For namespace prefix <-> namespace URI mapping.
| |
RDF::Digest::* | For hashing functionality. |
Comments:
Reified Statement URIs:
The URI for a reified statement resource must be unique. This isn't a
problem, however, as every statement is unique. These URIs will match
the pattern /^urn:x-rdf:statement:[\dA-Fa-f]{40}$/.
The use of the namespace ID "x-rdf" signifies that this scheme
is experimental. This use is consistent with RFC 2611 [1].
The section after the
last colon will be a hex representation of the "statement digest". The statement digest
will be constructed as follows:
If the object is a Resource, a string consisting of the object's SHA-1 digest followed by the string "res" will be concatenated onto the end of the string resulting from step 1.
Reified Bundle URIs:
???
Type Safety:
How type safe should the API be?
Since we're working in Perl, we'd like to
be as forgiving as possible. Ideally, methods that are expecting a Resource
will accept an RDF::Resource, a URI or a scalar. For Subjects, it's pretty
simple, because it's always a uri at heart. For Properties and Objects,
though, the situation becomes a little stickier. Every Property has a
namespace with which it is associated. RDF::Property keeps track of the
Property name and it's namespaces, but a plain scalar doesn't. And there
currently is no agreement on how names and their namespaces are
delineated. So if a scalar is passed into a method in place of an
RDF::Property, the API has no way of knowing where the namespace ends and
the name begins. With Objects, a scalar should imply a Literal, but problems
could arise if people pass scalar uris that end up being interpreted as
Literals.
Properties:
A Property will have a namespace and a URI. The namespace need not be a
URI and neither need be retrievable.
The Property constructor will take two arguments. The first will be the
namespace. The second, if it is a URI object or URI string, will be considered
the complete URI of the Property. If the second argument is not a URI, then
the URI will be formed by concatenating the name (second argument) onto
the namespace. If the resulting string is still not a URI, then it will
be an error and the constructor will return undef.
The namespace() method will simply get/set the Property's namespace.
The uri() method with no parameters will return the Property's URI.
With a parameter, it will set the URI of the Property following the
same algorithm as the constructor.
Devon Smith (smithde)(at)(oclc dot org) Online Computer Library Center (http://www.oclc.org) Created: 2001-05-31 |