public void batchRelate(
      ModelRoot modelRoot, boolean relateProxies, boolean notifyChanges, boolean searchAllRoots) {
    InstanceList instances = null;
    ModelRoot baseRoot = modelRoot;

    // R9600
    Query_c relInst39590 =
        (Query_c) baseRoot.getInstanceList(Query_c.class).get(new Object[] {m_id});
    // if there was no local element, check for any global elements
    // failing that proceed to check other model roots
    if (relInst39590 == null) {
      relInst39590 =
          (Query_c)
              Ooaofooa.getDefaultInstance().getInstanceList(Query_c.class).get(new Object[] {m_id});
    }
    if (relInst39590 == null && searchAllRoots && !baseRoot.isCompareRoot()) {
      Ooaofooa[] roots = Ooaofooa.getInstances();
      for (int i = 0; i < roots.length; i++) {
        if (roots[i].isCompareRoot()) {
          // never use elements from any compare root
          continue;
        }
        relInst39590 = (Query_c) roots[i].getInstanceList(Query_c.class).get(new Object[] {m_id});
        if (relInst39590 != null) break;
      }
    }
    // synchronized
    if (relInst39590 != null) {
      if (relateProxies || !isProxy() || (inSameComponent(this, relInst39590) && !isProxy())) {
        relInst39590.relateAcrossR9600To(this, notifyChanges);
      }
    }
  }
  // declare transform functions
  public void Dispose() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Component Result Set",
        " Operation entered: ComponentResultSet::Dispose");
    final ModelRoot modelRoot = getModelRoot();
    Component_c v_component = Component_c.getOneC_COnR8007(this);

    ComponentVisibility_c[] v_elemVis = ComponentVisibility_c.getManyPE_CVSsOnR8008(this);

    ComponentVisibility_c v_elemV = null;
    for (int i37247 = 0; i37247 < v_elemVis.length; i37247++) {
      v_elemV = v_elemVis[i37247];

      PackageableElement_c v_pe = PackageableElement_c.getOnePE_PEOnR8004(v_elemV);

      if (v_elemV != null) {
        v_elemV.unrelateAcrossR8004From(v_component);
        v_elemV.unrelateAcrossR8004From(v_pe);
      } else {
        Throwable t = new Throwable();
        t.fillInStackTrace();
        CorePlugin.logError("Unrelate using attempted on null link class instance.", t);
      }

      this.unrelateAcrossR8008From(v_elemV);

      if (v_elemV != null) {
        // get the location of this element in the instance list
        // before deleting
        if (v_elemV.delete()) {
          Ooaofooa.getDefaultInstance()
              .fireModelElementDeleted(
                  new BaseModelDelta(Modeleventnotification_c.DELTA_DELETE, v_elemV));
        }
      } else {
        Throwable t = new Throwable();
        t.fillInStackTrace();
        CorePlugin.logError("Delete attempted on null instance.", t);
      }
    }

    this.unrelateAcrossR8007From(v_component);

    if (delete()) {
      Ooaofooa.getDefaultInstance()
          .fireModelElementDeleted(new BaseModelDelta(Modeleventnotification_c.DELTA_DELETE, this));
    }
  } // End dispose
Exemplo n.º 3
0
  public void batchRelate(
      ModelRoot modelRoot, boolean relateProxies, boolean notifyChanges, boolean searchAllRoots) {
    InstanceList instances = null;
    ModelRoot baseRoot = modelRoot;

    // R301
    Graphelement_c relInst21771 =
        (Graphelement_c)
            baseRoot.getInstanceList(Graphelement_c.class).get(new Object[] {m_elementid});
    // if there was no local element, check for any global elements
    // failing that proceed to check other model roots
    if (relInst21771 == null) {
      relInst21771 =
          (Graphelement_c)
              Ooaofooa.getDefaultInstance()
                  .getInstanceList(Graphelement_c.class)
                  .get(new Object[] {m_elementid});
    }
    // synchronized
    if (relInst21771 != null) {
      if (relateProxies || !isProxy() || (inSameComponent(this, relInst21771) && !isProxy())) {
        relInst21771.relateAcrossR301To(this, notifyChanges);
      }
    }
  }
  public void unrelateAcrossR518From(ModelClass_c target, boolean notifyChanges) {
    if (target == null) return;

    if (ModelClass == null) return; // already unrelated

    if (target != ModelClass) {
      Exception e = new Exception();
      e.fillInStackTrace();
      CorePlugin.logError("Tried to unrelate from non-related instance across R518", e);
      return;
    }

    if (target != null) {
      target.clearBackPointerR518To(this);
    }

    if (ModelClass != null) {

      m_obj_id = ModelClass.getObj_id();
      if (IdAssigner.NULL_UUID.equals(m_obj_id)) {
        m_obj_id = ModelClass.getObj_idCachedValue();
      }
      ModelClass = null;
      target.removeRef();
      UmlProblem.removeXtUMLProblem(this, target);
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_UNRELATED, this, target, "518", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
Exemplo n.º 5
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);
      }
    }
  }
