[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.eodm] Re: EODM.. 0.9

Alex,

This is a question for the EODM newsgroup.

Kenn

"Alex Pinheiro das "Graças"" <alex.pgracas@xxxxxxxxx> wrote in message 
news:35489ee41c15cfec63776617d349126d$1@xxxxxxxxxxxxxxxxxx
> Hello..
> I want to get an methodology from EPF and transform its for an owl file. 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 using the EODM.
> I am trying to write some code based in the tutorial in the eodm page, but 
> the Document is too old. The Eodm are using a new API, but I can't find 
> any reference or example.
>
> I tried to use it but I have some issues.
> First what i have to translate to owl. 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 will 
> save them?? because each one gives me an different OWLGraph object.
>
> The other problem is to save . OWLXMLSaver accept a class "Document" to 
> save. I have to use a document object, but how I will get an Document from 
> a OWLGraph.
>
> There is any application example or documentation in anyplace?
>
> Cheers,
>
> ---- what I'm trying to do -------
> try{
>  OWLGraph graph = Ecore2OWL.ecore2OWL((Resource)this, null);
>  OWLOntology ontology = OWLFactory.eINSTANCE.createOWLOntology(graph,
>          uuid);
>  // ... ????
>  OWLXMLSaver.saveToFile(doc, "./person.owl", "UTF-8");
> }catch(Exception e){
>   e.printStackTrace();
> }
>