Esempio n. 1
0
  public void relateAcrossR1013To(MessageArgument_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == IsSupertypeMessageArgument) return; // already related

    if (IsSupertypeMessageArgument != target) {

      Object oldKey = getInstanceKey();

      if (IsSupertypeMessageArgument != null) {

        IsSupertypeMessageArgument.clearBackPointerR1013To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "InformalArgument_c.relateAcrossR1013To(MessageArgument_c target)",
              "Relate performed across R1013 from Informal Argument to Message Argument without unrelate of prior instance.");
        }
      }

      IsSupertypeMessageArgument = target;
      m_arg_id = target.getArg_id();
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR1013To(this);
      target.addRef();
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_RELATED, this, target, "1013", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
  public void relateAcrossR674To(Bridge_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == IsAnInvocationOfBridge) return; // already related

    if (IsAnInvocationOfBridge != target) {

      Object oldKey = getInstanceKey();

      if (IsAnInvocationOfBridge != null) {

        IsAnInvocationOfBridge.clearBackPointerR674To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "BridgeInvocation_c.relateAcrossR674To(Bridge_c target)",
              "Relate performed across R674 from Bridge Invocation to Bridge without unrelate of prior instance.");
        }
      }

      IsAnInvocationOfBridge = target;
      m_brg_id = target.getBrg_id();
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR674To(this);
      target.addRef();
    }
  }
  public void relateAcrossR603To(Statement_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == IsSupertypeStatement) return; // already related

    if (IsSupertypeStatement != target) {

      Object oldKey = getInstanceKey();

      if (IsSupertypeStatement != null) {

        IsSupertypeStatement.clearBackPointerR603To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "AssignToMember_c.relateAcrossR603To(Statement_c target)",
              "Relate performed across R603 from Assign to Member to Statement without unrelate of prior instance.");
        }
      }

      IsSupertypeStatement = target;
      m_statement_id = target.getStatement_id();
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR603To(this);
      target.addRef();
    }
  }
  public void relateAcrossR801To(Value_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == IsSupertypeValue) return; // already related

    if (IsSupertypeValue != target) {

      Object oldKey = getInstanceKey();

      if (IsSupertypeValue != null) {

        IsSupertypeValue.clearBackPointerR801To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "TransientValueReference_c.relateAcrossR801To(Value_c target)",
              "Relate performed across R801 from Transient Value Reference to Value without unrelate of prior instance.");
        }
      }

      IsSupertypeValue = target;
      m_value_id = target.getValue_id();
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR801To(this);
      target.addRef();
    }
  }
  public void relateAcrossR689To(Value_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == WritesValue) return; // already related

    if (WritesValue != target) {

      Object oldKey = getInstanceKey();

      if (WritesValue != null) {

        WritesValue.clearBackPointerR689To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "AssignToMember_c.relateAcrossR689To(Value_c target)",
              "Relate performed across R689 from Assign to Member to Value without unrelate of prior instance.");
        }
      }

      WritesValue = target;
      m_l_value_id = target.getValue_id();
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR689To(this);
      target.addRef();
    }
  }
Esempio n. 6
0
  // end declare accessors
  public static void checkClassConsistency(ModelRoot modelRoot) {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "GraphNode", //$NON-NLS-1$
        " Operation entered: GraphNode::checkClassConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return;
    }
    Graphnode_c[] objs = Graphnode_c.GraphnodeInstances(modelRoot, null, false);

    for (int i = 0; i < objs.length; i++) {
      objs[i].checkConsistency();
    }
  }
  public void relateAcrossR518To(ModelClass_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == ModelClass) return; // already related

    if (ModelClass != target) {

      Object oldKey = getInstanceKey();

      if (ModelClass != null) {
        UmlProblem.removeXtUMLProblem(this, ModelClass);

        ModelClass.clearBackPointerR518To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "InstanceStateMachine_c.relateAcrossR518To(ModelClass_c target)",
              "Relate performed across R518 from Instance State Machine to Model Class without unrelate of prior instance.");
        }
      }

      ModelClass = target;
      if (IdAssigner.NULL_UUID.equals(target.getObj_id())) {
        // do not update cached value
      } else {
        // update cached value
        m_obj_id = target.getObj_idCachedValue();
      }
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR518To(this);
      target.addRef();
      UmlProblem.handleDanglingReference(this, target);
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_RELATED, this, target, "518", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
Esempio n. 8
0
  public void relateAcrossR301To(Graphelement_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == IsSupertypeGraphelement) return; // already related

    if (IsSupertypeGraphelement != target) {

      Object oldKey = getInstanceKey();

      if (IsSupertypeGraphelement != null) {

        IsSupertypeGraphelement.clearBackPointerR301To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofgraphics.log.println(
              ILogger.CONSISTENCY,
              "Graphnode_c.relateAcrossR301To(Graphelement_c target)",
              "Relate performed across R301 from GraphNode to GraphElement without unrelate of prior instance.");
        }
      }

      IsSupertypeGraphelement = target;
      if (IdAssigner.NULL_UUID.equals(target.getElementid())) {
        // do not update cached value
      } else {
        // update cached value
        m_elementid = target.getElementidCachedValue();
      }
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR301To(this);
      target.addRef();
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_RELATED, this, target, "301", "");
        Ooaofgraphics.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
