예제 #1
1
  public static InformalArgument_c[] getManyMSG_IAsOnR1013(
      MessageArgument_c[] targets, ClassQueryInterface_c test, boolean loadComponent) {

    if (targets == null || targets.length == 0 || targets[0] == null)
      return new InformalArgument_c[0];

    ModelRoot modelRoot = targets[0].getModelRoot();

    InstanceList instances = modelRoot.getInstanceList(InformalArgument_c.class);

    Vector matches = new Vector();
    for (int i = 0; i < targets.length; i++) {
      InformalArgument_c source =
          (InformalArgument_c) targets[i].backPointer_IsSubtypeInformalArgumentIsSubtype_R1013;
      if (source != null && (test == null || test.evaluate(source))) {
        matches.add(source);
      }
    }
    if (matches.size() > 0) {
      InformalArgument_c[] ret_set = new InformalArgument_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new InformalArgument_c[0];
    }
  }
예제 #2
1
  public static ComponentInComponent_c[] getManyCN_CICsOnR4202(
      Component_c target, ClassQueryInterface_c test, boolean loadComponent) {
    if (target == null) return new ComponentInComponent_c[0];

    ModelRoot modelRoot = target.getModelRoot();
    Vector matches = new Vector();
    synchronized (target.backPointer_CanNestComponentInComponentCanNest_R4202) {
      for (int i = 0; i < target.backPointer_CanNestComponentInComponentCanNest_R4202.size(); ++i) {
        ComponentInComponent_c source =
            (ComponentInComponent_c)
                target.backPointer_CanNestComponentInComponentCanNest_R4202.get(i);
        if (source != null && (test == null || test.evaluate(source))) {

          matches.add(source);
        }
      }
    }

    if (matches.size() > 0) {
      ComponentInComponent_c[] ret_set = new ComponentInComponent_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new ComponentInComponent_c[0];
    }
  }
예제 #3
0
  public static DataTypeInPackage_c[] getManyS_DIPsOnR39(
      DataTypePackage_c target, ClassQueryInterface_c test, boolean loadComponent) {
    if (target == null) return new DataTypeInPackage_c[0];

    ModelRoot modelRoot = target.getModelRoot();
    Vector matches = new Vector();
    synchronized (target.backPointer_ContainsDataTypeInPackageContains_R39) {
      for (int i = 0; i < target.backPointer_ContainsDataTypeInPackageContains_R39.size(); ++i) {
        DataTypeInPackage_c source =
            (DataTypeInPackage_c) target.backPointer_ContainsDataTypeInPackageContains_R39.get(i);
        if (source != null && (test == null || test.evaluate(source))) {

          matches.add(source);
        }
      }
    }

    if (matches.size() > 0) {
      DataTypeInPackage_c[] ret_set = new DataTypeInPackage_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new DataTypeInPackage_c[0];
    }
  }
  public static DescriptionQuery_c[] getManySQU_DEsOnR9600(
      Query_c[] targets, ClassQueryInterface_c test, boolean loadComponent) {

    if (targets == null || targets.length == 0 || targets[0] == null)
      return new DescriptionQuery_c[0];

    ModelRoot modelRoot = targets[0].getModelRoot();

    InstanceList instances = modelRoot.getInstanceList(DescriptionQuery_c.class);

    Vector matches = new Vector();
    for (int i = 0; i < targets.length; i++) {
      DescriptionQuery_c source =
          (DescriptionQuery_c) targets[i].backPointer_IsSubtypeDescriptionQueryIsSubtype_R9600;
      if (source != null && (test == null || test.evaluate(source))) {
        matches.add(source);
      }
    }
    if (matches.size() > 0) {
      DescriptionQuery_c[] ret_set = new DescriptionQuery_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new DescriptionQuery_c[0];
    }
  }
