Hi,

I'm writing a Python script to check if a model follows some rules implemented 
in an OCL file.

In order to do that I want to use an internal function of the OCL package:
org.topcased.ocl.checker.engine.OCLCheckerEngine.evaluateOCLRules(Resource, 
OCLFileDescriptor, IProgressMonitor)

In the resource arg I putted the model resource (that I've created from the 
model URI). For the OCLFileDescriptor I putted my .ocl file descriptor 
(obtained via the 
org.topcased.validation.ocl.extension.OCLMetamodelManager.getFiles() method).

Finally I've created a NullProgressMonitor that I putted in the 3rd arg.

When I execute the script I obtain the following error message:

File "C:/Users/to100966/workspace/essaiEx1Jyt/scripts/Example1.py", line 46, in 
main
    Log=OCLCheckerEngine.evaluateOCLRules(res, FD[0], IPM)
        at 
com.esterel.scade.api.storage.impl.ModelImpl.getAllLibraries(ModelImpl.java:467)

        at 
com.esterel.scade.api.storage.impl.ModelImpl.eIsSet(ModelImpl.java:746)

        at 
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObjectImpl.java:1247)

        at 
org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:407)

        at 
org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.next(EContentsEList.java:565)

        at 
org.eclipse.emf.ecore.util.EcoreUtil.resolveCrossReferences(EcoreUtil.java:307)

        at org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(EcoreUtil.java:287)

        at org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(EcoreUtil.java:274)

        at 
org.topcased.ocl.checker.engine.OCLCheckerEngine.evaluateOCLRules(OCLCheckerEngine.java:179)

        at 
org.topcased.ocl.checker.engine.OCLCheckerEngine.evaluateOCLRules(OCLCheckerEngine.java:135)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)


java.lang.UnsupportedOperationException: java.lang.UnsupportedOperationException
 C:/Users/to100966/workspace/essaiEx1Jyt/scripts/Example1.py

Could you please give me more details concerning the way to use this function 
(I didn't find any Javadoc or other documents explaining it) and, eventually, 
the solution to this problem?


Thanks,

Andreu CASAL VILANA


The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.

_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users
  • [Topcased-users] OCL interna... Topcased user list where issues are discussed

Reply via email to