URI of anonymous classes

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

URI of anonymous classes

Jos Lehmann-2

Hi there

 

(This is a jena question with a Protege subquestion)

 

 

I am rewriting an ontology using jena. I rewrite each import. When rewriting an importing ontology, anonymous classes (e.g. restrictions or disjointness axioms) of the imported ontology appear twice in the importing ontology, because to re-write the importing ontology I am working with OntModelSpec.OWL_DL_MEM, to make sure rewrite instances asserted in the importing ontology of classes declared in the imported ontology.

 

Question: is there a way of telling in jena where (at which URI) was a restriction or an axiom asserted?

 

   Note: Protege has a tooltip saying "Asserted in: URI" of such classes. But the rdf/xml file does not seem to have such a property.

 

      Subquestion: Does protege compute this property by looking at all URI of all statements of the anonymous classes?

 

 

Hope I am making sense. Jos

 


_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev
Reply | Threaded
Open this post in threaded view
|

Re: URI of anonymous classes

Jos Lehmann-2

As an integration to my question (see Ursprüngliche Nachricht) please see further down the ouput of re-writing the importing ontology*.

The same intersection is repeated. Yet, Protege is able to tell that one of the two intesections comes from the imported ontology the other from the importing ontology. How? How to tell the the same thing in jena.

 

Jos

 

-----Ursprüngliche Nachricht-----
Von: Jos Lehmann
Gesendet: Dienstag, 27. Februar 2018 11:09
An: [hidden email]
Betreff: URI of anonymous classes

 

Hi there

 

I am rewriting an ontology using jena. I rewrite each import. When rewriting an importing ontology, anonymous classes (e.g. restrictions or disjointness axioms) of the imported ontology appear twice in the importing ontology, because to re-write the importing ontology I am working with OntModelSpec.OWL_DL_MEM, to make sure rewrite instances asserted in the importing ontology of classes declared in the imported ontology.

 

Question: is there a way of telling in jena where (at which URI) was a restriction or an axiom asserted?

 

   Note: Protege has a tooltip saying "Asserted in: URI" of such classes. But the rdf/xml file does not seem to have such a property.

 

      Subquestion: Does protege compute this property by looking at all URI of all statements oft he anonymous classes?

 

 

Hope I am making sense. Jos

 

 

 

 

* OUTPUT OF RE-WRITING IMPORTING ONTOLOGY

 

<owl:Class rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#Dimension">

    <rdfs:subClassOf>

      <owl:Class>

        <owl:intersectionOf rdf:parseType="Collection">

          <owl:Restriction>

            <owl:allValuesFrom>

              <owl:Class rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#DimensionFactor"/>

            </owl:allValuesFrom>

            <owl:onProperty>

              <owl:AsymmetricProperty rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#dimensionFactor">

                <rdfs:range>

                  <owl:Class rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#DimensionFactor"/>

                </rdfs:range>

                <dc:source>skos:exactMatch 'factor' [SysML 1.2-QUDV] http://www.omgwiki.org/OMGSysML/doku.php?id=sysml-qudv:quantities_units_dimensions_values_qudv</dc:source>

                <rdfs:comment>Rational number that specifies the factor in the dimension conversion relationship.</rdfs:comment>

                <rdfs:isDefinedBy>http://purl.oclc.org/NET/ssnx/qu</rdfs:isDefinedBy>

                <rdfs:label>dimension factor</rdfs:label>

                <rdfs:seeAlso>http://www.omgsysml.org/qudv#Dimension</rdfs:seeAlso>

                <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>

              </owl:AsymmetricProperty>

            </owl:onProperty>

          </owl:Restriction>

          <owl:Restriction>

            <owl:onDataRange rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>

            <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"

            >1</owl:cardinality>

            <owl:onProperty>

              <owl:DatatypeProperty rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#symbolicExpression"/>

            </owl:onProperty>

          </owl:Restriction>

          <owl:Restriction>

            <owl:onDataRange rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>

            <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"

            >1</owl:cardinality>

            <owl:onProperty>

              <owl:DatatypeProperty rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#symbolicExpression"/>

            </owl:onProperty>

          </owl:Restriction>

        </owl:intersectionOf>

      </owl:Class>

    </rdfs:subClassOf>

    <rdfs:subClassOf>

      <owl:Class>

        <owl:intersectionOf rdf:parseType="Collection">

          <owl:Restriction>

            <owl:allValuesFrom>

              <owl:Class rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#DimensionFactor"/>

            </owl:allValuesFrom>

            <owl:onProperty rdf:resource="http://purl.oclc.org/NET/ssnx/qu/qu#dimensionFactor"/>

          </owl:Restriction>

          <owl:Restriction>

            <owl:onDataRange rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>

            <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"

            >1</owl:cardinality>

            <owl:onProperty>

              <owl:DatatypeProperty rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#symbolicExpression"/>

            </owl:onProperty>

          </owl:Restriction>

          <owl:Restriction>

            <owl:onDataRange rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>

            <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"

            >1</owl:cardinality>

            <owl:onProperty>

              <owl:DatatypeProperty rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#symbolicExpression"/>

            </owl:onProperty>

          </owl:Restriction>

        </owl:intersectionOf>

      </owl:Class>

 