예제 #5
0
  public static ComponentInComponent_c[] getManyCN_CICsOnR4202(
      Component_c[] targets, ClassQueryInterface_c test, boolean loadComponent) {

    if (targets == null || targets.length == 0 || targets[0] == null)
      return new ComponentInComponent_c[0];

    ModelRoot modelRoot = targets[0].getModelRoot();

    InstanceList instances = modelRoot.getInstanceList(ComponentInComponent_c.class);

    Vector matches = new Vector();
    for (int i = 0; i < targets.length; i++) {
      synchronized (targets[i].backPointer_CanNestComponentInComponentCanNest_R4202) {
        for (int j = 0;
            j < targets[i].backPointer_CanNestComponentInComponentCanNest_R4202.size();
            ++j) {
          ComponentInComponent_c source =
              (ComponentInComponent_c)
                  targets[i].backPointer_CanNestComponentInComponentCanNest_R4202.get(j);
          if (source != null && (test == null || test.evaluate(source))) {
            matches.add(source);
          }
        }
      }
    }
    if (matches.size() > 0) {
      ComponentInComponent_c[] ret_set = new ComponentInComponent_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new ComponentInComponent_c[0];
    }
  }
예제 #6
0
  public static DataTypeInPackage_c[] getManyS_DIPsOnR39(
      DataType_c[] targets, ClassQueryInterface_c test, boolean loadComponent) {

    if (targets == null || targets.length == 0 || targets[0] == null)
      return new DataTypeInPackage_c[0];

    ModelRoot modelRoot = targets[0].getModelRoot();

    InstanceList instances = modelRoot.getInstanceList(DataTypeInPackage_c.class);

    Vector matches = new Vector();
    for (int i = 0; i < targets.length; i++) {
      synchronized (targets[i].backPointer_IsContainedInDataTypeInPackageIsContainedIn_R39) {
        for (int j = 0;
            j < targets[i].backPointer_IsContainedInDataTypeInPackageIsContainedIn_R39.size();
            ++j) {
          DataTypeInPackage_c source =
              (DataTypeInPackage_c)
                  targets[i].backPointer_IsContainedInDataTypeInPackageIsContainedIn_R39.get(j);
          if (source != null && (test == null || test.evaluate(source))) {
            matches.add(source);
          }
        }
      }
    }
    if (matches.size() > 0) {
      DataTypeInPackage_c[] ret_set = new DataTypeInPackage_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new DataTypeInPackage_c[0];
    }
  }
  public static ComponentResultSet_c[] getManyPE_CRSsOnR8007(
      Component_c target, ClassQueryInterface_c test, boolean loadComponent) {
    if (target == null) return new ComponentResultSet_c[0];

    ModelRoot modelRoot = target.getModelRoot();
    Vector matches = new Vector();
    synchronized (target.backPointer_HoldsComponentResultSetHolds_R8007) {
      for (int i = 0; i < target.backPointer_HoldsComponentResultSetHolds_R8007.size(); ++i) {
        ComponentResultSet_c source =
            (ComponentResultSet_c) target.backPointer_HoldsComponentResultSetHolds_R8007.get(i);
        if (source != null && (test == null || test.evaluate(source))) {

          matches.add(source);
        }
      }
    }

    if (matches.size() > 0) {
      ComponentResultSet_c[] ret_set = new ComponentResultSet_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new ComponentResultSet_c[0];
    }
  }
  public static AssignToMember_c[] getManyACT_AIsOnR603(
      Statement_c[] targets, ClassQueryInterface_c test, boolean loadComponent) {

    if (targets == null || targets.length == 0 || targets[0] == null)
      return new AssignToMember_c[0];

    ModelRoot modelRoot = targets[0].getModelRoot();

    InstanceList instances = modelRoot.getInstanceList(AssignToMember_c.class);

    Vector matches = new Vector();
    for (int i = 0; i < targets.length; i++) {
      AssignToMember_c source =
          (AssignToMember_c) targets[i].backPointer_IsSubtypeAssignToMemberIsSubtype_R603;
      if (source != null && (test == null || test.evaluate(source))) {
        matches.add(source);
      }
    }
    if (matches.size() > 0) {
      AssignToMember_c[] ret_set = new AssignToMember_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new AssignToMember_c[0];
    }
  }
  public static TransientValueReference_c[] getManyV_TVLsOnR801(
      Value_c[] targets, ClassQueryInterface_c test, boolean loadComponent) {

    if (targets == null || targets.length == 0 || targets[0] == null)
      return new TransientValueReference_c[0];

    ModelRoot modelRoot = targets[0].getModelRoot();

    InstanceList instances = modelRoot.getInstanceList(TransientValueReference_c.class);

    Vector matches = new Vector();
    for (int i = 0; i < targets.length; i++) {
      TransientValueReference_c source =
          (TransientValueReference_c)
              targets[i].backPointer_IsSubtypeTransientValueReferenceIsSubtype_R801;
      if (source != null && (test == null || test.evaluate(source))) {
        matches.add(source);
      }
    }
    if (matches.size() > 0) {
      TransientValueReference_c[] ret_set = new TransientValueReference_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new TransientValueReference_c[0];
    }
  }
  public static InstanceStateMachine_c[] getManySM_ISMsOnR518(
      ModelClass_c[] targets, ClassQueryInterface_c test, boolean loadComponent) {

    if (targets == null || targets.length == 0 || targets[0] == null)
      return new InstanceStateMachine_c[0];

    ModelRoot modelRoot = targets[0].getModelRoot();
    if (loadComponent) {
      // Containment Relation
      PersistableModelComponent[] pmcs = new PersistableModelComponent[targets.length];
      for (int i = 0; i < targets.length; i++) {
        pmcs[i] = targets[i].getPersistableComponent();
      }
      PersistenceManager.ensureAllChildInstancesLoaded(
          pmcs, modelRoot, InstanceStateMachine_c.class);
    }

    InstanceList instances = modelRoot.getInstanceList(InstanceStateMachine_c.class);

    Vector matches = new Vector();
    for (int i = 0; i < targets.length; i++) {
      InstanceStateMachine_c source =
          (InstanceStateMachine_c) targets[i].backPointer_InstanceStateMachine_R518;
      if (source != null && (test == null || test.evaluate(source))) {
        matches.add(source);
      }
    }
    if (matches.size() > 0) {
      InstanceStateMachine_c[] ret_set = new InstanceStateMachine_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new InstanceStateMachine_c[0];
    }
  }
