Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Property


 
  @SuppressWarnings("rawtypes")
  private static void oclAtomConstraintVisitor(TCGOCLAtomImpl tcgOCLAtomConstraint){
   
    if (tcgOCLAtomConstraint.getElement() instanceof Property) {  //class property
      Property oProp = (Property) tcgOCLAtomConstraint.getElement();
     
      TCGVariable toBeAdd = new TCGVariable();
      toBeAdd.setName(oProp.getName());
      toBeAdd.setType(typeOfVariable(oProp.getType()));
      toBeAdd.setIsParameter(false);
     
      if(!((PropertyCallExp)(tcgOCLAtomConstraint.getOclReference())).isMarkedPre()){
        //Add property     
        if(!propertyThatHasNotAtPre.contains(toBeAdd))
View Full Code Here


        if(oVar.getType().getName().equalsIgnoreCase("Real"))
          result.append(".floatValue()");
      }
    }
    else if (tcgOCLAtomConstraint.getElement() instanceof Property) {  //class property
      Property oProp = (Property) tcgOCLAtomConstraint.getElement();
      result.append("oTestObject." + oProp.getName());
      if(oProp.getType().getName().equalsIgnoreCase("Integer"))
        result.append(".intValue()");
    }
    /*else if (tcgOCLAtomConstraint.getElement() instanceof EReferenceImpl) {
      EReferenceImpl oRef = (EReferenceImpl) tcgOCLAtomConstraint.getElement();
      Integer.valueOf(oRef.getDefaultValueLiteral());
View Full Code Here

   */
  public static Property findMatchingPropertyInContext(
      Property in_oSuperProperty,
      org.eclipse.uml2.uml.Class in_oContext)
  {
    Property oProperty = in_oContext.getAttribute(in_oSuperProperty.getName(), in_oSuperProperty.getType());
    if(oProperty == null)
    {
      for(Generalization oGeneralization : in_oContext.getGeneralizations())
      {
        if(oGeneralization.getGeneral() instanceof org.eclipse.uml2.uml.Class)
View Full Code Here

      return "";
    else
    {
      if(in_oProperty.getOwner() instanceof Property)
      {
        Property oProp = (Property)in_oProperty.getOwner();
        return in_oProperty.getName() + "." + getFullPropertyName(oProp, in_oType);
      }
      else
        return in_oProperty.getName();
    }
View Full Code Here

      {
        // nothing - variables do not have fixed values
      }
      else if(oPropExp.getElement() instanceof Property)
      {
        Property oProp = (Property)oPropExp.getElement();
        if(oProp.getDefaultValue() == null)
        {
          //System.err.println("error in getValue() for property "
          //    + oProp.getName());
          throw new Exception("error in getValue() for property "
              + oProp.getName());
        }
        else
        {
          String sValue = oProp.getDefaultValue().stringValue();
          return Double.valueOf(sValue).doubleValue();
        }
      }
      if(oPropExp.getElement() instanceof EReferenceImpl)
      {
View Full Code Here

        oObject = ((TCGOCLAtom)in_oExpression).getElement();
      else
        oObject = colObjects.get(0);
     
      if(oObject instanceof Property) {
        Property oProperty = (Property)oObject;
        if(TypeNameHelperClass.isBooleanTypeName(oProperty.getType().getName()))
          return true;
      }
      else if(oObject instanceof Parameter) {
        Parameter oParam = (Parameter)oObject;
        if(TypeNameHelperClass.isBooleanTypeName(oParam.getType().getName()))
View Full Code Here

      }
 
      if (oVar != null) {
        // nothing - variables do not have fixed values
      } else if (oPropExp.getElement() instanceof Property) {
        Property oProp = (Property) oPropExp.getElement();
        if (oProp.getDefaultValue() == null) {
          throw new Exception("error in getValue() for property "
              + oProp.getName());
        } else {
          String sValue = oProp.getDefaultValue().stringValue();
          return Double.valueOf(sValue).doubleValue();
        }
      }
      if (oPropExp.getElement() instanceof EReferenceImpl) {
        EReferenceImpl oRef = (EReferenceImpl) oPropExp.getElement();
View Full Code Here

      }
 
      if (oVar != null) {
        // nothing - variables do not have fixed values
      } else if (oPropExp.getElement() instanceof Property) {
        Property oProp = (Property) oPropExp.getElement();
        if (oProp.getDefaultValue() == null) {
          throw new Exception("error in getValue() for property "
              + oProp.getName());
        } else {
          String sValue = oProp.getDefaultValue().stringValue();
          return Double.valueOf(sValue).doubleValue();
        }
      }
      if (oPropExp.getElement() instanceof EReferenceImpl) {
        EReferenceImpl oRef = (EReferenceImpl) oPropExp.getElement();
View Full Code Here

      }
 
      if (oVar != null) {
        // nothing - variables do not have fixed values
      } else if (oPropExp.getElement() instanceof Property) {
        Property oProp = (Property) oPropExp.getElement();
        if (oProp.getDefaultValue() == null) {
          // nothing ... system attributes do not have to have fixed values, too
//          throw new Exception("error in getValue() for property "
//              + oProp.getName());
        } else {
          String sValue = oProp.getDefaultValue().stringValue();
          return Integer.valueOf(sValue).intValue();
        }
      }
      if (oPropExp.getElement() instanceof EReferenceImpl) {
        EReferenceImpl oRef = (EReferenceImpl) oPropExp.getElement();
View Full Code Here

      }
   
      if (oVar != null) {
        // nothing - variables do not have fixed values
      } else if (oPropExp.getElement() instanceof Property) {
        Property oProp = (Property) oPropExp.getElement();
        if (oProp.getDefaultValue() == null) {
//          throw new Exception("error in getValue() for property "
//              + oProp.getName());
          // if only a boolean element is referenced, then the meaning is "= true"
          return true;
        } else {
          String sValue = oProp.getDefaultValue().stringValue();
          return Boolean.parseBoolean(sValue);
        }
      }
      if (oPropExp.getElement() instanceof EReferenceImpl) {
        EReferenceImpl oRef = (EReferenceImpl) oPropExp.getElement();
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.uml.Property

Copyright © 2018 www.massapicom. 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.