_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev
Reply | Threaded
Open this post in threaded view
|

Re: URI of anonymous classes

Lorenz Buehmann
In reply to this post by Jos Lehmann-2

Question: is there a way of telling in jena where (at which URI) was a restriction or an axiom asserted?
I'm really wondering why you don't ask Jena related questions on the Jena mailing list?


On 27.02.2018 11:11, Jos Lehmann wrote:

Hi there

 

(This is a jena question with a Protege subquestion)

 

 

I am rewriting an ontology using jena. I rewrite each import. When rewriting an importing ontology, anonymous classes (e.g. restrictions or disjointness axioms) of the imported ontology appear twice in the importing ontology, because to re-write the importing ontology I am working with OntModelSpec.OWL_DL_MEM, to make sure rewrite instances asserted in the importing ontology of classes declared in the imported ontology.

 

Question: is there a way of telling in jena where (at which URI) was a restriction or an axiom asserted?

 

   Note: Protege has a tooltip saying "Asserted in: URI" of such classes. But the rdf/xml file does not seem to have such a property.

 

      Subquestion: Does protege compute this property by looking at all URI of all statements of the anonymous classes?

 

 

Hope I am making sense. Jos

 



_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev


_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev
Reply | Threaded
Open this post in threaded view
|

Re: URI of anonymous classes

Jos Lehmann-2

I have. Jos

 

Von: protege-dev [mailto:[hidden email]] Im Auftrag von Lorenz Buehmann
Gesendet: Dienstag, 27. Februar 2018 12:24
An: [hidden email]
Betreff: Re: [protege-dev] URI of anonymous classes

 

Question: is there a way of telling in jena where (at which URI) was a restriction or an axiom asserted?

I'm really wondering why you don't ask Jena related questions on the Jena mailing list?

 

On 27.02.2018 11:11, Jos Lehmann wrote:

Hi there

 

(This is a jena question with a Protege subquestion)

 

 

I am rewriting an ontology using jena. I rewrite each import. When rewriting an importing ontology, anonymous classes (e.g. restrictions or disjointness axioms) of the imported ontology appear twice in the importing ontology, because to re-write the importing ontology I am working with OntModelSpec.OWL_DL_MEM, to make sure rewrite instances asserted in the importing ontology of classes declared in the imported ontology.

 

Question: is there a way of telling in jena where (at which URI) was a restriction or an axiom asserted?

 

   Note: Protege has a tooltip saying "Asserted in: URI" of such classes. But the rdf/xml file does not seem to have such a property.

 

      Subquestion: Does protege compute this property by looking at all URI of all statements of the anonymous classes?

 

 

Hope I am making sense. Jos

 




_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev

 


_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev
Reply | Threaded
Open this post in threaded view
|

Re: URI of anonymous classes

Matthew Horridge-2
Administrator
In reply to this post by Jos Lehmann-2
Hi Jos,

Protege uses the OWL API to get this information.  Ontologies contain axioms – the axioms parsed from the ontology associated ontology document (RDF/XML file or any other format).  The tooltip in Protege is generated by looking at which of the loaded ontologies contains the axiom under the mouse pointer.

Cheers,

Matthew




On 27 Feb 2018, at 02:49, Jos Lehmann <[hidden email]> wrote:

