Hello,
referring to your paper published at
http://www.abdn.ac.uk/~r01srt7/swese2008/pdf/swese2008_submission_14.pdf
(in particular figure 1 at page 2), I want to define OWL/RDFS model
for a custom EMF model (ecore). My purpose is to convert EMF instance
(XMI) to RDF instance of above RDFS schema but I want also return to
EMF objects from RDF serialization of model.
At this time I'm able to run the transformation from an EMF model
(saved into an xmi file) to a RDF through RDFizer but not the vice-
versa: I saw that it is possible to obtain a serialization of the RDF
into XMI, but I would return to EMF object. Is this transformation
possible? In this case, can you help me in the process of conversion
in order to obtain my goal?
Moreover, now I don't provide ATL rules in order to map object model
to RDF and viceversa. It seems that actual version hides this step.
So, what kind of mapping can I define for this version of library?
Following instruction to build source locally, I have found several
issue on plugin dependences and relation: have you a target
definition, so I can build right platform setting?
Finally, I try to run Example3 contained into
"com.emf4sw.examples.zip" available in the download section at
http://code.google.com/p/emftriple/downloads/list, but it doesn't work
and it generates the following exception:
Exception in thread "main"
org.eclipse.m2m.atl.engine.emfvm.VMException:
org.eclipse.m2m.atl.engine.emfvm.lib.OclUndefined cannot be cast to
org.eclipse.emf.ecore.EObject
at __applyOWLClass2EClass#120(owl2ecore.atl[87:43-87:55])
local variables: self=owl2ecore : ASMModule, link=TransientLink
{rule = OWLClass2EClass, sourceElements = {o =
com.emf4sw.owl.impl.OWLClassImpl@c1dc0b (name: DayOfWeek)},
targetElements = {ann_rdf =
org.eclipse.emf.ecore.impl.EAnnotationImpl@1ea71d4 (source: OWLClass),
e = org.eclipse.emf.ecore.impl.EClassImpl@d73c3c (name: DayOfWeek)
(instanceClassName: null) (abstract: false, interface: false),
ann_unionOf =
org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl@b38dba (key:
null, value: null)}, variables = {dataProperties = [], name =
DayOfWeek, objectProperties =
[com.emf4sw.owl.impl.ObjectPropertyImpl@59e205 (name:
bottomObjectProperty)], superTypes = []}}, o=IN!DayOfWeek, e=OUT!
DayOfWeek, ann_rdf=OUT!<unnamed>, ann_uri=OclUndefined,
ann_name=OclUndefined, name='DayOfWeek', objectProperties=Sequence {IN!
bottomObjectProperty}, dataProperties=Sequence {}, superTypes=Sequence
{}
at __exec__#28(owl2ecore.atl)
local variables: self=owl2ecore : ASMModule, e=TransientLink {rule =
OWLClass2EClass, sourceElements = {o =
com.emf4sw.owl.impl.OWLClassImpl@c1dc0b (name: DayOfWeek)},
targetElements = {ann_rdf =
org.eclipse.emf.ecore.impl.EAnnotationImpl@1ea71d4 (source: OWLClass),
e = org.eclipse.emf.ecore.impl.EClassImpl@d73c3c (name: DayOfWeek)
(instanceClassName: null) (abstract: false, interface: false),
ann_unionOf =
org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl@b38dba (key:
null, value: null)}, variables = {dataProperties = [], name =
DayOfWeek, objectProperties =
[com.emf4sw.owl.impl.ObjectPropertyImpl@59e205 (name:
bottomObjectProperty)], superTypes = []}}
at main#27(owl2ecore.atl)
local variables: self=owl2ecore : ASMModule
Java Stack:
org.eclipse.m2m.atl.engine.emfvm.VMException:
org.eclipse.m2m.atl.engine.emfvm.lib.OclUndefined cannot be cast to
org.eclipse.emf.ecore.EObject
at
org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:
643)
at
org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:
388)
at
org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:
388)
at org.eclipse.m2m.atl.engine.emfvm.ASM.run(ASM.java:208)
at
org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.internalLaunch(EMFVMLauncher.java:
170)
at
org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.launch(EMFVMLauncher.java:
139)
at com.atl.common.trans.Transformations$1.apply(Transformations.java:
129)
at com.atl.common.trans.Transformations$1.apply(Transformations.java:
1)
at
com.atl.common.trans.Transformations.transform(Transformations.java:
60)
at com.emf4sw.owl.atl.OWLResource2Ecore.apply(OWLResource2Ecore.java:
45)
at com.emf4sw.examples.Example3.main(Example3.java:32)
Caused by: java.lang.ClassCastException:
org.eclipse.m2m.atl.engine.emfvm.lib.OclUndefined cannot be cast to
org.eclipse.emf.ecore.EObject
at
org.eclipse.m2m.atl.engine.emfvm.adapter.EMFModelAdapter.set(EMFModelAdapter.java:
551)
at
org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:
474)
... 10 more
I obtain the same exception also if I run the code in the page
http://code.google.com/p/emftriple/wiki/EMF4SWTransformations in
section "OWL to Ecore".
I followed the installation instruction step by step, in particular
the section "Install from Source" (
http://code.google.com/p/emftriple/
wiki/Installation) and I tried to transform also other ontology but
everyone generate exceptions.
Thanks
Marta Anna Vitulano