Class vs. instance representation example

From BiopaxWiki
Jump to: navigation, search

How a protein is described as an instance in RDF (according to the structure defined in an OWL ontology): (10 lines)

  <protein rdf:ID="p12345">
    <ORGANISM rdf:resource="#Homo_sapiens" />
    <NAME rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Apoptosis-mediating surface antigen FAS</NAME>
    <SYNONYMS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">FAS</SYNONYMS>
    <SYNONYMS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">TNFRSF6</SYNONYMS>
    <SYNONYMS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">APT1</SYNONYMS>
    <SYNONYMS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">FAS1</SYNONYMS>
    <XREF rdf:resource="#UniProt_P25445" />
    <COMMENT rdf:datatype="http://www.w3.org/2001/XMLSchema#string">My favorite protein</COMMENT>
  </protein>

The same example protein described as a class in OWL. Not that is is extremely verbose compared to the above RDF. (88 lines)

  <owl:Class rdf:ID="p12345">
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty>
          <owl:DatatypeProperty rdf:ID="SYNONYMS"/>
        </owl:onProperty>
        <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
        >TNFRSF6</owl:hasValue>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty>
          <owl:DatatypeProperty rdf:about="#SYNONYMS"/>
        </owl:onProperty>
        <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
        >FAS1</owl:hasValue>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty>
          <owl:DatatypeProperty rdf:about="#SYNONYMS"/>
        </owl:onProperty>
        <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
        >APT1</owl:hasValue>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
        >FAS</owl:hasValue>
        <owl:onProperty>
          <owl:DatatypeProperty rdf:about="#SYNONYMS"/>
        </owl:onProperty>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
        >Apoptosis-mediating surface antigen FAS</owl:hasValue>
        <owl:onProperty>
          <owl:DatatypeProperty rdf:about="#NAME"/>
        </owl:onProperty>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Class rdf:about="#protein"/>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
        >Apoptosis-mediating surface antigen FAS</owl:hasValue>
        <owl:onProperty>
          <owl:DatatypeProperty rdf:about="#NAME"/>
        </owl:onProperty>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:hasValue>
          <bioSource rdf:ID="Homo_sapiens"/>
        </owl:hasValue>
        <owl:onProperty>
          <owl:ObjectProperty rdf:about="#ORGANISM"/>
        </owl:onProperty>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
        >My favorite protein</owl:hasValue>
        <owl:onProperty>
          <owl:DatatypeProperty rdf:ID="COMMENT"/>
        </owl:onProperty>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:hasValue>
          <bioSource rdf:ID="UniProt_P25445"/>
        </owl:hasValue>
        <owl:onProperty>
          <owl:ObjectProperty rdf:about="#ORGANISM"/>
        </owl:onProperty>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>