The Wayback Machine - https://web.archive.org/web/20081208114927/http://uche.ogbuji.net:80/tech/akara/nodes/2003-01-01/scopes
XBEL file of links generated from Akara content
RSS feed

Style

(Cookies required)
Powered by 4Suite

A 4Suite RDF model contains a set of statements. However it is often useful to group statements within the model into certain categories or partitions. Some common reasons for doing so:

  • They all represent a collection of statements deserialized from a single document
  • They all represent closely related statements that are often added, updated and deleted in related processes
  • They all occupy a single conceptual space together that is somehow distinct from the rest of the model

To accommodate such needs, 4Suite RDF models support what are known as "scopes". A scope can represent a single RDF/XML document that is deserialized into the model, or a collection of statements that are associated for one of the other reasons. Most RDF operations: additions, queries, deletions, etc., can be controlled by scope.

To clear up a source of occasional confusion, a scope is functionally quite different from the namespace used in the URI in the XML serialization, and different from the subject, predicate or object of any particular statement, although it may happen to share the same string value.

Each statement in a 4Suite RDF model has a scope as well as a subject, predicate and object. By default, if you parse an RDF document into the model, the scope of all resulting names is the URI given to the parser for that document. For example, 'file:/home/yourname/test/doc.xml'. In the 4Suite repository, it is a URI bearing the 'ftss' scheme and representing the repository path of the document as it is added to the repository. For example, 'ftss:/repo/path/to/doc.xml'. As of the 4Suite 1.0a1 release, there are still some instances where the scope is a path instead of a full ftss URI, but this will be changing by 1.0 final.

If you add an XML document to the repository with s document definition that has RDF mappings, then the resulting RDF statements will be added to the repsository model with scopes that match the path of the original XML document in the repository. This makes it easy for the system to synchronize the XML document contents and the RDF mappings: when the XML document changes, it simply has to update statements with matching scope.

The problems that lead to scopes (also called contexts) are well-known and well hashed-out in the RDF community. Some pointers:


Comments