|
Re: Parse OCL Constraints - Model Instance of an UML Profile [message #845501 is a reply to message #845236] |
Sun, 15 April 2012 05:30 |
Ed Willink Messages: 7671 Registered: July 2009 |
Senior Member |
|
|
Hi
If you open MyConstraints.ocl in the Complete OCL editor, the editor
will parse the constraints for you.
MyModelInstance.abcduml already is a 'UML model instance' which is no
different to an 'Ecore model instance', so if you open it with the
reflective Ecore Model editor, you can invoke the Load Complete OCL
Resource menu action to add MyConstraints.ocl. (This long overdue
integration was added in JunoM6).
At the API level you may find the CompleteOCLEObjectValidator helpful.
You may find the Royal and Loyal example project helpful.
Regards
Ed Willink
On 14/04/2012 23:21, John G. wrote:
> Hi,
>
> -------
> I have an UML Profile named as "AbcdUML" (only for example) and i have
> the metamodel in EMF/Ecore.
>
> i.e. AbcdUML.ecore (metamodel) i.e. myModelInstance.abcduml (model
> instance)
>
> Now i have an OCl document with constraints against this model
> instance (not the metamodel).
> i.e. MyConstraints.ocl
> I need of these OCL constraints to make a transformation to another
> language.
> --------
>
> How can I parse this constraints against this specific model
> instance(*.abcduml) since the API only provide a binding to Ecore and
> UML models? I need to parse before to obtain the constraints, right?
>
> Putting it simply, I need to parse the OCL to obtain the Constraints
> through API and then use a visitor to walk in the AST and make a
> transformation to another language.
>
> My first solution was to transform my "MyModelInstance.abcduml" into a
> UML model instance. So now I'm able to get the constraints and to make
> the transformation. Is there a better solution?
> In this solution to UML i use the org.eclipse.ocl.uml and
> org.eclipse.ocl libraries.
>
> Is there a way to do this without a binding to a UML/Ecore/AbcdProfile
> ? In this case, how the the classifiers context and properties of OCL
> expressions will be recognized ?
>
> Which library i have to use? And how to do this?
>
> Regards,
> John
|
|
|
Re: Parse OCL Constraints - Model Instance of an UML Profile [message #845506 is a reply to message #845236] |
Sun, 15 April 2012 05:30 |
Ed Willink Messages: 7671 Registered: July 2009 |
Senior Member |
|
|
Hi
If you open MyConstraints.ocl in the Complete OCL editor, the editor
will parse the constraints for you.
MyModelInstance.abcduml already is a 'UML model instance' which is no
different to an 'Ecore model instance', so if you open it with the
reflective Ecore Model editor, you can invoke the Load Complete OCL
Resource menu action to add MyConstraints.ocl. (This long overdue
integration was added in JunoM6).
At the API level you may find the CompleteOCLEObjectValidator helpful.
You may find the Royal and Loyal example project helpful.
Regards
Ed Willink
On 14/04/2012 23:21, John G. wrote:
> Hi,
>
> -------
> I have an UML Profile named as "AbcdUML" (only for example) and i have
> the metamodel in EMF/Ecore.
>
> i.e. AbcdUML.ecore (metamodel) i.e. myModelInstance.abcduml (model
> instance)
>
> Now i have an OCl document with constraints against this model
> instance (not the metamodel).
> i.e. MyConstraints.ocl
> I need of these OCL constraints to make a transformation to another
> language.
> --------
>
> How can I parse this constraints against this specific model
> instance(*.abcduml) since the API only provide a binding to Ecore and
> UML models? I need to parse before to obtain the constraints, right?
>
> Putting it simply, I need to parse the OCL to obtain the Constraints
> through API and then use a visitor to walk in the AST and make a
> transformation to another language.
>
> My first solution was to transform my "MyModelInstance.abcduml" into a
> UML model instance. So now I'm able to get the constraints and to make
> the transformation. Is there a better solution?
> In this solution to UML i use the org.eclipse.ocl.uml and
> org.eclipse.ocl libraries.
>
> Is there a way to do this without a binding to a UML/Ecore/AbcdProfile
> ? In this case, how the the classifiers context and properties of OCL
> expressions will be recognized ?
>
> Which library i have to use? And how to do this?
>
> Regards,
> John
|
|
|
Re: Parse OCL Constraints - Model Instance of an UML Profile [message #845511 is a reply to message #845236] |
Sun, 15 April 2012 05:30 |
Ed Willink Messages: 7671 Registered: July 2009 |
Senior Member |
|
|
Hi
If you open MyConstraints.ocl in the Complete OCL editor, the editor
will parse the constraints for you.
MyModelInstance.abcduml already is a 'UML model instance' which is no
different to an 'Ecore model instance', so if you open it with the
reflective Ecore Model editor, you can invoke the Load Complete OCL
Resource menu action to add MyConstraints.ocl. (This long overdue
integration was added in JunoM6).
At the API level you may find the CompleteOCLEObjectValidator helpful.
You may find the Royal and Loyal example project helpful.
Regards
Ed Willink
On 14/04/2012 23:21, John G. wrote:
> Hi,
>
> -------
> I have an UML Profile named as "AbcdUML" (only for example) and i have
> the metamodel in EMF/Ecore.
>
> i.e. AbcdUML.ecore (metamodel) i.e. myModelInstance.abcduml (model
> instance)
>
> Now i have an OCl document with constraints against this model
> instance (not the metamodel).
> i.e. MyConstraints.ocl
> I need of these OCL constraints to make a transformation to another
> language.
> --------
>
> How can I parse this constraints against this specific model
> instance(*.abcduml) since the API only provide a binding to Ecore and
> UML models? I need to parse before to obtain the constraints, right?
>
> Putting it simply, I need to parse the OCL to obtain the Constraints
> through API and then use a visitor to walk in the AST and make a
> transformation to another language.
>
> My first solution was to transform my "MyModelInstance.abcduml" into a
> UML model instance. So now I'm able to get the constraints and to make
> the transformation. Is there a better solution?
> In this solution to UML i use the org.eclipse.ocl.uml and
> org.eclipse.ocl libraries.
>
> Is there a way to do this without a binding to a UML/Ecore/AbcdProfile
> ? In this case, how the the classifiers context and properties of OCL
> expressions will be recognized ?
>
> Which library i have to use? And how to do this?
>
> Regards,
> John
|
|
|
Re: Parse OCL Constraints - Model Instance of an UML Profile [message #845517 is a reply to message #845236] |
Sun, 15 April 2012 05:30 |
Ed Willink Messages: 7671 Registered: July 2009 |
Senior Member |
|
|
Hi
If you open MyConstraints.ocl in the Complete OCL editor, the editor
will parse the constraints for you.
MyModelInstance.abcduml already is a 'UML model instance' which is no
different to an 'Ecore model instance', so if you open it with the
reflective Ecore Model editor, you can invoke the Load Complete OCL
Resource menu action to add MyConstraints.ocl. (This long overdue
integration was added in JunoM6).
At the API level you may find the CompleteOCLEObjectValidator helpful.
You may find the Royal and Loyal example project helpful.
Regards
Ed Willink
On 14/04/2012 23:21, John G. wrote:
> Hi,
>
> -------
> I have an UML Profile named as "AbcdUML" (only for example) and i have
> the metamodel in EMF/Ecore.
>
> i.e. AbcdUML.ecore (metamodel) i.e. myModelInstance.abcduml (model
> instance)
>
> Now i have an OCl document with constraints against this model
> instance (not the metamodel).
> i.e. MyConstraints.ocl
> I need of these OCL constraints to make a transformation to another
> language.
> --------
>
> How can I parse this constraints against this specific model
> instance(*.abcduml) since the API only provide a binding to Ecore and
> UML models? I need to parse before to obtain the constraints, right?
>
> Putting it simply, I need to parse the OCL to obtain the Constraints
> through API and then use a visitor to walk in the AST and make a
> transformation to another language.
>
> My first solution was to transform my "MyModelInstance.abcduml" into a
> UML model instance. So now I'm able to get the constraints and to make
> the transformation. Is there a better solution?
> In this solution to UML i use the org.eclipse.ocl.uml and
> org.eclipse.ocl libraries.
>
> Is there a way to do this without a binding to a UML/Ecore/AbcdProfile
> ? In this case, how the the classifiers context and properties of OCL
> expressions will be recognized ?
>
> Which library i have to use? And how to do this?
>
> Regards,
> John
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03765 seconds