Package org.sbml.jsbml

Examples of org.sbml.jsbml.NamedSBase


  /* (non-Javadoc)
   * @see org.sbml.jsbml.util.Filter#fulfilsProperty(java.lang.Object)
   */
  public boolean accepts(Object o) {
    if (o instanceof NamedSBase) {
      NamedSBase nsb = (NamedSBase) o;
      if (nsb.isSetId() && (id != null) && nsb.getId().equals(id)) {
        return true;
      }
      if (nsb.isSetName() && (name != null) && nsb.getName().equals(name)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here


   
    for (int k=0; k<sbmlTree.getSelectionCount(); ++k){
      DefaultMutableTreeNode node = (DefaultMutableTreeNode) paths[k].getLastPathComponent();
      Object obj = node.getUserObject();
      if (obj instanceof NamedSBase){
        NamedSBase namedSBase  = (NamedSBase) node.getUserObject();
        Class<? extends NamedSBase> currentClass = namedSBase.getClass();
        if ( currentClass.equals(Reaction.class) ||
           currentClass.equals(Species.class) ||
           currentClass.equals(QualitativeSpecies.class) ||
           currentClass.equals(Transition.class)
           ){
          String id = namedSBase.getId();
            selectedIds.add(id);  
          }
      }
    }
    return selectedIds;
View Full Code Here

      addListOfTransitionsToTreeModel(top, qModel.getListOfTransitions());
    }
  }
 
  public NamedSBase getNamedSBaseById(String id){
    NamedSBase nsb = null;
    if (objectMap.containsKey(id)){
      return objectMap.get(id);
    }
    return nsb;
  }
View Full Code Here

   */
  @Override
  public boolean equals(Object object) {
    boolean equals = super.equals(object);
    if (equals) {
      NamedSBase nsb = (NamedSBase) object;
      equals &= nsb.isSetId() == isSetId();
      if (equals && isSetId()) {
        equals &= nsb.getId().equals(getId());
      }
      equals &= nsb.isSetName() == isSetName();
      if (equals && nsb.isSetName()) {
        equals &= nsb.getName().equals(getName());
      }
    }
    return equals;
  }
View Full Code Here

    sb.append(getElementName());
    sb.append(" [");
    if (isSetText()) {
      sb.append(getText());
    } else if (isSetOriginOfText()) {
      NamedSBase orig = getOriginOfTextInstance();
      if (orig == null) {
        sb.append(getOriginOfText());
      } else {
        sb.append(orig.toString());
      }
    }
    sb.append(']');
    return sb.toString();
  }
View Full Code Here

   *
   * @see org.sbml.jsbml.util.Filter#fulfilsProperty(java.lang.Object)
   */
  public boolean accepts(Object o) {
    if (o instanceof NamedSBase) {
      NamedSBase nsb = (NamedSBase) o;
      if (nsb.isSetId() && (id != null) && nsb.getId().equals(id)) {
        return true;
      }
      if (nsb.isSetName() && (name != null) && nsb.getName().equals(name)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

   *
   * @see org.sbml.jsbml.util.Filter#fulfilsProperty(java.lang.Object)
   */
  public boolean accepts(Object o) {
    if (o instanceof NamedSBase) {
      NamedSBase nsb = (NamedSBase) o;
      if (nsb.isSetId() && (id != null) && nsb.getId().equals(id)) {
        return true;
      }
      if (nsb.isSetName() && (name != null) && nsb.getName().equals(name)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.NamedSBase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.