Exemplo n.º 6
0
  public void unrelateAcrossR39From(DataType_c target, boolean notifyChanges) {
    if (target == null) return;

    if (ContainsDataType == null) return; // already unrelated

    if (target != ContainsDataType) {
      Exception e = new Exception();
      e.fillInStackTrace();
      CorePlugin.logError("Tried to unrelate from non-related instance across R39", e);
      return;
    }

    if (target != null) {
      target.clearBackPointerR39To(this);
    }

    if (ContainsDataType != null) {

      m_dt_id = ContainsDataType.getDt_id();
      if (IdAssigner.NULL_UUID.equals(m_dt_id)) {
        m_dt_id = ContainsDataType.getDt_idCachedValue();
      }
      ContainsDataType = null;
      target.removeRef();
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_UNRELATED, this, target, "39", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
Exemplo n.º 7
0
  public void unrelateAcrossR1013From(MessageArgument_c target, boolean notifyChanges) {
    if (target == null) return;

    if (IsSupertypeMessageArgument == null) return; // already unrelated

    if (target != IsSupertypeMessageArgument) {
      Exception e = new Exception();
      e.fillInStackTrace();
      CorePlugin.logError("Tried to unrelate from non-related instance across R1013", e);
      return;
    }

    if (target != null) {
      target.clearBackPointerR1013To(this);
    }

    if (IsSupertypeMessageArgument != null) {

      m_arg_id = IsSupertypeMessageArgument.getArg_id();
      IsSupertypeMessageArgument = null;
      target.removeRef();
      if (notifyChanges) {
        RelationshipChangeModelDelta change =
            new RelationshipChangeModelDelta(
                Modeleventnotification_c.DELTA_ELEMENT_UNRELATED, this, target, "1013", "");
        Ooaofooa.getDefaultInstance().fireModelElementRelationChanged(change);
      }
    }
  }
  public void setType(int newValue) {
    if (m_type == newValue) {
      return;
    }
    AttributeChangeModelDelta change =
        new AttributeChangeModelDelta(
            Modeleventnotification_c.DELTA_ATTRIBUTE_CHANGE,
            this,
            "Type",
            new Integer(m_type),
            new Integer(newValue),
            false);

    m_type = newValue;
    Ooaofooa.getDefaultInstance().fireModelElementAttributeChanged(change);
  }
  // declare transform functions
  public String Get_name() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Instance State Machine",
        " Operation entered: InstanceStateMachine::Get_name");
    final ModelRoot modelRoot = getModelRoot();
    ModelClass_c v_obj = ModelClass_c.getOneO_OBJOnR518(this);

    if (((v_obj != null))) {

      return v_obj.getName();

    } else {

      return Ooaofooa.Getorphanedelementname(modelRoot);
    }
  } // End get_name
 public void setName(String newValue) {
   if (newValue != null) {
     if (newValue.equals(m_name)) {
       return;
     }
   } else if (m_name != null) {
     if (m_name.equals(newValue)) {
       return;
     }
   } else {
     return;
   }
   AttributeChangeModelDelta change =
       new AttributeChangeModelDelta(
           Modeleventnotification_c.DELTA_ATTRIBUTE_CHANGE, this, "Name", m_name, newValue, false);
   m_name = newValue;
   Ooaofooa.getDefaultInstance().fireModelElementAttributeChanged(change);
 }
 public void setId(java.util.UUID newValue) {
   if (newValue != null) {
     if (newValue.equals(m_id)) {
       return;
     }
   } else if (m_id != null) {
     if (m_id.equals(newValue)) {
       return;
     }
   } else {
     return;
   }
   AttributeChangeModelDelta change =
       new AttributeChangeModelDelta(
           Modeleventnotification_c.DELTA_ATTRIBUTE_CHANGE, this, "Id", m_id, newValue, true);
   m_id = IdAssigner.preprocessUUID(newValue);
   Ooaofooa.getDefaultInstance().fireModelElementAttributeChanged(change);
 }
  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);
      }
    }
  }
Exemplo n.º 13
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);
      }
    }
  }
