Firstly,thanks for concerning my problem

I want to create a new OntModel which can store the  infomation from a
another OWL file
 so create a new OntModel with this function :
  OntModel CreatedModel =
ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF);
Then, get all the the statements from another OWL file such as

   StmtIterator triples = RawModel.listStatements();
(RawModel is a OntModel and contain the information from external OWL file);

Finally, I add all the statement from triples to the CreatedModel with
function   CreatedModel.add(statement);


However,the problem is that  the new model(CreatedModel) cann't get the
information of individuals from statements,it seems that the statements
about the individuals are filterd automatic.I think this maybe that I
have't create a correct Model,because when I create a empty OntModel at
this way
      OntModel CreatedModel =
ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF);
     CreatedModel.write(System.out);
It display this result:


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


It seems not a OWL file,but a RDFS file.So there are only class and
subclass left in the new model after adding all statements to it .


Well, could anyone tell me how to create a new OWL File ,meanwhile can have
the same Namesapce and information  from the original OWL file.

Thanks very much !
Best Wishes !

 _

Reply via email to