예제 #11
0
  public static ElementInMove_c[] getManyGD_EIMsOnR25(
      GraphicalElement_c[] targets, ClassQueryInterface_c test, boolean loadComponent) {

    if (targets == null || targets.length == 0 || targets[0] == null) return new ElementInMove_c[0];

    ModelRoot modelRoot = targets[0].getModelRoot();

    InstanceList instances = modelRoot.getInstanceList(ElementInMove_c.class);

    Vector matches = new Vector();
    for (int i = 0; i < targets.length; i++) {
      synchronized (targets[i].backPointer_IsMovingInElementInMoveIsMovingIn_R25) {
        for (int j = 0;
            j < targets[i].backPointer_IsMovingInElementInMoveIsMovingIn_R25.size();
            ++j) {
          ElementInMove_c source =
              (ElementInMove_c) targets[i].backPointer_IsMovingInElementInMoveIsMovingIn_R25.get(j);
          if (source != null && (test == null || test.evaluate(source))) {
            matches.add(source);
          }
        }
      }
    }
    if (matches.size() > 0) {
      ElementInMove_c[] ret_set = new ElementInMove_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new ElementInMove_c[0];
    }
  }
예제 #12
0
  public static ElementInMove_c[] getManyGD_EIMsOnR25(
      Model_c target, ClassQueryInterface_c test, boolean loadComponent) {
    if (target == null) return new ElementInMove_c[0];

    ModelRoot modelRoot = target.getModelRoot();
    Vector matches = new Vector();
    synchronized (target.backPointer_IsMovingElementInMoveIsMoving_R25) {
      for (int i = 0; i < target.backPointer_IsMovingElementInMoveIsMoving_R25.size(); ++i) {
        ElementInMove_c source =
            (ElementInMove_c) target.backPointer_IsMovingElementInMoveIsMoving_R25.get(i);
        if (source != null && (test == null || test.evaluate(source))) {

          matches.add(source);
        }
      }
    }

    if (matches.size() > 0) {
      ElementInMove_c[] ret_set = new ElementInMove_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new ElementInMove_c[0];
    }
  }
  public static BridgeInvocation_c[] getManyACT_BRGsOnR674(
      Bridge_c target, ClassQueryInterface_c test, boolean loadComponent) {
    if (target == null) return new BridgeInvocation_c[0];

    ModelRoot modelRoot = target.getModelRoot();
    Vector matches = new Vector();
    synchronized (target.backPointer_BridgeInvocation_R674) {
      for (int i = 0; i < target.backPointer_BridgeInvocation_R674.size(); ++i) {
        BridgeInvocation_c source =
            (BridgeInvocation_c) target.backPointer_BridgeInvocation_R674.get(i);
        if (source != null && (test == null || test.evaluate(source))) {

          matches.add(source);
        }
      }
    }

    if (matches.size() > 0) {
      BridgeInvocation_c[] ret_set = new BridgeInvocation_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new BridgeInvocation_c[0];
    }
  }
  public static BridgeInvocation_c[] getManyACT_BRGsOnR674(
      Bridge_c[] targets, ClassQueryInterface_c test, boolean loadComponent) {

    if (targets == null || targets.length == 0 || targets[0] == null)
      return new BridgeInvocation_c[0];

    ModelRoot modelRoot = targets[0].getModelRoot();

    InstanceList instances = modelRoot.getInstanceList(BridgeInvocation_c.class);

    Vector matches = new Vector();
    for (int i = 0; i < targets.length; i++) {
      synchronized (targets[i].backPointer_BridgeInvocation_R674) {
        for (int j = 0; j < targets[i].backPointer_BridgeInvocation_R674.size(); ++j) {
          BridgeInvocation_c source =
              (BridgeInvocation_c) targets[i].backPointer_BridgeInvocation_R674.get(j);
          if (source != null && (test == null || test.evaluate(source))) {
            matches.add(source);
          }
        }
      }
    }
    if (matches.size() > 0) {
      BridgeInvocation_c[] ret_set = new BridgeInvocation_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new BridgeInvocation_c[0];
    }
  }
  public static TransientValueReference_c[] getManyV_TVLsOnR805(
      Variable_c target, ClassQueryInterface_c test, boolean loadComponent) {
    if (target == null) return new TransientValueReference_c[0];

    ModelRoot modelRoot = target.getModelRoot();
    Vector matches = new Vector();
    synchronized (target.backPointer_TransientValueReference_R805) {
      for (int i = 0; i < target.backPointer_TransientValueReference_R805.size(); ++i) {
        TransientValueReference_c source =
            (TransientValueReference_c) target.backPointer_TransientValueReference_R805.get(i);
        if (source != null && (test == null || test.evaluate(source))) {

          matches.add(source);
        }
      }
    }

    if (matches.size() > 0) {
      TransientValueReference_c[] ret_set = new TransientValueReference_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new TransientValueReference_c[0];
    }
  }