Exemplo n.º 14
0
  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 void batchRelate(
      ModelRoot modelRoot, boolean relateProxies, boolean notifyChanges, boolean searchAllRoots) {
    InstanceList instances = null;
    ModelRoot baseRoot = modelRoot;

    // R603
    Statement_c relInst40372 =
        (Statement_c)
            baseRoot.getInstanceList(Statement_c.class).get(new Object[] {m_statement_id});
    // if there was no local element, check for any global elements
    // failing that proceed to check other model roots
    if (relInst40372 == null) {
      relInst40372 =
          (Statement_c)
              Ooaofooa.getDefaultInstance()
                  .getInstanceList(Statement_c.class)
                  .get(new Object[] {m_statement_id});
    }
    if (relInst40372 == null && searchAllRoots && !baseRoot.isCompareRoot()) {
      Ooaofooa[] roots = Ooaofooa.getInstances();
      for (int i = 0; i < roots.length; i++) {
        if (roots[i].isCompareRoot()) {
          // never use elements from any compare root
          continue;
        }
        relInst40372 =
            (Statement_c)
                roots[i].getInstanceList(Statement_c.class).get(new Object[] {m_statement_id});
        if (relInst40372 != null) break;
      }
    }
    // synchronized
    if (relInst40372 != null) {
      if (relateProxies || !isProxy() || (inSameComponent(this, relInst40372) && !isProxy())) {
        relInst40372.relateAcrossR603To(this, notifyChanges);
      }
    }

    if (IsAnInvocationOfBridge == null) {
      // R674
      Bridge_c relInst40373 =
          (Bridge_c) baseRoot.getInstanceList(Bridge_c.class).get(new Object[] {m_brg_id});
      // if there was no local element, check for any global elements
      // failing that proceed to check other model roots
      if (relInst40373 == null) {
        relInst40373 =
            (Bridge_c)
                Ooaofooa.getDefaultInstance()
                    .getInstanceList(Bridge_c.class)
                    .get(new Object[] {m_brg_id});
      }
      if (relInst40373 == null && searchAllRoots && !baseRoot.isCompareRoot()) {
        Ooaofooa[] roots = Ooaofooa.getInstances();
        for (int i = 0; i < roots.length; i++) {
          if (roots[i].isCompareRoot()) {
            // never use elements from any compare root
            continue;
          }
          relInst40373 =
              (Bridge_c) roots[i].getInstanceList(Bridge_c.class).get(new Object[] {m_brg_id});
          if (relInst40373 != null) break;
        }
      }
      // synchronized
      if (relInst40373 != null) {
        if (relateProxies || !isProxy() || (inSameComponent(this, relInst40373) && !isProxy())) {
          relInst40373.relateAcrossR674To(this, notifyChanges);
        }
      }
    }
  }
  public void Createparticipant(
      final String p_Classname,
      final Object p_Elementid,
      final String p_Modelrootid,
      final String p_Searchablevalue) {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Description Query",
        " Operation entered: DescriptionQuery::Createparticipant");
    final ModelRoot modelRoot = getModelRoot();
    SearchParticipant_c v_participant = new SearchParticipant_c(modelRoot);
    Ooaofooa.getDefaultInstance()
        .fireModelElementCreated(
            new BaseModelDelta(Modeleventnotification_c.DELTA_NEW, v_participant));

    SearchableElement_c v_searchable = new SearchableElement_c(modelRoot);
    Ooaofooa.getDefaultInstance()
        .fireModelElementCreated(
            new BaseModelDelta(Modeleventnotification_c.DELTA_NEW, v_searchable));

    DescriptionSearchable_c v_descriptionParticipant = new DescriptionSearchable_c(modelRoot);
    Ooaofooa.getDefaultInstance()
        .fireModelElementCreated(
            new BaseModelDelta(Modeleventnotification_c.DELTA_NEW, v_descriptionParticipant));

    if (v_searchable != null) {
      v_searchable.relateAcrossR9700To(v_participant);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Relate attempted on null left hand instance.", t);
    }

    if (v_searchable != null) {
      v_searchable.setModelrootid(p_Modelrootid);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Attribute write attempted on null instance.", t);
    }

    if (v_searchable != null) {
      v_searchable.setElementid(p_Elementid);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Attribute write attempted on null instance.", t);
    }

    if (v_searchable != null) {
      v_searchable.setClassname(p_Classname);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Attribute write attempted on null instance.", t);
    }

    if (v_descriptionParticipant != null) {
      v_descriptionParticipant.setSearchablevalue(p_Searchablevalue);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Attribute write attempted on null instance.", t);
    }

    if (v_descriptionParticipant != null) {
      v_descriptionParticipant.relateAcrossR9702To(v_searchable);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Relate attempted on null left hand instance.", t);
    }

    SearchEngine_c v_engine = SearchEngine_c.getOneSEN_EOnR9500(Query_c.getOneSQU_QOnR9600(this));

    if (v_engine != null) {
      v_engine.relateAcrossR9502To(v_participant);
    } else {
      Throwable t = new Throwable();
      t.fillInStackTrace();
      CorePlugin.logError("Relate attempted on null left hand instance.", t);
    }
  } // End createParticipant
