コード例 #1
0
  /** @see IModelClassInspector#hasChildren(Object) Returns true if this node has any children */
  public boolean hasChildRelations(Object arg) {
    PropertyParameter_c[] v_parameters =
        PropertyParameter_c.getManyC_PPsOnR4006(
            ExecutableProperty_c.getManyC_EPsOnR4500(
                RequiredExecutableProperty_c.getManySPR_REPsOnR4502((RequiredSignal_c) arg)));

    if (v_parameters.length > 0) return true;
    return false;
  }
コード例 #2
0
 public void testGlobalMigrationPropertyParameter() throws Exception {
   Ooaofooa testRoot =
       Ooaofooa.getInstance(
           "/model_upgrade/models/model_upgrade/InterfacePackage/InterfacePackage.xtuml");
   PropertyParameter_c param = PropertyParameter_c.PropertyParameterInstance(testRoot);
   assertNotNull("Unable to locate test element", param);
   DataType_c dt = DataType_c.getOneS_DTOnR4007(param);
   assertNotNull("Unable to locate test element", dt);
   GlobalElementInSystem_c gis =
       GlobalElementInSystem_c.getOneG_EISOnR9100(PackageableElement_c.getOnePE_PEOnR8001(dt));
   assertNotNull("PropertyParameter was not migrated to use globals.", gis);
   assertTrue(
       "Incorrect data type associated with PropertyParameter after global migration",
       dt.getName().equals("date"));
 }
コード例 #3
0
  /** @see IModelClassInspector#getChildRelations(Object) Returns the children of this node */
  public ObjectElement[] getChildRelations(Object arg) {
    int resultSize = 0;
    PropertyParameter_c[] v_parameters =
        PropertyParameter_c.getManyC_PPsOnR4006(
            ExecutableProperty_c.getManyC_EPsOnR4500(
                RequiredExecutableProperty_c.getManySPR_REPsOnR4502((RequiredSignal_c) arg)));

    sort(v_parameters);
    List<ObjectElement> result = new ArrayList<ObjectElement>();
    for (int i = 0; i < v_parameters.length; i++) {
      result.add(
          new ObjectElement(
              "v_parameters", ObjectElement.RELATION_ROLE_ELEMENT, v_parameters[i], arg, false));
    }
    return result.toArray(new ObjectElement[result.size()]);
  }