Esempio n. 9
0
  public void relateAcrossR39To(DataType_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == ContainsDataType) return; // already related

    if (ContainsDataType != target) {

      Object oldKey = getInstanceKey();

      if (ContainsDataType != null) {

        ContainsDataType.clearBackPointerR39To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "DataTypeInPackage_c.relateAcrossR39To(DataType_c target)",
              "Relate performed across R39 from Data Type in Package to Data Type without unrelate of prior instance.");
        }
      }

      ContainsDataType = target;
      if (IdAssigner.NULL_UUID.equals(target.getDt_id())) {
        // do not update cached value
      } else {
        // update cached value
        m_dt_id = target.getDt_idCachedValue();
      }
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR39To(this);
      target.addRef();
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_RELATED, this, target, "39", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
  public void relateAcrossR4202To(Component_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == CanBeNestedInComponent) return; // already related

    if (CanBeNestedInComponent != target) {

      Object oldKey = getInstanceKey();

      if (CanBeNestedInComponent != null) {

        CanBeNestedInComponent.clearBackPointerR4202To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "ComponentInComponent_c.relateAcrossR4202To(Component_c target)",
              "Relate performed across R4202 from Component in Component to Component without unrelate of prior instance.");
        }
      }

      CanBeNestedInComponent = target;
      if (IdAssigner.NULL_UUID.equals(target.getId())) {
        // do not update cached value
      } else {
        // update cached value
        m_parent_id = target.getIdCachedValue();
      }
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR4202To(this);
      target.addRef();
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_RELATED, this, target, "4202", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Transient Value Reference", //$NON-NLS-1$
        " Operation entered: Transient Value Reference::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class TransientValueReference_c_test37419_c implements ClassQueryInterface_c {
      TransientValueReference_c_test37419_c(java.util.UUID p37420) {
        m_p37420 = p37420;
      }

      private java.util.UUID m_p37420;

      public boolean evaluate(Object candidate) {
        TransientValueReference_c selected = (TransientValueReference_c) candidate;
        boolean retval = false;
        retval = (selected.getValue_id().equals(m_p37420));
        return retval;
      }
    }

    TransientValueReference_c[] objs37418 =
        TransientValueReference_c.TransientValueReferenceInstances(
            modelRoot, new TransientValueReference_c_test37419_c(getValue_id()));

    if (((objs37418.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Transient Value Reference", //$NON-NLS-1$
            "Consistency: Object: Transient Value Reference: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs37418.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Transient Value Reference: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs37418.length),
            e);
      }
      retval = false;
    }

    if (((objs37418.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Transient Value Reference", //$NON-NLS-1$
            "Consistency: Object: Transient Value Reference: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs37418.length)
                + " Value_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Transient Value Reference: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs37418.length)
                + " Value_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Transient Value Reference is a subtype in association: rel.Numb = 801
    // The supertype class is: Value
    class Value_c_test37424_c implements ClassQueryInterface_c {
      Value_c_test37424_c(java.util.UUID p37425) {
        m_p37425 = p37425;
      }

      private java.util.UUID m_p37425;

      public boolean evaluate(Object candidate) {
        Value_c selected = (Value_c) candidate;
        boolean retval = false;
        retval = (selected.getValue_id().equals(m_p37425));
        return retval;
      }
    }

    Value_c[] objs37423 = Value_c.ValueInstances(modelRoot, new Value_c_test37424_c(getValue_id()));

    if (((objs37423.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Transient Value Reference", //$NON-NLS-1$
            "Consistency: Object: Transient Value Reference: Association: 801: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs37423.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Transient Value Reference: Association: 801: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs37423.length),
            e);
      }
      retval = false;
    }

    // Transient Value Reference is a referring class in association: rel.Numb = 805
    // The participating class is: Variable
    class Variable_c_test37427_c implements ClassQueryInterface_c {
      Variable_c_test37427_c(java.util.UUID p37428) {
        m_p37428 = p37428;
      }

      private java.util.UUID m_p37428;

      public boolean evaluate(Object candidate) {
        Variable_c selected = (Variable_c) candidate;
        boolean retval = false;
        retval = (selected.getVar_id().equals(m_p37428));
        return retval;
      }
    }

    Variable_c[] objs37426 =
        Variable_c.VariableInstances(modelRoot, new Variable_c_test37427_c(getVar_id()));

    // The participant is unconditional
    // The multiplicity of the participant is one
    if (((objs37426.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Transient Value Reference", //$NON-NLS-1$
            "Consistency: Object: Transient Value Reference: Association: 805: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs37426.length)
                + " Var_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Transient Value Reference: Association: 805: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs37426.length)
                + " Var_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    return retval;
  }
Esempio n. 12
0
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Data Type in Package", //$NON-NLS-1$
        " Operation entered: Data Type in Package::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class DataTypeInPackage_c_test55160_c implements ClassQueryInterface_c {
      DataTypeInPackage_c_test55160_c(java.util.UUID p55161, java.util.UUID p55162) {
        m_p55161 = p55161;
        m_p55162 = p55162;
      }

      private java.util.UUID m_p55161;
      private java.util.UUID m_p55162;

      public boolean evaluate(Object candidate) {
        DataTypeInPackage_c selected = (DataTypeInPackage_c) candidate;
        boolean retval = false;
        retval =
            (selected.getPackage_id().equals(m_p55161)) & (selected.getDt_id().equals(m_p55162));
        return retval;
      }
    }

    DataTypeInPackage_c[] objs55159 =
        DataTypeInPackage_c.DataTypeInPackageInstances(
            modelRoot, new DataTypeInPackage_c_test55160_c(getPackage_id(), getDt_id()));

    if (((objs55159.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Data Type in Package", //$NON-NLS-1$
            "Consistency: Object: Data Type in Package: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs55159.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Data Type in Package: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55159.length),
            e);
      }
      retval = false;
    }

    if (((objs55159.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Data Type in Package", //$NON-NLS-1$
            "Consistency: Object: Data Type in Package: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55159.length)
                + " Package_ID: "
                + "Not Printable"
                + " DT_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Data Type in Package: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55159.length)
                + " Package_ID: "
                + "Not Printable"
                + " DT_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Data Type in Package is a link class in association: rel.Numb = 39
    // Other side
    // The other side class in the association is: Data Type Package
    class DataTypePackage_c_test55166_c implements ClassQueryInterface_c {
      DataTypePackage_c_test55166_c(java.util.UUID p55167) {
        m_p55167 = p55167;
      }

      private java.util.UUID m_p55167;

      public boolean evaluate(Object candidate) {
        DataTypePackage_c selected = (DataTypePackage_c) candidate;
        boolean retval = false;
        retval = (selected.getPackage_id().equals(m_p55167));
        return retval;
      }
    }

    DataTypePackage_c[] objs55165 =
        DataTypePackage_c.DataTypePackageInstances(
            modelRoot, new DataTypePackage_c_test55166_c(getPackage_id()));

    if (((objs55165.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Data Type in Package", //$NON-NLS-1$
            "Consistency: Object: Data Type in Package: Association: 39: Cardinality of other side of link is greater than 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs55165.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Data Type in Package: Association: 39: Cardinality of other side of link is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55165.length),
            e);
      }
      retval = false;
    }

    return retval;
  }
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Component in Component", //$NON-NLS-1$
        " Operation entered: Component in Component::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class ComponentInComponent_c_test55677_c implements ClassQueryInterface_c {
      ComponentInComponent_c_test55677_c(java.util.UUID p55678) {
        m_p55678 = p55678;
      }

      private java.util.UUID m_p55678;

      public boolean evaluate(Object candidate) {
        ComponentInComponent_c selected = (ComponentInComponent_c) candidate;
        boolean retval = false;
        retval = (selected.getId().equals(m_p55678));
        return retval;
      }
    }

    ComponentInComponent_c[] objs55676 =
        ComponentInComponent_c.ComponentInComponentInstances(
            modelRoot, new ComponentInComponent_c_test55677_c(getId()));

    if (((objs55676.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Component in Component", //$NON-NLS-1$
            "Consistency: Object: Component in Component: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs55676.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Component in Component: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55676.length),
            e);
      }
      retval = false;
    }

    if (((objs55676.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Component in Component", //$NON-NLS-1$
            "Consistency: Object: Component in Component: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55676.length)
                + " Id: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Component in Component: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55676.length)
                + " Id: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Component in Component is a referring class in association: rel.Numb = 4202
    // The participating class is: Component
    class Component_c_test55682_c implements ClassQueryInterface_c {
      Component_c_test55682_c(java.util.UUID p55683) {
        m_p55683 = p55683;
      }

      private java.util.UUID m_p55683;

      public boolean evaluate(Object candidate) {
        Component_c selected = (Component_c) candidate;
        boolean retval = false;
        retval = (selected.getId().equals(m_p55683));
        return retval;
      }
    }

    Component_c[] objs55681 =
        Component_c.ComponentInstances(modelRoot, new Component_c_test55682_c(getParent_id()));

    // The participant is unconditional
    // The multiplicity of the participant is one
    if (((objs55681.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Component in Component", //$NON-NLS-1$
            "Consistency: Object: Component in Component: Association: 4202: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55681.length)
                + " Parent_Id: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Component in Component: Association: 4202: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55681.length)
                + " Parent_Id: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Component in Component is a participating class in association: rel.Numb = 4203
    // Object: Component
    class Component_c_test55685_c implements ClassQueryInterface_c {
      Component_c_test55685_c(java.util.UUID p55686) {
        m_p55686 = p55686;
      }

      private java.util.UUID m_p55686;

      public boolean evaluate(Object candidate) {
        Component_c selected = (Component_c) candidate;
        boolean retval = false;
        retval = (selected.getNestedcomponent_id().equals(m_p55686));
        return retval;
      }
    }

    Component_c[] objs55684 =
        Component_c.ComponentInstances(modelRoot, new Component_c_test55685_c(getId()));

    if (((objs55684.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Component in Component", //$NON-NLS-1$
            "Consistency: Object: Component in Component: Association: 4203: Cardinality of a formalizer is not equal to one. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs55684.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Component in Component: Association: 4203: Cardinality of a formalizer is not equal to one. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs55684.length),
            e);
      }
      retval = false;
    }

    return retval;
  }
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Element In Move", //$NON-NLS-1$
        " Operation entered: Element In Move::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class ElementInMove_c_test22330_c implements ClassQueryInterface_c {
      ElementInMove_c_test22330_c(java.util.UUID p22331, java.util.UUID p22332) {
        m_p22331 = p22331;
        m_p22332 = p22332;
      }

      private java.util.UUID m_p22331;
      private java.util.UUID m_p22332;

      public boolean evaluate(Object candidate) {
        ElementInMove_c selected = (ElementInMove_c) candidate;
        boolean retval = false;
        retval =
            (selected.getElementid().equals(m_p22331)) & (selected.getDiagramid().equals(m_p22332));
        return retval;
      }
    }

    ElementInMove_c[] objs22329 =
        ElementInMove_c.ElementInMoveInstances(
            modelRoot, new ElementInMove_c_test22330_c(getElementid(), getDiagramid()));

    if (((objs22329.length) == 0)) {

      if (CanvasPlugin.getDefault().isDebugging()) {
        Ooaofgraphics.log.println(
            ILogger.CONSISTENCY,
            "Element In Move", //$NON-NLS-1$
            "Consistency: Object: Element In Move: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs22329.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CanvasPlugin.logError(
            "Consistency: Object: Element In Move: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs22329.length),
            e);
      }
      retval = false;
    }

    if (((objs22329.length) > 1)) {

      if (CanvasPlugin.getDefault().isDebugging()) {
        Ooaofgraphics.log.println(
            ILogger.CONSISTENCY,
            "Element In Move", //$NON-NLS-1$
            "Consistency: Object: Element In Move: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs22329.length)
                + " elementId: "
                + "Not Printable"
                + " diagramId: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CanvasPlugin.logError(
            "Consistency: Object: Element In Move: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs22329.length)
                + " elementId: "
                + "Not Printable"
                + " diagramId: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Element In Move is a link class in association: rel.Numb = 25
    // Other side
    // The other side class in the association is: Model
    class Model_c_test22336_c implements ClassQueryInterface_c {
      Model_c_test22336_c(java.util.UUID p22337) {
        m_p22337 = p22337;
      }

      private java.util.UUID m_p22337;

      public boolean evaluate(Object candidate) {
        Model_c selected = (Model_c) candidate;
        boolean retval = false;
        retval = (selected.getDiagramid().equals(m_p22337));
        return retval;
      }
    }

    Model_c[] objs22335 =
        Model_c.ModelInstances(modelRoot, new Model_c_test22336_c(getDiagramid()));

    if (((objs22335.length) > 1)) {

      if (CanvasPlugin.getDefault().isDebugging()) {
        Ooaofgraphics.log.println(
            ILogger.CONSISTENCY,
            "Element In Move", //$NON-NLS-1$
            "Consistency: Object: Element In Move: Association: 25: Cardinality of other side of link is greater than 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs22335.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CanvasPlugin.logError(
            "Consistency: Object: Element In Move: Association: 25: Cardinality of other side of link is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs22335.length),
            e);
      }
      retval = false;
    }

    return retval;
  }
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Instance State Machine", //$NON-NLS-1$
        " Operation entered: Instance State Machine::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class InstanceStateMachine_c_test39208_c implements ClassQueryInterface_c {
      InstanceStateMachine_c_test39208_c(java.util.UUID p39209) {
        m_p39209 = p39209;
      }

      private java.util.UUID m_p39209;

      public boolean evaluate(Object candidate) {
        InstanceStateMachine_c selected = (InstanceStateMachine_c) candidate;
        boolean retval = false;
        retval = (selected.getSm_id().equals(m_p39209));
        return retval;
      }
    }

    InstanceStateMachine_c[] objs39207 =
        InstanceStateMachine_c.InstanceStateMachineInstances(
            modelRoot, new InstanceStateMachine_c_test39208_c(getSm_id()));

    if (((objs39207.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Instance State Machine", //$NON-NLS-1$
            "Consistency: Object: Instance State Machine: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs39207.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Instance State Machine: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39207.length),
            e);
      }
      retval = false;
    }

    if (((objs39207.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Instance State Machine", //$NON-NLS-1$
            "Consistency: Object: Instance State Machine: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39207.length)
                + " SM_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Instance State Machine: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39207.length)
                + " SM_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Instance State Machine is a subtype in association: rel.Numb = 517
    // The supertype class is: State Machine
    class StateMachine_c_test39213_c implements ClassQueryInterface_c {
      StateMachine_c_test39213_c(java.util.UUID p39214) {
        m_p39214 = p39214;
      }

      private java.util.UUID m_p39214;

      public boolean evaluate(Object candidate) {
        StateMachine_c selected = (StateMachine_c) candidate;
        boolean retval = false;
        retval = (selected.getSm_id().equals(m_p39214));
        return retval;
      }
    }

    StateMachine_c[] objs39212 =
        StateMachine_c.StateMachineInstances(modelRoot, new StateMachine_c_test39213_c(getSm_id()));

    if (((objs39212.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Instance State Machine", //$NON-NLS-1$
            "Consistency: Object: Instance State Machine: Association: 517: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs39212.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Instance State Machine: Association: 517: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39212.length),
            e);
      }
      retval = false;
    }

    // Instance State Machine is a referring class in association: rel.Numb = 518
    // The participating class is: Model Class
    class ModelClass_c_test39216_c implements ClassQueryInterface_c {
      ModelClass_c_test39216_c(java.util.UUID p39217) {
        m_p39217 = p39217;
      }

      private java.util.UUID m_p39217;

      public boolean evaluate(Object candidate) {
        ModelClass_c selected = (ModelClass_c) candidate;
        boolean retval = false;
        retval = (selected.getObj_id().equals(m_p39217));
        return retval;
      }
    }

    ModelClass_c[] objs39215 =
        ModelClass_c.ModelClassInstances(modelRoot, new ModelClass_c_test39216_c(getObj_id()));

    // The participant is unconditional
    // The multiplicity of the participant is one
    if (((objs39215.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Instance State Machine", //$NON-NLS-1$
            "Consistency: Object: Instance State Machine: Association: 518: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39215.length)
                + " Obj_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Instance State Machine: Association: 518: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39215.length)
                + " Obj_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    return retval;
  }
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Component Result Set", //$NON-NLS-1$
        " Operation entered: Component Result Set::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class ComponentResultSet_c_test39974_c implements ClassQueryInterface_c {
      ComponentResultSet_c_test39974_c(String p39975, int p39976, java.util.UUID p39977) {
        m_p39975 = p39975;
        m_p39976 = p39976;
        m_p39977 = p39977;
      }

      private String m_p39975;
      private int m_p39976;
      private java.util.UUID m_p39977;

      public boolean evaluate(Object candidate) {
        ComponentResultSet_c selected = (ComponentResultSet_c) candidate;
        boolean retval = false;
        retval =
            (selected.getName().equals(m_p39975))
                & (selected.getType() == (m_p39976))
                & (selected.getId().equals(m_p39977));
        return retval;
      }
    }

    ComponentResultSet_c[] objs39973 =
        ComponentResultSet_c.ComponentResultSetInstances(
            modelRoot, new ComponentResultSet_c_test39974_c(getName(), getType(), getId()));

    if (((objs39973.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Component Result Set", //$NON-NLS-1$
            "Consistency: Object: Component Result Set: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs39973.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Component Result Set: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39973.length),
            e);
      }
      retval = false;
    }

    if (((objs39973.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Component Result Set", //$NON-NLS-1$
            "Consistency: Object: Component Result Set: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39973.length)
                + " Name: "
                + getName()
                + " Type: "
                + Integer.toString(getType())
                + " Id: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Component Result Set: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39973.length)
                + " Name: "
                + getName()
                + " Type: "
                + Integer.toString(getType())
                + " Id: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Component Result Set is a referring class in association: rel.Numb = 8007
    // The participating class is: Component
    class Component_c_test39981_c implements ClassQueryInterface_c {
      Component_c_test39981_c(java.util.UUID p39982) {
        m_p39982 = p39982;
      }

      private java.util.UUID m_p39982;

      public boolean evaluate(Object candidate) {
        Component_c selected = (Component_c) candidate;
        boolean retval = false;
        retval = (selected.getId().equals(m_p39982));
        return retval;
      }
    }

    Component_c[] objs39980 =
        Component_c.ComponentInstances(modelRoot, new Component_c_test39981_c(getId()));

    // The participant is unconditional
    // The multiplicity of the participant is one
    if (((objs39980.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Component Result Set", //$NON-NLS-1$
            "Consistency: Object: Component Result Set: Association: 8007: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39980.length)
                + " Id: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Component Result Set: Association: 8007: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39980.length)
                + " Id: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Component Result Set is a participating class in association: rel.Numb = 8008
    // Object: Component Visibility
    return retval;
  }
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Description Query", //$NON-NLS-1$
        " Operation entered: Description Query::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class DescriptionQuery_c_test39592_c implements ClassQueryInterface_c {
      DescriptionQuery_c_test39592_c(java.util.UUID p39593) {
        m_p39593 = p39593;
      }

      private java.util.UUID m_p39593;

      public boolean evaluate(Object candidate) {
        DescriptionQuery_c selected = (DescriptionQuery_c) candidate;
        boolean retval = false;
        retval = (selected.getId().equals(m_p39593));
        return retval;
      }
    }

    DescriptionQuery_c[] objs39591 =
        DescriptionQuery_c.DescriptionQueryInstances(
            modelRoot, new DescriptionQuery_c_test39592_c(getId()));

    if (((objs39591.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Description Query", //$NON-NLS-1$
            "Consistency: Object: Description Query: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs39591.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Description Query: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39591.length),
            e);
      }
      retval = false;
    }

    if (((objs39591.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Description Query", //$NON-NLS-1$
            "Consistency: Object: Description Query: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39591.length)
                + " Id: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Description Query: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39591.length)
                + " Id: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Description Query is a subtype in association: rel.Numb = 9600
    // The supertype class is: Query
    class Query_c_test39597_c implements ClassQueryInterface_c {
      Query_c_test39597_c(java.util.UUID p39598) {
        m_p39598 = p39598;
      }

      private java.util.UUID m_p39598;

      public boolean evaluate(Object candidate) {
        Query_c selected = (Query_c) candidate;
        boolean retval = false;
        retval = (selected.getId().equals(m_p39598));
        return retval;
      }
    }

    Query_c[] objs39596 = Query_c.QueryInstances(modelRoot, new Query_c_test39597_c(getId()));

    if (((objs39596.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Description Query", //$NON-NLS-1$
            "Consistency: Object: Description Query: Association: 9600: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs39596.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Description Query: Association: 9600: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39596.length),
            e);
      }
      retval = false;
    }

    return retval;
  }
Esempio n. 18
0
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "GraphNode", //$NON-NLS-1$
        " Operation entered: GraphNode::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class Graphnode_c_test21773_c implements ClassQueryInterface_c {
      Graphnode_c_test21773_c(java.util.UUID p21774) {
        m_p21774 = p21774;
      }

      private java.util.UUID m_p21774;

      public boolean evaluate(Object candidate) {
        Graphnode_c selected = (Graphnode_c) candidate;
        boolean retval = false;
        retval = (selected.getElementid().equals(m_p21774));
        return retval;
      }
    }

    Graphnode_c[] objs21772 =
        Graphnode_c.GraphnodeInstances(modelRoot, new Graphnode_c_test21773_c(getElementid()));

    if (((objs21772.length) == 0)) {

      if (CanvasPlugin.getDefault().isDebugging()) {
        Ooaofgraphics.log.println(
            ILogger.CONSISTENCY,
            "GraphNode", //$NON-NLS-1$
            "Consistency: Object: GraphNode: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs21772.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CanvasPlugin.logError(
            "Consistency: Object: GraphNode: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs21772.length),
            e);
      }
      retval = false;
    }

    if (((objs21772.length) > 1)) {

      if (CanvasPlugin.getDefault().isDebugging()) {
        Ooaofgraphics.log.println(
            ILogger.CONSISTENCY,
            "GraphNode", //$NON-NLS-1$
            "Consistency: Object: GraphNode: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs21772.length)
                + " elementId: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CanvasPlugin.logError(
            "Consistency: Object: GraphNode: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs21772.length)
                + " elementId: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // GraphNode is a subtype in association: rel.Numb = 301
    // The supertype class is: GraphElement
    class Graphelement_c_test21778_c implements ClassQueryInterface_c {
      Graphelement_c_test21778_c(java.util.UUID p21779) {
        m_p21779 = p21779;
      }

      private java.util.UUID m_p21779;

      public boolean evaluate(Object candidate) {
        Graphelement_c selected = (Graphelement_c) candidate;
        boolean retval = false;
        retval = (selected.getElementid().equals(m_p21779));
        return retval;
      }
    }

    Graphelement_c[] objs21777 =
        Graphelement_c.GraphelementInstances(
            modelRoot, new Graphelement_c_test21778_c(getElementid()));

    if (((objs21777.length) != 1)) {

      if (CanvasPlugin.getDefault().isDebugging()) {
        Ooaofgraphics.log.println(
            ILogger.CONSISTENCY,
            "GraphNode", //$NON-NLS-1$
            "Consistency: Object: GraphNode: Association: 301: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs21777.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CanvasPlugin.logError(
            "Consistency: Object: GraphNode: Association: 301: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs21777.length),
            e);
      }
      retval = false;
    }

    // Supertype: rel.Numb = 19
    int objs21780 = 0;
    // Subtype Object: Shape
    class Shape_c_test21781_c implements ClassQueryInterface_c {
      Shape_c_test21781_c(java.util.UUID p21782) {
        m_p21782 = p21782;
      }

      private java.util.UUID m_p21782;

      public boolean evaluate(Object candidate) {
        Shape_c selected = (Shape_c) candidate;
        boolean retval = false;
        retval = (selected.getElementid().equals(m_p21782));
        return retval;
      }
    }

    Shape_c[] objs21783 =
        Shape_c.ShapeInstances(modelRoot, new Shape_c_test21781_c(getElementid()));

    objs21780 = objs21780 + objs21783.length;
    // Subtype Object: Floating Text
    class FloatingText_c_test21784_c implements ClassQueryInterface_c {
      FloatingText_c_test21784_c(java.util.UUID p21785) {
        m_p21785 = p21785;
      }

      private java.util.UUID m_p21785;

      public boolean evaluate(Object candidate) {
        FloatingText_c selected = (FloatingText_c) candidate;
        boolean retval = false;
        retval = (selected.getElementid().equals(m_p21785));
        return retval;
      }
    }

    FloatingText_c[] objs21786 =
        FloatingText_c.FloatingTextInstances(
            modelRoot, new FloatingText_c_test21784_c(getElementid()));

    objs21780 = objs21780 + objs21786.length;
    if (objs21780 != 1) {

      if (CanvasPlugin.getDefault().isDebugging()) {
        Ooaofgraphics.log.println(
            ILogger.CONSISTENCY,
            "GraphNode", //$NON-NLS-1$
            "Consistency: Object: GraphNode: Association: 19: Cardinality of subtype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs21780)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CanvasPlugin.logError(
            "Consistency: Object: GraphNode: Association: 19: Cardinality of subtype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs21780),
            e);
      }
      retval = false;
    }

    return retval;
  }
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Assign to Member", //$NON-NLS-1$
        " Operation entered: Assign to Member::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class AssignToMember_c_test40732_c implements ClassQueryInterface_c {
      AssignToMember_c_test40732_c(java.util.UUID p40733) {
        m_p40733 = p40733;
      }

      private java.util.UUID m_p40733;

      public boolean evaluate(Object candidate) {
        AssignToMember_c selected = (AssignToMember_c) candidate;
        boolean retval = false;
        retval = (selected.getStatement_id().equals(m_p40733));
        return retval;
      }
    }

    AssignToMember_c[] objs40731 =
        AssignToMember_c.AssignToMemberInstances(
            modelRoot, new AssignToMember_c_test40732_c(getStatement_id()));

    if (((objs40731.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Assign to Member", //$NON-NLS-1$
            "Consistency: Object: Assign to Member: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs40731.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Assign to Member: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40731.length),
            e);
      }
      retval = false;
    }

    if (((objs40731.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Assign to Member", //$NON-NLS-1$
            "Consistency: Object: Assign to Member: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40731.length)
                + " Statement_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Assign to Member: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40731.length)
                + " Statement_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Assign to Member is a subtype in association: rel.Numb = 603
    // The supertype class is: Statement
    class Statement_c_test40737_c implements ClassQueryInterface_c {
      Statement_c_test40737_c(java.util.UUID p40738) {
        m_p40738 = p40738;
      }

      private java.util.UUID m_p40738;

      public boolean evaluate(Object candidate) {
        Statement_c selected = (Statement_c) candidate;
        boolean retval = false;
        retval = (selected.getStatement_id().equals(m_p40738));
        return retval;
      }
    }

    Statement_c[] objs40736 =
        Statement_c.StatementInstances(modelRoot, new Statement_c_test40737_c(getStatement_id()));

    if (((objs40736.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Assign to Member", //$NON-NLS-1$
            "Consistency: Object: Assign to Member: Association: 603: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs40736.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Assign to Member: Association: 603: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40736.length),
            e);
      }
      retval = false;
    }

    // Assign to Member is a referring class in association: rel.Numb = 609
    // The participating class is: Value
    class Value_c_test40740_c implements ClassQueryInterface_c {
      Value_c_test40740_c(java.util.UUID p40741) {
        m_p40741 = p40741;
      }

      private java.util.UUID m_p40741;

      public boolean evaluate(Object candidate) {
        Value_c selected = (Value_c) candidate;
        boolean retval = false;
        retval = (selected.getValue_id().equals(m_p40741));
        return retval;
      }
    }

    Value_c[] objs40739 =
        Value_c.ValueInstances(modelRoot, new Value_c_test40740_c(getR_value_id()));

    // The participant is unconditional
    // The multiplicity of the participant is one
    if (((objs40739.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Assign to Member", //$NON-NLS-1$
            "Consistency: Object: Assign to Member: Association: 609: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40739.length)
                + " r_Value_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Assign to Member: Association: 609: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40739.length)
                + " r_Value_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Assign to Member is a referring class in association: rel.Numb = 689
    // The participating class is: Value
    class Value_c_test40743_c implements ClassQueryInterface_c {
      Value_c_test40743_c(java.util.UUID p40744) {
        m_p40744 = p40744;
      }

      private java.util.UUID m_p40744;

      public boolean evaluate(Object candidate) {
        Value_c selected = (Value_c) candidate;
        boolean retval = false;
        retval = (selected.getValue_id().equals(m_p40744));
        return retval;
      }
    }

    Value_c[] objs40742 =
        Value_c.ValueInstances(modelRoot, new Value_c_test40743_c(getL_value_id()));

    // The participant is unconditional
    // The multiplicity of the participant is one
    if (((objs40742.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Assign to Member", //$NON-NLS-1$
            "Consistency: Object: Assign to Member: Association: 689: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40742.length)
                + " l_Value_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Assign to Member: Association: 689: Cardinality of a participant is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40742.length)
                + " l_Value_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    return retval;
  }
Esempio n. 20
0
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Informal Argument", //$NON-NLS-1$
        " Operation entered: Informal Argument::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class InformalArgument_c_test39587_c implements ClassQueryInterface_c {
      InformalArgument_c_test39587_c(java.util.UUID p39588) {
        m_p39588 = p39588;
      }

      private java.util.UUID m_p39588;

      public boolean evaluate(Object candidate) {
        InformalArgument_c selected = (InformalArgument_c) candidate;
        boolean retval = false;
        retval = (selected.getArg_id().equals(m_p39588));
        return retval;
      }
    }

    InformalArgument_c[] objs39586 =
        InformalArgument_c.InformalArgumentInstances(
            modelRoot, new InformalArgument_c_test39587_c(getArg_id()));

    if (((objs39586.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Informal Argument", //$NON-NLS-1$
            "Consistency: Object: Informal Argument: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs39586.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Informal Argument: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39586.length),
            e);
      }
      retval = false;
    }

    if (((objs39586.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Informal Argument", //$NON-NLS-1$
            "Consistency: Object: Informal Argument: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39586.length)
                + " Arg_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Informal Argument: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39586.length)
                + " Arg_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Informal Argument is a subtype in association: rel.Numb = 1013
    // The supertype class is: Message Argument
    class MessageArgument_c_test39592_c implements ClassQueryInterface_c {
      MessageArgument_c_test39592_c(java.util.UUID p39593) {
        m_p39593 = p39593;
      }

      private java.util.UUID m_p39593;

      public boolean evaluate(Object candidate) {
        MessageArgument_c selected = (MessageArgument_c) candidate;
        boolean retval = false;
        retval = (selected.getArg_id().equals(m_p39593));
        return retval;
      }
    }

    MessageArgument_c[] objs39591 =
        MessageArgument_c.MessageArgumentInstances(
            modelRoot, new MessageArgument_c_test39592_c(getArg_id()));

    if (((objs39591.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Informal Argument", //$NON-NLS-1$
            "Consistency: Object: Informal Argument: Association: 1013: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs39591.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Informal Argument: Association: 1013: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs39591.length),
            e);
      }
      retval = false;
    }

    return retval;
  }
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Bridge Invocation", //$NON-NLS-1$
        " Operation entered: Bridge Invocation::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class BridgeInvocation_c_test40375_c implements ClassQueryInterface_c {
      BridgeInvocation_c_test40375_c(java.util.UUID p40376) {
        m_p40376 = p40376;
      }

      private java.util.UUID m_p40376;

      public boolean evaluate(Object candidate) {
        BridgeInvocation_c selected = (BridgeInvocation_c) candidate;
        boolean retval = false;
        retval = (selected.getStatement_id().equals(m_p40376));
        return retval;
      }
    }

    BridgeInvocation_c[] objs40374 =
        BridgeInvocation_c.BridgeInvocationInstances(
            modelRoot, new BridgeInvocation_c_test40375_c(getStatement_id()));

    if (((objs40374.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Bridge Invocation", //$NON-NLS-1$
            "Consistency: Object: Bridge Invocation: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs40374.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Bridge Invocation: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40374.length),
            e);
      }
      retval = false;
    }

    if (((objs40374.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Bridge Invocation", //$NON-NLS-1$
            "Consistency: Object: Bridge Invocation: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40374.length)
                + " Statement_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Bridge Invocation: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40374.length)
                + " Statement_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Bridge Invocation is a subtype in association: rel.Numb = 603
    // The supertype class is: Statement
    class Statement_c_test40380_c implements ClassQueryInterface_c {
      Statement_c_test40380_c(java.util.UUID p40381) {
        m_p40381 = p40381;
      }

      private java.util.UUID m_p40381;

      public boolean evaluate(Object candidate) {
        Statement_c selected = (Statement_c) candidate;
        boolean retval = false;
        retval = (selected.getStatement_id().equals(m_p40381));
        return retval;
      }
    }

    Statement_c[] objs40379 =
        Statement_c.StatementInstances(modelRoot, new Statement_c_test40380_c(getStatement_id()));

    if (((objs40379.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Bridge Invocation", //$NON-NLS-1$
            "Consistency: Object: Bridge Invocation: Association: 603: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs40379.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Bridge Invocation: Association: 603: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40379.length),
            e);
      }
      retval = false;
    }

    // Bridge Invocation is a referring class in association: rel.Numb = 674
    // The participating class is: Bridge
    class Bridge_c_test40383_c implements ClassQueryInterface_c {
      Bridge_c_test40383_c(java.util.UUID p40384) {
        m_p40384 = p40384;
      }

      private java.util.UUID m_p40384;

      public boolean evaluate(Object candidate) {
        Bridge_c selected = (Bridge_c) candidate;
        boolean retval = false;
        retval = (selected.getBrg_id().equals(m_p40384));
        return retval;
      }
    }

    Bridge_c[] objs40382 =
        Bridge_c.BridgeInstances(modelRoot, new Bridge_c_test40383_c(getBrg_id()));

    if (((objs40382.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Bridge Invocation", //$NON-NLS-1$
            "Consistency: Object: Bridge Invocation: Association: 674: Cardinality of a participant is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40382.length)
                + " Brg_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Bridge Invocation: Association: 674: Cardinality of a participant is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40382.length)
                + " Brg_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Bridge Invocation is a participating class in association: rel.Numb = 628
    // Object: Actual Parameter
    return retval;
  }