Package org.sbml.jsbml

Examples of org.sbml.jsbml.SBMLException


  public void removeAnalyticVolume(int i) {
    if (!isSetListOfAnalyticVolumes()) {
      throw new IndexOutOfBoundsException(Integer.toString(i));
    }
    if (getListOfAnalyticVolumes().size()<=1) {
      throw new SBMLException("There must be at least one AnalyticVolume defined for this list");
    }
    getListOfAnalyticVolumes().remove(i);
  }
View Full Code Here


   * Sets the value of spatialDimension
   */
  public void setSpatialDimension(int spatialDimension) {
    Integer oldSpatialDimension = this.spatialDimension;
    if (!((spatialDimension >= 0) && (spatialDimension <= 3))) {
      throw new SBMLException("Not a valid spatial dimension. Must be 0, 1, 2, or 3.");
    }
    this.spatialDimension = spatialDimension;
    firePropertyChange(SpatialConstants.spatialDimension, oldSpatialDimension, this.spatialDimension);
  }
View Full Code Here

  public void removeParametricObject(int i) {
    if (!isSetListOfParametricObjects()) {
      throw new IndexOutOfBoundsException(Integer.toString(i));
    }
    if (getListOfParametricObjects().size() == 1) {
      throw new SBMLException("There must be at least one ParametricObject defined for this list");
    }
    getListOfParametricObjects().remove(i);
  }
View Full Code Here

  public void removeSpatialPoint(int i) {
    if (!isSetListOfSpatialPoints()) {
      throw new IndexOutOfBoundsException(Integer.toString(i));
    }
    if (getListOfSpatialPoints().size() == 1) {
      throw new SBMLException("There must be at least one SpatialPoint defined for this list");
    }
    getListOfSpatialPoints().remove(i);
  }
View Full Code Here

        {
          setType(Type.fromString(value));
        }
        catch (Exception e)
        {
          throw new SBMLException("Could not recognized the value '" + value
            + "' for the attribute " + LayoutConstants.type
            + " on the 'curveSegment' element.");
        }
        return true;
      }
View Full Code Here

           
            Type listType = toTest.getSBaseListType();
            if (listType == Type.none) {
              // Prevent writing invalid SBML if list types are
              // not set appropriately.
              throw new SBMLException(String.format(
                  "Unknown ListOf type \"%s\".",
                  toTest.getElementName()));
            }
            if (listType.equals(ListOf.Type.listOfReactants)
                || listType.equals(ListOf.Type.listOfProducts)
View Full Code Here

        && (SpatialConstants.shortLabel == prefix);
    if (!isAttributeRead) {
      isAttributeRead = true;
      if (attributeName.equals(SpatialConstants.operationType)) {
        if (!Pattern.matches("[a-z]*", value)) {
          throw new SBMLException("The value is not all lower-case.");
        }
        setOperationType(OperationType.valueOf(value.toUpperCase()));
      }
      else {
        isAttributeRead = false;
View Full Code Here

        {
          setOperation(Operation.fromString(value));
        }
        catch (Exception e)
        {
          throw new SBMLException("Could not recognized the value '" + value
            + "' for the attribute " + FBCConstants.operation
            + " on the 'fluxBound' element.");
        }
        return true;
      } else if (attributeName.equals(FBCConstants.value)) {
View Full Code Here

              MathMLParser.getXMLnamespaceSBML());
        } else {
          // TODO: We could just remove all references to units
          // instead of throwing this exception. What is better? Loss
          // of information or exception?
          throw new SBMLException(
              "math element contains numbers that refer to unit definitions and therefore requires at least SBML Level 3");
        }
      }
      document.appendChild(math);
    } else {
View Full Code Here

  /*
   * (non-Javadoc)
   * @see org.sbml.jsbml.util.compilers.ASTNodeCompiler#unknownValue()
   */
  public ASTNodeValue unknownValue() throws SBMLException {
    throw new SBMLException(
        "cannot write unknown syntax tree nodes to a MathML document");
  }
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.SBMLException

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.