예제 #16
0
 private static AssignToMember_c find_getOneACT_AIOnR689(
     ModelRoot modelRoot, Value_c target, ClassQueryInterface_c test) {
   if (target != null) {
     AssignToMember_c source = (AssignToMember_c) target.backPointer_AssignToMember_R689;
     if (source != null && (test == null || test.evaluate(source))) {
       return source;
     }
   }
   // not found
   return null;
 }
예제 #17
0
 private static Graphnode_c find_getOneDIM_NDOnR301(
     ModelRoot modelRoot, Graphelement_c target, ClassQueryInterface_c test) {
   if (target != null) {
     Graphnode_c source = (Graphnode_c) target.backPointer_IsSubtypeGraphnodeIsSubtype_R301;
     if (source != null && (test == null || test.evaluate(source))) {
       return source;
     }
   }
   // not found
   return null;
 }
 private static InstanceStateMachine_c find_getOneSM_ISMOnR517(
     ModelRoot modelRoot, StateMachine_c target, ClassQueryInterface_c test) {
   if (target != null) {
     InstanceStateMachine_c source =
         (InstanceStateMachine_c) target.backPointer_IsSubtypeInstanceStateMachineIsSubtype_R517;
     if (source != null && (test == null || test.evaluate(source))) {
       return source;
     }
   }
   // not found
   return null;
 }
 private static DescriptionQuery_c find_getOneSQU_DEOnR9600(
     ModelRoot modelRoot, Query_c target, ClassQueryInterface_c test) {
   if (target != null) {
     DescriptionQuery_c source =
         (DescriptionQuery_c) target.backPointer_IsSubtypeDescriptionQueryIsSubtype_R9600;
     if (source != null && (test == null || test.evaluate(source))) {
       return source;
     }
   }
   // not found
   return null;
 }
 private static BridgeInvocation_c find_getOneACT_BRGOnR603(
     ModelRoot modelRoot, Statement_c target, ClassQueryInterface_c test) {
   if (target != null) {
     BridgeInvocation_c source =
         (BridgeInvocation_c) target.backPointer_IsSubtypeBridgeInvocationIsSubtype_R603;
     if (source != null && (test == null || test.evaluate(source))) {
       return source;
     }
   }
   // not found
   return null;
 }
