Order by reification

The upcoming release of the API [1] will include an experimental
feature: order by reification.

Background: currently there is no standard way of defining ordered
binary relationships in RDF. Ordered binary relationships are required
for building ordered n-ary relationships. I'm modeling order using
reification. Thus, modeling that book B has first author Foo and second
author Bar has the following model:

B --dc:Creator--> Foo
B --dc:Creator--> Bar
(B --dc:Creator--> Foo) --rdf:order--> 1
(B --dc:Creator--> Bar) --rdf:order--> 2

1 and 2 are literals, not ordinal properties of RDF (rdf:_n), although
is doesn't make a big difference, just that you don't need rdf:_n and
the syntax is simpler. rdf:order is not defined in RDF M&S spec, it's an
extension.

This approach is backward compatible, i.e. applications that do not
support order can still determine that both Foo and Bar are authors of
B. This is not the case when defining order using rdf:Seq-based
approaches.

Backward order is also supported, so if you have two parents {A, B} that
have children {P, Q, R}, one can express that B is the second parent of
the third child R as follows:

B --child--> R
(B --child--> R) --rdf:order--> 3
(B --child--> R) --rdf:backwardOrder--> 2

I introduced extensions to SiRPAC and SiRS (serializer) included in the
API. The syntax for ordered relationships looks like the following (book
example above):

<rdf:Description about="B">
  <dc:Creator rdf:order="1">Foo</dc:Creator>
  <dc:Creator rdf:order="2">Bar</dc:Creator>
</rdf:Description>

If the objects are resources (not literals as above), the example can be
written either as:

<rdf:Description about="B">
  <dc:Creator rdf:order="1" rdf:resource="Foo"/>
  <dc:Creator rdf:order="2" rdf:resource="Bar"/>
</rdf:Description>

or also in a less verbose fashion using XML-inherent ordering:

<rdf:Description about="B">
  <dc:Creator>
    <rdf:Description about="Foo"/>
    <rdf:Description about="Bar"/>
  </dc:Creator>
</rdf:Description>

In the last example, the property element <dc:Creator> contains more
than one resource element. If more than one element is found by the
parser (invalid in the current official syntax), assertions about
reified statements are added to the model. Backward order can be
additionally specified as follows:

<rdf:Description about="B">
  <dc:Creator>
    <rdf:Description rdf:backwardOrder="3" about="Foo"/>
    <rdf:Description rdf:backwardOrder="5" about="Bar"/>
  </dc:Creator>
</rdf:Description>

that could mean something like B is the third book written by Foo and
the fifth one authored by Bar.

The API [1] fully supports manipulations with reified statements.

Comments and suggestions are welcome. I'll try to take them into
consideration for the upcoming release.

Sergey

[1] http://www-db.stanford.edu/~melnik/rdf/api.html

Received on Wednesday, 10 May 2000 20:03:01 UTC