Examples of OCL


Examples of org.eclipse.ocl.uml.OCL

    if(in_sExpression.length() == 0)
      return null;
   
    try{
      OCLExpression oExpression = null;
      OCL oOcl = org.eclipse.ocl.uml.OCL.newInstance(
          new UMLEnvironmentFactory(
              new ResourceSetImpl()));
      OCL.Helper helper = oOcl.createOCLHelper();
      //if(in_sExpressionType.compareTo(Configuration.getOCLInvId()) == 0)
      if(in_oContext instanceof org.eclipse.uml2.uml.Class)
      {
        org.eclipse.uml2.uml.Class oClass = (org.eclipse.uml2.uml.Class)in_oContext;
        helper.setContext(oClass);
View Full Code Here

Examples of org.eclipse.ocl.uml.OCL

    if(in_sExpression.length() == 0)
      return null;
   
    try{
      OCLExpression oExpression = null;
      OCL oOcl = org.eclipse.ocl.uml.OCL.newInstance(
          new UMLEnvironmentFactory(
              new ResourceSetImpl()));
      OCL.Helper helper = oOcl.createOCLHelper();
      //if(in_sExpressionType.compareTo(Configuration.getOCLInvId()) == 0)
      if(in_oContext instanceof org.eclipse.uml2.uml.Class)
      {
        org.eclipse.uml2.uml.Class oClass = (org.eclipse.uml2.uml.Class)in_oContext;
        helper.setContext(oClass);
View Full Code Here

Examples of org.eclipse.ocl.uml.OCL

    Model model = (Model) load(inFile).get(0);
    Class umlClass = (Class) model.getOwnedMembers().get(0).getOwnedElements().get(0);
    Property umlProperty = (Property) umlClass.getOwnedAttributes().get(0);
   
    //initialize OCL stuff
    OCL ocl = OCL.newInstance();
    Helper helper = ocl.createOCLHelper();
    out(OCL.initialize(OCLParser.RESOURCE_SET));
    helper.setAttributeContext(umlClass, umlProperty);
    helper.setContext((Classifier) model.getOwnedMembers().get(0).getOwnedElements().get(0));
    out("The following elements are contained in the class:");
    out(model.getOwnedMembers().get(0).getOwnedElements().get(0).toString());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.