예제 #21
0
 private static InformalArgument_c find_getOneMSG_IAOnR1013(
     ModelRoot modelRoot, MessageArgument_c target, ClassQueryInterface_c test) {
   if (target != null) {
     InformalArgument_c source =
         (InformalArgument_c) target.backPointer_IsSubtypeInformalArgumentIsSubtype_R1013;
     if (source != null && (test == null || test.evaluate(source))) {
       return source;
     }
   }
   // not found
   return null;
 }
예제 #22
0
 private static InformalArgument_c findInformalArgumentInstance(
     ModelRoot modelRoot, ClassQueryInterface_c test, boolean loadComponent) {
   InstanceList instances = modelRoot.getInstanceList(InformalArgument_c.class);
   synchronized (instances) {
     for (int i = 0; i < instances.size(); ++i) {
       InformalArgument_c x = (InformalArgument_c) instances.get(i);
       if (test == null || test.evaluate(x)) {
         if (x.ensureLoaded(loadComponent)) return x;
       }
     }
   }
   return null;
 }
 private static TransientValueReference_c find_getOneV_TVLOnR801(
     ModelRoot modelRoot, Value_c target, ClassQueryInterface_c test) {
   if (target != null) {
     TransientValueReference_c source =
         (TransientValueReference_c)
             target.backPointer_IsSubtypeTransientValueReferenceIsSubtype_R801;
     if (source != null && (test == null || test.evaluate(source))) {
       return source;
     }
   }
   // not found
   return null;
 }
예제 #24
0
 private static Graphnode_c findGraphnodeInstance(
     ModelRoot modelRoot, ClassQueryInterface_c test, boolean loadComponent) {
   InstanceList instances = modelRoot.getInstanceList(Graphnode_c.class);
   synchronized (instances) {
     for (int i = 0; i < instances.size(); ++i) {
       Graphnode_c x = (Graphnode_c) instances.get(i);
       if (test == null || test.evaluate(x)) {
         return x;
       }
     }
   }
   return null;
 }