Exemplo n.º 17
0
  public void batchRelate(
      ModelRoot modelRoot, boolean relateProxies, boolean notifyChanges, boolean searchAllRoots) {
    InstanceList instances = null;
    ModelRoot baseRoot = modelRoot;

    if (ReadsValue == null) {
      // R609
      Value_c relInst40728 =
          (Value_c) baseRoot.getInstanceList(Value_c.class).get(new Object[] {m_r_value_id});
      // if there was no local element, check for any global elements
      // failing that proceed to check other model roots
      if (relInst40728 == null) {
        relInst40728 =
            (Value_c)
                Ooaofooa.getDefaultInstance()
                    .getInstanceList(Value_c.class)
                    .get(new Object[] {m_r_value_id});
      }
      if (relInst40728 == null && searchAllRoots && !baseRoot.isCompareRoot()) {
        Ooaofooa[] roots = Ooaofooa.getInstances();
        for (int i = 0; i < roots.length; i++) {
          if (roots[i].isCompareRoot()) {
            // never use elements from any compare root
            continue;
          }
          relInst40728 =
              (Value_c) roots[i].getInstanceList(Value_c.class).get(new Object[] {m_r_value_id});
          if (relInst40728 != null) break;
        }
      }
      // synchronized
      if (relInst40728 != null) {
        if (relateProxies || !isProxy() || (inSameComponent(this, relInst40728) && !isProxy())) {
          relInst40728.relateAcrossR609To(this, notifyChanges);
        }
      }
    }

    if (WritesValue == null) {
      // R689
      Value_c relInst40729 =
          (Value_c) baseRoot.getInstanceList(Value_c.class).get(new Object[] {m_l_value_id});
      // if there was no local element, check for any global elements
      // failing that proceed to check other model roots
      if (relInst40729 == null) {
        relInst40729 =
            (Value_c)
                Ooaofooa.getDefaultInstance()
                    .getInstanceList(Value_c.class)
                    .get(new Object[] {m_l_value_id});
      }
      if (relInst40729 == null && searchAllRoots && !baseRoot.isCompareRoot()) {
        Ooaofooa[] roots = Ooaofooa.getInstances();
        for (int i = 0; i < roots.length; i++) {
          if (roots[i].isCompareRoot()) {
            // never use elements from any compare root
            continue;
          }
          relInst40729 =
              (Value_c) roots[i].getInstanceList(Value_c.class).get(new Object[] {m_l_value_id});
          if (relInst40729 != null) break;
        }
      }
      // synchronized
      if (relInst40729 != null) {
        if (relateProxies || !isProxy() || (inSameComponent(this, relInst40729) && !isProxy())) {
          relInst40729.relateAcrossR689To(this, notifyChanges);
        }
      }
    }

    // R603
    Statement_c relInst40730 =
        (Statement_c)
            baseRoot.getInstanceList(Statement_c.class).get(new Object[] {m_statement_id});
    // if there was no local element, check for any global elements
    // failing that proceed to check other model roots
    if (relInst40730 == null) {
      relInst40730 =
          (Statement_c)
              Ooaofooa.getDefaultInstance()
                  .getInstanceList(Statement_c.class)
                  .get(new Object[] {m_statement_id});
    }
    if (relInst40730 == null && searchAllRoots && !baseRoot.isCompareRoot()) {
      Ooaofooa[] roots = Ooaofooa.getInstances();
      for (int i = 0; i < roots.length; i++) {
        if (roots[i].isCompareRoot()) {
          // never use elements from any compare root
          continue;
        }
        relInst40730 =
            (Statement_c)
                roots[i].getInstanceList(Statement_c.class).get(new Object[] {m_statement_id});
        if (relInst40730 != null) break;
      }
    }
    // synchronized
    if (relInst40730 != null) {
      if (relateProxies || !isProxy() || (inSameComponent(this, relInst40730) && !isProxy())) {
        relInst40730.relateAcrossR603To(this, notifyChanges);
      }
    }
  }