[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.mdt.eodm] Re: EMF to OWL
|
Hello..
I used the EMF and create an ecore from a XSD to read the xmi File.
But I don't know yet how to transform this for an OWL File yet using the
EODM.
I am trying to write some code based in the turorial in the eodm page. but
the Document is too old. You are using a new API.
I tried to use it but I have some issues yet.
What I have to save??? I wanna the model with the instances. I open the
XML file, but I don't now what I have to save.
First what i have to translate to owl. T
The class Ecore2OWL.ecore2OWL accepts Resource and an ecore file.
Ecore files don't have instances.. so it is not what I need.
But I don't get to identify what resource to transform. I have to
transform all the resources or only the root one ??
And if I transform each one how I join them ??because eachone gives me an
OWLGraph object.
The other problem is to save I have to use a document object... how I
transform an Ontology in a document.
OWLXMLSaver accept document to save.
There is any application example or documentation in anyplace ???
---- what I'm trying to do -------
try{
OWLGraph graph = Ecore2OWL.ecore2OWL((Resource)this, null);
OWLOntology ontology = OWLFactory.eINSTANCE.createOWLOntology(graph,
"http://www.ontology.com/");
Document doc = graph.
OWLXMLSaver.saveToFile(doc, "./person.owl", "UTF-8");
}catch(Exception e){
e.printStackTrace();
}