org.sbml.jsbml
public static enum Unit.Kind extends java.lang.Enum<Unit.Kind>
AVOGADRO
, which has been defined in Level 3 for the first time,
or CELSIUS
, which has been removed from the specification of
SBML in Level 2 Version 4. This enum also provides helpful methods, for
instance, to check if two instances of Unit.Kind
with different names
are still equivalent (#areEquivalent(Kind, Kind)
), or to get the
formula symbol of the Unit.Kind
(getSymbol()
).Enum Constant and Description |
---|
AMPERE
The ampere unit.
|
AVOGADRO
This unit is DIMENSIONLESS multiplied with Avogadro's number.
|
BECQUEREL
The becquerel unit.
|
CANDELA
The candela unit.
|
CELSIUS
Deprecated.
use
KELVIN instead (1 Celsius = 1 K + 271.15) |
COULOMB
The coulomb unit.
|
DIMENSIONLESS
A pseudo-unit indicating a dimensionless quantity.
|
FARAD
The farad unit.
|
GRAM
The gram unit.
|
GRAY
The gray unit.
|
HENRY
The henry unit.
|
HERTZ
The hertz unit.
|
INVALID
Marker used to indicate an invalid or not yet set unit.
|
ITEM
A pseudo-unit representing a single 'thing'.
|
JOULE
The joule unit.
|
KATAL
The katal unit.
|
KELVIN
The kelvin unit.
|
KILOGRAM
The kilogram unit.
|
LITER
Deprecated.
use
LITRE instead. |
LITRE
The litre unit.
|
LUMEN
The lumen unit.
|
LUX
The lux unit.
|
METER
Deprecated.
use
METRE instead. |
METRE
The metre unit.
|
MOLE
The mole unit.
|
NEWTON
The newton unit.
|
OHM
The ohm unit.
|
PASCAL
The pascal unit.
|
RADIAN
The radian unit.
|
SECOND
The second unit.
|
SIEMENS
The siemens unit.
|
SIEVERT
The sievert unit.
|
STERADIAN
The steradian unit.
|
TESLA
The tesla unit.
|
VOLT
The volt unit.
|
WATT
The watt unit.
|
WEBER
The weber unit.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
areEquivalent(Unit.Kind kind1,
Unit.Kind kind2)
Tests whether the both given unit kinds are equivalent, i.e., it also
considers METRE and METER and LITRE and LITER.
|
java.lang.String |
getName()
Returns the name of this unit kind.
|
java.lang.String |
getSymbol() |
static java.util.Set<Unit.Kind> |
getUnitKindsDefinedIn(int level,
int version)
Returns a set of
Unit.Kind objects for the given level/version
combination of SBML. |
java.lang.String |
getUnitOntologyIdentifier()
Creates a unit ontology identifier for this
Unit.Kind if possible
and returns it. |
int |
getUnitOntologyNumber()
Looks for the corresponding unit ontology resource for this
Unit.Kind . |
java.lang.String |
getUnitOntologyResource()
Creates a MIRIAM resource pointing to the entry in the unit ontology
corresponding to this
Unit.Kind . |
boolean |
isDefinedIn(int level,
int version)
Tests whether this kind of unit is defined in the given level and
version of SBML.
|
static boolean |
isValidUnitKindString(java.lang.String unitKind,
int level,
int version)
This method is equivalent to converting the
String to a
Unit.Kind and then calling its isDefinedIn(int, int) method. |
static Unit.Kind |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Unit.Kind[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Unit.Kind AMPERE
public static final Unit.Kind AVOGADRO
public static final Unit.Kind BECQUEREL
public static final Unit.Kind CANDELA
@Deprecated public static final Unit.Kind CELSIUS
KELVIN
instead (1 Celsius = 1 K + 271.15)public static final Unit.Kind COULOMB
public static final Unit.Kind DIMENSIONLESS
public static final Unit.Kind FARAD
public static final Unit.Kind GRAM
public static final Unit.Kind GRAY
public static final Unit.Kind HENRY
public static final Unit.Kind HERTZ
public static final Unit.Kind INVALID
public static final Unit.Kind ITEM
public static final Unit.Kind JOULE
public static final Unit.Kind KATAL
public static final Unit.Kind KELVIN
public static final Unit.Kind KILOGRAM
@Deprecated public static final Unit.Kind LITER
LITRE
instead.public static final Unit.Kind LITRE
public static final Unit.Kind LUMEN
public static final Unit.Kind LUX
@Deprecated public static final Unit.Kind METER
METRE
instead.public static final Unit.Kind METRE
public static final Unit.Kind MOLE
public static final Unit.Kind NEWTON
public static final Unit.Kind OHM
public static final Unit.Kind PASCAL
public static final Unit.Kind RADIAN
public static final Unit.Kind SECOND
public static final Unit.Kind SIEMENS
public static final Unit.Kind SIEVERT
public static final Unit.Kind STERADIAN
public static final Unit.Kind TESLA
public static final Unit.Kind VOLT
public static final Unit.Kind WATT
public static final Unit.Kind WEBER
public static Unit.Kind[] values()
for (Unit.Kind c : Unit.Kind.values()) System.out.println(c);
public static Unit.Kind valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static boolean areEquivalent(Unit.Kind kind1, Unit.Kind kind2)
kind1
- kind2
- public static java.util.Set<Unit.Kind> getUnitKindsDefinedIn(int level, int version)
Unit.Kind
objects for the given level/version
combination of SBML.level
- version
- Set
that only contains Unit.Kind
s for the given
level/version combination.public static boolean isValidUnitKindString(java.lang.String unitKind, int level, int version)
String
to a
Unit.Kind
and then calling its isDefinedIn(int, int)
method. Only
entirely upper or entirely lower case String
s are valid
attributes here.
This method tests whether a given string corresponds to a predefined
Unit.Kind
enumeration value.
To check whether a given String
represents some predefined
UnitDefinition
, please use the method
Unit.isPredefined(String, int)
.unitKind
- the unit string.level
- the SBML level.version
- the SBML version.true
if the given string is valid for the
particular SBML level and version, false
otherwise.Unit.isPredefined(String, int)
public java.lang.String getName()
public java.lang.String getSymbol()
public java.lang.String getUnitOntologyIdentifier()
Unit.Kind
if possible
and returns it. See the Unit Ontology
for more information.Unit.Kind
or null if
this Unit.Kind
has no corresponding type in the unit
ontology.getUnitOntologyNumber()
public int getUnitOntologyNumber()
Unit.Kind
. Please visit
http://bioportal.bioontology.org/visualize/44519/?conceptid=UO%3A0000003
and http://www.ebi.ac.uk/miriam/main/datatypes/MIR:00000136
for more details.public java.lang.String getUnitOntologyResource()
Unit.Kind
. If such an entry exists, this
method will return the String
urn:miriam:obo.unit:UO%3A
plus the number of the
resource filled to a seven-digit number by inserting leading zeros.public boolean isDefinedIn(int level, int version)
level
- version
-