/**
   * Creates a new instance of SubsystemNode. Creates sublevel named classLevel for containing
   * ClassNodes. Creates ClassNodes based on LEM Class objects in LEM Subsystem object. If no Class
   * objects in LEM Subsystem object then classLevel will display message "[No Classes]".
   *
   * @param s LEM Subsystem object to be contained.
   */
  public SubsystemNode(Subsystem s) {
    this.subsystem = s;

    if (s.getClasses().size() == 0) {
      DefaultMutableTreeNode classLevel = new DefaultMutableTreeNode("[No Classes]");
      add(classLevel);
    } else {
      DefaultMutableTreeNode classLevel = new DefaultMutableTreeNode("Classes");

      Iterator i = s.getClasses().values().iterator();
      while (i.hasNext()) {
        classLevel.add(new ClassNode((org.jdns.xtuml.metamodel.Class) i.next()));
      }

      add(classLevel);
    }
  }
 /**
  * Returns the description property of the LEM Subsystem object.
  *
  * @return the Subsystem description.
  */
 public String getDescription() {
   if (subsystem.getDescription() != null) return trim(subsystem.getDescription());
   else return "";
 }
 /**
  * Returns name property of LEM Subsystem object.
  *
  * @return the Subsystem name.
  */
 public String toString() {
   return "Subsystem " + subsystem.getName();
 }