Re: Enumeration in RDF?

While studying the possibility to type containers I have investigated many
approaches
(not always correct). Finally, I think I have found a really complete
solution for typing containers, but it is too much complex. I think the most
suitable approach remains the definition of customized vocabulary semantics.
Below I propose to your attention the solution that I found (but that I
discarded). It is an ontology that allows (ops ... should allow) to strictly
constrain a container to have a specific number of members of a specific
type.


Best Regards,
Francesco Cannistrà

---------
---------

<owl:Class rdf:ID="ContainerMembershipStatement">
  <rdfs:subClassOf rdf:resource="&rdf-ns;Statement"/>
  <owl:intersectionOf rdf:parseType="Collection">
    <rdf:Description rdf:about="&rdf-ns;Statement"/>
    <owl:Restriction>
      <owl:onProperty rdf:resource="&rdf-ns;predicate"/>
      <owl:allValuesFrom
rdf:resource="&rdfs-ns;ContainerMembershipProperty"/>
    </owl:Restriction>
    <owl:Restriction>
      <owl:onProperty rdf:resource="&rdf-ns;subject"/>
      <owl:allValuesFrom rdf:resource="&rdf-ns;Container"/>
    </owl:Restriction>
  </owl:intersectionOf>
</owl:Class>

<owl:Class rdf:ID="MyTypedContainerMembershipStatement">
  <rdfs:subClassOf rdf:resource="#ContainerMembershipStatement"/>
  <owl:intersectionOf rdf:parseType="Collection">
    <rdf:Description rdf:about="#ContainerMembershipStatement"/>
    <owl:Restriction>
      <owl:onProperty rdf:resource="&rdf-ns;object"/>
      <owl:allValuesFrom rdf:resource="#MyType"/>
    </owl:Restriction>
    <owl:Restriction>
      <owl:onProperty rdf:resource="&rdf-ns;object" />
      <owl:minCardinality
rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
    </owl:Restriction>
    <owl:Restriction>
      <owl:onProperty rdf:resource="&rdf-ns;object" />
      <owl:maxCardinality
rdf:datatype="&xsd;nonNegativeInteger">5</owl:maxCardinality>
    </owl:Restriction>
  </owl:intersectionOf>
</owl:Class>

<owl:Class rdf:ID="MyTypedContainer">
  <rdfs:subClassOf rdf:resource="&rdf-ns;Container"/>
  <owl:intersectionOf rdf:parseType="Collection">
    <rdf:Description rdf:about="&rdf-ns;Container"/>
    <owl:Restriction>
      <owl:onProperty>
        <owl:ObjectProperty>
          <owl:inverseOf>
            <owl:ObjectProperty rdf:about="&rdf-ns;subject" />
          </owl:inverseOf>
        </owl:ObjectProperty>
      </owl:onProperty>
      <owl:allValuesFrom
rdf:resource="#MyTypedContainerMembershipStatement"/>
    </owl:Restriction>
  </owl:intersectionOf>
</owl:Class>

Received on Wednesday, 17 September 2003 12:18:13 UTC