예제 #25
0
 private static ElementInMove_c find_getOneGD_EIMOnR25(
     ModelRoot modelRoot, GraphicalElement_c target, ClassQueryInterface_c test) {
   if (target != null) {
     synchronized (target.backPointer_IsMovingInElementInMoveIsMovingIn_R25) {
       for (int i = 0; i < target.backPointer_IsMovingInElementInMoveIsMovingIn_R25.size(); ++i) {
         ElementInMove_c source =
             (ElementInMove_c) target.backPointer_IsMovingInElementInMoveIsMovingIn_R25.get(i);
         if (source != null && (test == null || test.evaluate(source))) {
           return source;
         }
       }
     }
   }
   // not found
   return null;
 }
 private static ComponentResultSet_c find_getOnePE_CRSOnR8007(
     ModelRoot modelRoot, Component_c target, ClassQueryInterface_c test) {
   if (target != null) {
     synchronized (target.backPointer_HoldsComponentResultSetHolds_R8007) {
       for (int i = 0; i < target.backPointer_HoldsComponentResultSetHolds_R8007.size(); ++i) {
         ComponentResultSet_c source =
             (ComponentResultSet_c) target.backPointer_HoldsComponentResultSetHolds_R8007.get(i);
         if (source != null && (test == null || test.evaluate(source))) {
           return source;
         }
       }
     }
   }
   // not found
   return null;
 }
 private static TransientValueReference_c find_getOneV_TVLOnR805(
     ModelRoot modelRoot, Variable_c target, ClassQueryInterface_c test) {
   if (target != null) {
     synchronized (target.backPointer_TransientValueReference_R805) {
       for (int i = 0; i < target.backPointer_TransientValueReference_R805.size(); ++i) {
         TransientValueReference_c source =
             (TransientValueReference_c) target.backPointer_TransientValueReference_R805.get(i);
         if (source != null && (test == null || test.evaluate(source))) {
           return source;
         }
       }
     }
   }
   // not found
   return null;
 }
예제 #28
0
 private static DataTypeInPackage_c find_getOneS_DIPOnR39(
     ModelRoot modelRoot, DataTypePackage_c target, ClassQueryInterface_c test) {
   if (target != null) {
     synchronized (target.backPointer_ContainsDataTypeInPackageContains_R39) {
       for (int i = 0; i < target.backPointer_ContainsDataTypeInPackageContains_R39.size(); ++i) {
         DataTypeInPackage_c source =
             (DataTypeInPackage_c) target.backPointer_ContainsDataTypeInPackageContains_R39.get(i);
         if (source != null && (test == null || test.evaluate(source))) {
           return source;
         }
       }
     }
   }
   // not found
   return null;
 }
 private static BridgeInvocation_c find_getOneACT_BRGOnR674(
     ModelRoot modelRoot, Bridge_c target, ClassQueryInterface_c test) {
   if (target != null) {
     synchronized (target.backPointer_BridgeInvocation_R674) {
       for (int i = 0; i < target.backPointer_BridgeInvocation_R674.size(); ++i) {
         BridgeInvocation_c source =
             (BridgeInvocation_c) target.backPointer_BridgeInvocation_R674.get(i);
         if (source != null && (test == null || test.evaluate(source))) {
           return source;
         }
       }
     }
   }
   // not found
   return null;
 }
  public static ComponentResultSet_c[] getManyPE_CRSsOnR8008(
      ComponentVisibility_c[] targets, ClassQueryInterface_c test, boolean loadComponent) {
    if (targets == null || targets.length == 0 || targets[0] == null)
      return new ComponentResultSet_c[0];

    LinkedHashSet<ComponentResultSet_c> elementsSet = new LinkedHashSet<ComponentResultSet_c>();
    for (int i = 0; i < targets.length; i++) {
      ComponentResultSet_c associate = targets[i].MakesUpAComponentResultSet;
      if (targets[i] != null && associate != null && (test == null || test.evaluate(associate))) {
        if (elementsSet.add(associate)) {}
      }
    }

    ComponentResultSet_c[] result = new ComponentResultSet_c[elementsSet.size()];
    elementsSet.toArray(result);
    return result;
  }