private void addPetriNetObjectsToModelFromComponent(Component component) {

    if (component.isSetSubComposition) {
      HashMap<String, Component> subComponents = component.subCompositionModel.getComponents();
      for (Component subComponent : subComponents.values()) {
        addPetriNetObjectsToModelFromComponent(subComponent);
      }
    } else if (component.isSetElemNetSpec) {
      DataLayer tempDataLayer = component.getElemNetModel();
      Iterator i = tempDataLayer.getPetriNetObjects();
      while (i.hasNext()) {
        Object o = i.next();
        if (o instanceof pipe.dataLayer.PetriNetObject) {
          if (o instanceof Place) {
            netCompositionModel.addPetriNetObject((Place) o);
          } else if (o instanceof Transition) {
            netCompositionModel.addPetriNetObject((Transition) o);
          } else if (o instanceof pipe.dataLayer.Arc) {
            netCompositionModel.addPetriNetObject((pipe.dataLayer.Arc) o);
          } else {
            System.out.println(
                "This PetriNetObject is not supposed to be added to netCompositionModel.");
          }
        }
      }
    } else {
      System.out.println("loop error of iterating model!");
    }
  }
  public ModelCompletenessCheck(DataLayer dl) {
    dataLayer = dl;

    places = dl.getPlaces();
    transitions = dl.getTransitions();
    arcs = dl.getArcs();

    message = "Undefined ";

    message += "\nPlaces: ";
    if (!checkPlaceType()) result = false;
    message += "\nTransitions: ";
    if (!checkTransitions()) result = false;
    message += "\nArcs: ";
    if (!checkArcs()) result = false;
  }