- From: Ross Judson <ross@ManagedObjects.com>
- Date: Tue, 26 Sep 2000 13:50:25 -0400
- To: <www-rdf-interest@w3.org>
I have been dealing with the enumeration problem as well. I have the
additional complexity of having a great deal of CORBA-based code that I am
moving to an RDF basis. What I've done is something like this:
[s is rdfs, rdf is rdf, f is our product]
<s:Class rdf:about="&f;Enumeration">
<s:subClassOf rdf:resource="&f;Object"/>
<rdf:label>Enumeration</rdf:label>
</s:Class>
and then:
<s:Class rdf:about="&f;RelationKind">
<s:subClassOf rdf:resource="&f;Enumeration"/>
<rdf:label>RelationKind</rdf:label>
</s:Class>
...which defines the enumeration class...i then create instances of the
enumeration like this:
<f:RelationKind rdf:about="&f;RelationKind_relChildren" rdf:label="NAM"
f:ordinal="0" />
<f:RelationKind rdf:about="&f;RelationKind_relToplogy" rdf:label="TOP"
f:ordinal="1" />
...and so forth. I have a precompiler that reads an RDF schema definition
and emits CORBA-like Java stubs for all enumerations, plus a bunch of other
stuff. It is very useful to have URIs that represent enumerated values,
rather than use literals. I expect that something like it will be
standardized at some point in the future, but I couldn't wait (products
don't wait :).
RJ
Received on Tuesday, 26 September 2000 13:51:31 UTC