コード例 #1
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);
      }
    }
  }
コード例 #2
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);
      }
    }
  }
コード例 #3
0
  // declare transform functions
  public String Get_name() {
    Ooaofooa.log.println(
        ILogger.OPERATION, "Informal Argument", " Operation entered: InformalArgument::Get_name");
    final ModelRoot modelRoot = getModelRoot();
    MessageArgument_c v_arg = MessageArgument_c.getOneMSG_AOnR1013(this);

    return v_arg.getLabel();
  } // End get_name
コード例 #4
0
 public static InformalArgument_c getOneMSG_IAOnR1013(
     MessageArgument_c target, ClassQueryInterface_c test) {
   if (target != null) {
     return getOneMSG_IAOnR1013(target.getModelRoot(), target, test);
   }
   return null;
 }
コード例 #5
0
  public void batchRelate(
      ModelRoot modelRoot, boolean relateProxies, boolean notifyChanges, boolean searchAllRoots) {
    InstanceList instances = null;
    ModelRoot baseRoot = modelRoot;

    // R1013
    MessageArgument_c relInst39585 =
        (MessageArgument_c)
            baseRoot.getInstanceList(MessageArgument_c.class).get(new Object[] {m_arg_id});
    // if there was no local element, check for any global elements
    // failing that proceed to check other model roots
    if (relInst39585 == null) {
      relInst39585 =
          (MessageArgument_c)
              Ooaofooa.getDefaultInstance()
                  .getInstanceList(MessageArgument_c.class)
                  .get(new Object[] {m_arg_id});
    }
    if (relInst39585 == 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;
        }
        relInst39585 =
            (MessageArgument_c)
                roots[i].getInstanceList(MessageArgument_c.class).get(new Object[] {m_arg_id});
        if (relInst39585 != null) break;
      }
    }
    // synchronized
    if (relInst39585 != null) {
      if (relateProxies || !isProxy() || (inSameComponent(this, relInst39585) && !isProxy())) {
        relInst39585.relateAcrossR1013To(this, notifyChanges);
      }
    }
  }
コード例 #6
0
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Informal Argument.dispose call: ";
    MessageArgument_c testR1013Inst5 = MessageArgument_c.getOneMSG_AOnR1013(this, false);

    if (testR1013Inst5 != null) {
      delete_error = true;
      errorMsg = errorMsg + "1013 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Informal Argument", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
コード例 #7
0
 public boolean evaluate(Object candidate) {
   MessageArgument_c selected = (MessageArgument_c) candidate;
   boolean retval = false;
   retval = (selected.getArg_id().equals(m_p39593));
   return retval;
 }
コード例 #8
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;
  }
コード例 #9
0
 public java.util.UUID getArg_id() {
   if (IsSupertypeMessageArgument != null) {
     return IsSupertypeMessageArgument.getArg_id();
   }
   return IdAssigner.NULL_UUID;
 }
コード例 #10
0
 // declare attribute accessors
 public long getArg_idLongBased() {
   if (IsSupertypeMessageArgument != null) {
     return IsSupertypeMessageArgument.getArg_idLongBased();
   }
   return 0;
 }
コード例 #11
0
 public static InformalArgument_c getOneMSG_IAOnR1013(
     MessageArgument_c target, boolean loadComponent) {
   return getOneMSG_IAOnR1013(target.getModelRoot(), target, null, loadComponent);
 }