Home » Archived » M2M (model-to-model transformation) » [ATL] UML2OWL "could not find operation" error
[ATL] UML2OWL "could not find operation" error [message #96180] |
Fri, 28 November 2008 16:38 |
Adrien Debosschere Messages: 9 Registered: July 2009 |
Junior Member |
|
|
Hi,
I'm trying to run the UML2OWL transformation on a simple XMI file (a
single class "myClass", containing an int attribute "myAttribute"), but i
got an error and i don't know how to get rid of it:
+---------------+
| Error message |
+---------------+
transfo:
[am3.loadModel] INFO: Loading of model umlModel
[am3.atl] INFO: Executing ATL transformation /UML2OWL/UML2OWL.asm
[am3.atl] GRAVE: ****** BEGIN Stack Trace
[am3.atl] GRAVE: message: ERROR: could not find operation
getNamedTargetFromSource on Void having supertypes: [OclAny]
[am3.atl] GRAVE: A.main() : ??#80 null
[am3.atl] GRAVE: local variables = {null=Sequence {}, self=UML2OWL :
ASMModule}
[am3.atl] GRAVE: local stack = []
[am3.atl] GRAVE: A.__exec__() : ??#88 null
[am3.atl] GRAVE: local variables = {e=TransientLink {rule =
'PrimitiveProperty2DataTypeProperty', sourceElements = {p =
umlModel!myAttribute}, targetElements = {u = OUT!<unnamed>, d =
OUT!<unnamed>, l = OUT!myClass.myAttribute, uri =
OUT!myClass.myAttribute}, variables = {}}, self=UML2OWL : ASMModule}
[am3.atl] GRAVE: local stack = []
[am3.atl] GRAVE: A.__applyPrimitiveProperty2DataTypeProperty(1 :
NTransientLink;) : ??#110 223:4-223:45
[am3.atl] GRAVE: local variables = {d=OUT!<unnamed>,
p=umlModel!myAttribute, link=TransientLink {rule =
'PrimitiveProperty2DataTypeProperty', sourceElements = {p =
umlModel!myAttribute}, targetElements = {u = OUT!<unnamed>, d =
OUT!<unnamed>, l = OUT!myClass.myAttribute, uri =
OUT!myClass.myAttribute}, variables = {}}, self=UML2OWL : ASMModule,
uri=OUT!myClass.myAttribute, l=OUT!myClass.myAttribute, u=OUT!<unnamed>}
[am3.atl] GRAVE: local stack = []
[am3.atl] GRAVE: A.addCardinalityRestriction(1 : J) : ??#37
275:19-275:45
[am3.atl] GRAVE: local variables = {literal=OUT!<unnamed>,
c=OUT!<unnamed>, p=umlModel!myAttribute, self=UML2OWL : ASMModule}
[am3.atl] GRAVE: local stack = [OUT!<unnamed>, OUT!<unnamed>,
UML2OWL : ASMModule]
[am3.atl] GRAVE: A.getIntegerURI() : ??#28 48:2-52:3
[am3.atl] GRAVE: local variables = {self=UML2OWL : ASMModule}
[am3.atl] GRAVE: local stack = []
[am3.atl] GRAVE: A.resolveTemp(1 : J, 2 : S) : ??#6 null
[am3.atl] GRAVE: local variables = {name='u', value=OclUndefined,
self=UML2OWL : ASMModule}
[am3.atl] GRAVE: local stack = []
[am3.atl] GRAVE: ****** END Stack Trace
[am3.atl] INFO: Execution terminated due to error (see launch
configuration to allow continuation after errors).
So the error seems to come from the "resolveTemp"'s call in the
"getIntegerURI" helper. I tried to add an "OclAny" context to
"getIntegerURI" but the error message was still here.
Here are 1 helper and 2 rules, from UML2OWL.atl, involved in the error:
+------------+
| ATL Sample |
+------------+
helper def: getIntegerURI() : OclAny =
thisModule.resolveTemp(
UML!PrimitiveType.allInstances()->any( e |
e.oclIsTypeOf(UML!PrimitiveType) and e.name = 'Integer' ),
'u'
);
rule addCardinalityRestriction( p : UML!Property ) {
to
c : OWL!CardinalityRestriction (
superClass <- p.class,
OWLCardinality <- literal,
OWLOnProperty <- p
),
literal : OWL!TypedLiteral (
lexicalForm <- p.upper.toString(),
datatypeURI <- thisModule.getIntegerURI()
)
}
rule PrimitiveProperty2DataTypeProperty {
from
p : UML!Property
(
p.type.oclIsTypeOf(UML!PrimitiveType)
)
to
d : OWL!OWLDatatypeProperty (
uriRef <- u,
domain <- p.class,
range <- p.type
),
u : OWL!URIReference ( fragmentIdentifier <- l, uri <- uri ),
l : OWL!LocalName ( name <- p.class.name + '.' + p.name ),
uri : OWL!UniformResourceIdentifier ( name <- p.class.name + '.' +
p.name )
do {
if ( p.upper = p.lower ) -- [n-n]
thisModule.addCardinalityRestriction( p );
else
if (( p.upper = 0-1 ) and ( p.lower >= 0 )) -- [*]
thisModule.addMinCardinalityRestriction( p );
else { -- [m-n]
thisModule.addMinCardinalityRestriction( p );
thisModule.addMaxCardinalityRestriction( p );
}
}
}
I spent several hours trying to fix it, unsuccessfully, so some help will
be greatly appreciated. Thanks !
Best regards,
Adrien
|
|
|
Re: [ATL] UML2OWL "could not find operation" error [message #96195 is a reply to message #96180] |
Fri, 28 November 2008 16:52 |
Guillaume Hillairet Messages: 97 Registered: July 2009 |
Member |
|
|
Hi Adrien,
I don't know which version of eclipse and uml2owl project you are using
but you should try the version available here
http://perso.univ-lr.fr/ghillair/projects.html which work with eclipse 3.4
and emf 2.4 and atl 2.0.0. Or you can directly use the uml2owl eclipse
plugin available here http://code.google.com/p/eclipseuml2owl/ .
Regards.
Adrien Debosschere wrote:
> Hi,
> I'm trying to run the UML2OWL transformation on a simple XMI file (a
> single class "myClass", containing an int attribute "myAttribute"), but i
> got an error and i don't know how to get rid of it:
> +---------------+
> | Error message |
> +---------------+
> transfo:
> [am3.loadModel] INFO: Loading of model umlModel
> [am3.atl] INFO: Executing ATL transformation /UML2OWL/UML2OWL.asm
> [am3.atl] GRAVE: ****** BEGIN Stack Trace
> [am3.atl] GRAVE: message: ERROR: could not find operation
> getNamedTargetFromSource on Void having supertypes: [OclAny]
> [am3.atl] GRAVE: A.main() : ??#80 null
> [am3.atl] GRAVE: local variables = {null=Sequence {}, self=UML2OWL :
> ASMModule}
> [am3.atl] GRAVE: local stack = []
> [am3.atl] GRAVE: A.__exec__() : ??#88 null
> [am3.atl] GRAVE: local variables = {e=TransientLink {rule =
> 'PrimitiveProperty2DataTypeProperty', sourceElements = {p =
> umlModel!myAttribute}, targetElements = {u = OUT!<unnamed>, d =
> OUT!<unnamed>, l = OUT!myClass.myAttribute, uri =
> OUT!myClass.myAttribute}, variables = {}}, self=UML2OWL : ASMModule}
> [am3.atl] GRAVE: local stack = []
> [am3.atl] GRAVE: A.__applyPrimitiveProperty2DataTypeProperty(1 :
> NTransientLink;) : ??#110 223:4-223:45
> [am3.atl] GRAVE: local variables = {d=OUT!<unnamed>,
> p=umlModel!myAttribute, link=TransientLink {rule =
> 'PrimitiveProperty2DataTypeProperty', sourceElements = {p =
> umlModel!myAttribute}, targetElements = {u = OUT!<unnamed>, d =
> OUT!<unnamed>, l = OUT!myClass.myAttribute, uri =
> OUT!myClass.myAttribute}, variables = {}}, self=UML2OWL : ASMModule,
> uri=OUT!myClass.myAttribute, l=OUT!myClass.myAttribute, u=OUT!<unnamed>}
> [am3.atl] GRAVE: local stack = []
> [am3.atl] GRAVE: A.addCardinalityRestriction(1 : J) : ??#37
> 275:19-275:45
> [am3.atl] GRAVE: local variables = {literal=OUT!<unnamed>,
> c=OUT!<unnamed>, p=umlModel!myAttribute, self=UML2OWL : ASMModule}
> [am3.atl] GRAVE: local stack = [OUT!<unnamed>, OUT!<unnamed>,
> UML2OWL : ASMModule]
> [am3.atl] GRAVE: A.getIntegerURI() : ??#28 48:2-52:3
> [am3.atl] GRAVE: local variables = {self=UML2OWL : ASMModule}
> [am3.atl] GRAVE: local stack = []
> [am3.atl] GRAVE: A.resolveTemp(1 : J, 2 : S) : ??#6 null
> [am3.atl] GRAVE: local variables = {name='u', value=OclUndefined,
> self=UML2OWL : ASMModule}
> [am3.atl] GRAVE: local stack = []
> [am3.atl] GRAVE: ****** END Stack Trace
> [am3.atl] INFO: Execution terminated due to error (see launch
> configuration to allow continuation after errors).
> So the error seems to come from the "resolveTemp"'s call in the
> "getIntegerURI" helper. I tried to add an "OclAny" context to
> "getIntegerURI" but the error message was still here.
> Here are 1 helper and 2 rules, from UML2OWL.atl, involved in the error:
> +------------+
> | ATL Sample |
> +------------+
> helper def: getIntegerURI() : OclAny =
> thisModule.resolveTemp(
> UML!PrimitiveType.allInstances()->any( e |
> e.oclIsTypeOf(UML!PrimitiveType) and e.name = 'Integer' ),
> 'u'
> );
> rule addCardinalityRestriction( p : UML!Property ) {
> to
> c : OWL!CardinalityRestriction (
> superClass <- p.class,
> OWLCardinality <- literal,
> OWLOnProperty <- p
> ),
> literal : OWL!TypedLiteral (
> lexicalForm <- p.upper.toString(),
> datatypeURI <- thisModule.getIntegerURI()
> )
> }
> rule PrimitiveProperty2DataTypeProperty {
> from
> p : UML!Property
> (
> p.type.oclIsTypeOf(UML!PrimitiveType)
> )
> to
> d : OWL!OWLDatatypeProperty (
> uriRef <- u,
> domain <- p.class,
> range <- p.type
> ),
> u : OWL!URIReference ( fragmentIdentifier <- l, uri <- uri ),
> l : OWL!LocalName ( name <- p.class.name + '.' + p.name ),
> uri : OWL!UniformResourceIdentifier ( name <- p.class.name + '.' +
> p.name )
> do {
> if ( p.upper = p.lower ) -- [n-n]
> thisModule.addCardinalityRestriction( p );
> else
> if (( p.upper = 0-1 ) and ( p.lower >= 0 )) -- [*]
> thisModule.addMinCardinalityRestriction( p );
> else { -- [m-n]
> thisModule.addMinCardinalityRestriction( p );
> thisModule.addMaxCardinalityRestriction( p );
> }
> }
> }
> I spent several hours trying to fix it, unsuccessfully, so some help will
> be greatly appreciated. Thanks !
> Best regards,
> Adrien
|
|
| |
Goto Forum:
Current Time: Fri Apr 19 12:22:44 GMT 2024
Powered by FUDForum. Page generated in 0.01906 seconds
|