Package org.sbml.jsbml.Unit

Examples of org.sbml.jsbml.Unit.Kind


    } else if (id.equals(LENGTH)) {
      u.setKind(Kind.METRE);
    } else if (id.equals(TIME)) {
      u.setKind(Kind.SECOND);
    } else {
      Kind kind = null;
      try {
        kind = Kind.valueOf(id.toUpperCase());
      } catch (IllegalArgumentException exc) {
        logger.warn(MessageFormat.format(
          "No such unit kind ''{0}'' in SBML Level {1,number,integer} Version {2,number,integer}",
View Full Code Here


  private void checkForDimensionlessOrInvalidUnits(UnitDefinition units) {
    units.simplify();
    String illegal = null;

    if (units.getUnitCount() == 1) {
      Kind kind = units.getUnit(0).getKind();

      if ((kind != Kind.DIMENSIONLESS) && (kind != Kind.ITEM)
          && (kind != Kind.RADIAN) && (kind != Kind.STERADIAN)
          && (kind != Kind.INVALID)) {
        illegal = kind.toString();
      }
    } else {
      illegal = units.toString();
    }
    if (illegal != null) {
View Full Code Here

  private void checkForDimensionlessOrInvalidUnits(UnitDefinition units) {
    units.simplify();
    String illegal = null;

    if (units.getNumUnits() == 1) {
      Kind kind = units.getUnit(0).getKind();

      if ((kind != Kind.DIMENSIONLESS) && (kind != Kind.ITEM)
          && (kind != Kind.RADIAN) && (kind != Kind.STERADIAN)
          && (kind != Kind.INVALID)) {
        illegal = kind.toString();
      }
    } else {
      illegal = units.toString();
    }
    if (illegal != null) {
View Full Code Here

    } else if (id.equals(LENGTH)) {
      u.setKind(Kind.METRE);
    } else if (id.equals(TIME)) {
      u.setKind(Kind.SECOND);
    } else {
      Kind kind = null;
      try {
        kind = Kind.valueOf(id.toUpperCase());
      } catch (IllegalArgumentException exc) {
        logger.warn(String.format(
            "No such unit kind %s in SBML Level %d Version %d", id,
View Full Code Here

    } else if (id.equals(LENGTH)) {
      u.setKind(Kind.METRE);
    } else if (id.equals(TIME)) {
      u.setKind(Kind.SECOND);
    } else {
      Kind kind = null;
      try {
        kind = Kind.valueOf(id.toUpperCase());
      } catch (IllegalArgumentException exc) {
        logger.warn(String.format(
            "No such unit kind %s in SBML Level %d Version %d", id,
View Full Code Here

  private void checkForDimensionlessOrInvalidUnits(UnitDefinition units) {
    units.simplify();
    String illegal = null;

    if (units.getNumUnits() == 1) {
      Kind kind = units.getUnit(0).getKind();

      if ((kind != Kind.DIMENSIONLESS) && (kind != Kind.ITEM)
          && (kind != Kind.RADIAN) && (kind != Kind.STERADIAN)
          && (kind != Kind.INVALID)) {
        illegal = kind.toString();
      }
    } else {
      illegal = units.toString();
    }
    if (illegal != null) {
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.Unit.Kind

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.