[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.eodm] owl2ecore problem with transformation

Hello,
I am trying to transform owl to ecore by using owl2ecore provided by EODM.
I have the following owl file.

<?xml version="1.0"?>
<rdf:RDF
    xmlns="http://www.owl-ontologies.com/Sample#";
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#";
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
    xmlns:owl="http://www.w3.org/2002/07/owl#";
  xml:base="http://www.owl-ontologies.com/Sample";>

  <owl:Ontology rdf:about=""/>

  <owl:Class rdf:ID="Country">
    <owl:disjointWith>
      <owl:Class rdf:ID="Product"/>
    </owl:disjointWith>

  </owl:Class>
  <owl:Class rdf:about="#Product">
    <owl:disjointWith rdf:resource="#Country"/>
  </owl:Class>

  <owl:Class rdf:ID="List">
    <rdfs:subClassOf>
      <owl:Class>
        <owl:oneOf rdf:parseType="Collection">
          <EnergyBehavior rdf:ID="Agriculture"/>
          <EnergyBehavior rdf:ID="Automotive"/>
          <EnergyBehavior rdf:ID="Financial"/>
        </owl:oneOf>
      </owl:Class>
    </rdfs:subClassOf>
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
  </owl:Class>

</rdf:RDF>


And I get the following error when doing owl2ecore.

org.eclipse.eodm.owl.transformer.EODMOWLTransformerException: Fail to 
inintialize OWL Reasoner: Fail to retrieve resources from Graph:null
 at org.eclipse.eodm.owl.transformer.OWL2Ecore.owl2ecore(OWL2Ecore.java:100)
 at org.eclipse.eodm.owl.transformer.OWL2Ecore.owl2ecore(OWL2Ecore.java:90)
 at org.eclipse.eodm.owl.transformer.OWL2Ecore.owl2ecore(OWL2Ecore.java:71)
 at Main.main(Main.java:8)


But when I take out the "List" class, owl2ecore works and outputs an ecore 
model.
So something is wrong with the "List" class (copied below).
Any ideas on what is going wrong here?

  <owl:Class rdf:ID="List">
    <rdfs:subClassOf>
      <owl:Class>
        <owl:oneOf rdf:parseType="Collection">
          <EnergyBehavior rdf:ID="Agriculture"/>
          <EnergyBehavior rdf:ID="Automotive"/>
          <EnergyBehavior rdf:ID="Financial"/>
        </owl:oneOf>
      </owl:Class>
    </rdfs:subClassOf>
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
  </owl:Class>


Thank you.