As an integration to my question (see Ursprüngliche Nachricht) please see further down the ouput of re-writing the importing ontology*.
The same intersection is repeated. Yet, Protege is able to tell that one of the two intesections comes from the imported ontology the other from the importing ontology. How? How to tell the the same thing in jena.
 
Jos
 
-----Ursprüngliche Nachricht-----
Von: Jos Lehmann 
Gesendet: Dienstag, 27. Februar 2018 11:09
An: [hidden email]
Betreff: URI of anonymous classes
 
Hi there 
 
I am rewriting an ontology using jena. I rewrite each import. When rewriting an importing ontology, anonymous classes (e.g. restrictions or disjointness axioms) of the imported ontology appear twice in the importing ontology, because to re-write the importing ontology I am working with OntModelSpec.OWL_DL_MEM, to make sure rewrite instances asserted in the importing ontology of classes declared in the imported ontology.
 
Question: is there a way of telling in jena where (at which URI) was a restriction or an axiom asserted?
 
   Note: Protege has a tooltip saying "Asserted in: URI" of such classes. But the rdf/xml file does not seem to have such a property.
 
      Subquestion: Does protege compute this property by looking at all URI of all statements oft he anonymous classes?
 
 
Hope I am making sense. Jos
 
 
 
 
* OUTPUT OF RE-WRITING IMPORTING ONTOLOGY
 
    <rdfs:subClassOf>
      <owl:Class>
        <owl:intersectionOf rdf:parseType="Collection">
          <owl:Restriction>
            <owl:allValuesFrom>
              <owl:Class rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#DimensionFactor"/>
            </owl:allValuesFrom>
            <owl:onProperty>
              <owl:AsymmetricProperty rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#dimensionFactor">
                <rdfs:range>
                  <owl:Class rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#DimensionFactor"/>
                </rdfs:range>
                <dc:source>skos:exactMatch 'factor' [SysML 1.2-QUDV] http://www.omgwiki.org/OMGSysML/doku.php?id=sysml-qudv:quantities_units_dimensions_values_qudv</dc:source>
                <rdfs:comment>Rational number that specifies the factor in the dimension conversion relationship.</rdfs:comment>
                <rdfs:isDefinedBy>http://purl.oclc.org/NET/ssnx/qu</rdfs:isDefinedBy>
                <rdfs:label>dimension factor</rdfs:label>
                <rdfs:seeAlso>http://www.omgsysml.org/qudv#Dimension</rdfs:seeAlso>
                <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
              </owl:AsymmetricProperty>
            </owl:onProperty>
          </owl:Restriction>
          <owl:Restriction>
            <owl:onDataRange rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
            <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
            >1</owl:cardinality>
            <owl:onProperty>
              <owl:DatatypeProperty rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#symbolicExpression"/>
            </owl:onProperty>
          </owl:Restriction>
          <owl:Restriction>
            <owl:onDataRange rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
            <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
            >1</owl:cardinality>
            <owl:onProperty>
              <owl:DatatypeProperty rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#symbolicExpression"/>
            </owl:onProperty>
          </owl:Restriction>
        </owl:intersectionOf>
      </owl:Class>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Class>
        <owl:intersectionOf rdf:parseType="Collection">
          <owl:Restriction>
            <owl:allValuesFrom>
              <owl:Class rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#DimensionFactor"/>
            </owl:allValuesFrom>
            <owl:onProperty rdf:resource="http://purl.oclc.org/NET/ssnx/qu/qu#dimensionFactor"/>
          </owl:Restriction>
          <owl:Restriction>
            <owl:onDataRange rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
            <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
            >1</owl:cardinality>
            <owl:onProperty>
              <owl:DatatypeProperty rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#symbolicExpression"/>
            </owl:onProperty>
          </owl:Restriction>
          <owl:Restriction>
            <owl:onDataRange rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
            <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
            >1</owl:cardinality>
            <owl:onProperty>
              <owl:DatatypeProperty rdf:about="http://purl.oclc.org/NET/ssnx/qu/qu#symbolicExpression"/>
            </owl:onProperty>
          </owl:Restriction>
        </owl:intersectionOf>
      </owl:Class>
 
_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev


_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev