public final class ValidationTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ValidationFunction<SBaseWithDerivedUnit> |
checkDerivedUnit |
static byte |
DT_BOOLEAN |
static byte |
DT_NUMBER |
static byte |
DT_STRING |
static byte |
DT_UNKNOWN |
static byte |
DT_VECTOR |
static Filter |
FILTER_IS_FUNCTION |
static Filter |
FILTER_IS_NAME |
static java.lang.String |
KEY_META_ID_SET |
Constructor and Description |
---|
ValidationTools() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsMathOnlyPredefinedFunctions(ASTNode math) |
static byte |
getDataType(ASTNode node)
Returns the data type of an
ASTNode . |
static java.util.Set<java.lang.String> |
getDefinedSpecies(Reaction r) |
static boolean |
haveEquivalentUnits(Assignment assignment,
Variable var)
Returns true if the given
Assignment and Variable have equivalent derived units. |
static boolean |
isBigLetter(char c)
A big letter is a ASCII symbol between 'A' and 'Z'.
|
static boolean |
isDigit(char c)
A digit is a ASCII symbol between '0' and '9'.
|
static boolean |
isId(java.lang.String s,
int level,
int version)
A SId starts with a letter or '-' and can be followed by a various amout
of idChars.
|
static boolean |
isIdChar(char c)
A idChar is a letter, digit or '-'.
|
static boolean |
isLetter(char c)
A letter is either a small letter or big letter.
|
static boolean |
isLocalParameter(ASTNode node,
java.lang.String name) |
static boolean |
isNameChar(char c)
A NameChar (defined in the XML Schema 1.0) can be a letter, a digit, '.',
'-', '_', ':', a CombiningChar or Extender.
|
static boolean |
isSboTerm(java.lang.String s)
A SBOTerm begins with 'SBO:' followed by exactly 7 digits
|
static boolean |
isSmallLetter(char c)
A small letter is a ASCII symbol between 'a' and 'z'.
|
static boolean |
isSpeciesReference(Model m,
java.lang.String name) |
static boolean |
isValidVariable(Variable var,
int level) |
static boolean |
isXmlId(java.lang.String s)
A XML ID (defined in the XML Schema 1.0) starts with a letter, '-' or ':'
which can be followed by a unlimited amout of NameChars.
|
public static final byte DT_UNKNOWN
public static final byte DT_NUMBER
public static final byte DT_BOOLEAN
public static final byte DT_STRING
public static final byte DT_VECTOR
public static final java.lang.String KEY_META_ID_SET
public static Filter FILTER_IS_FUNCTION
public static Filter FILTER_IS_NAME
public static ValidationFunction<SBaseWithDerivedUnit> checkDerivedUnit
public static boolean containsMathOnlyPredefinedFunctions(ASTNode math)
public static java.util.Set<java.lang.String> getDefinedSpecies(Reaction r)
public static byte getDataType(ASTNode node)
ASTNode
.
It can be DT_NUMBER
, DT_BOOLEAN
, DT_STRING
,
DT_VECTOR
or DT_UNKNOWN
.
node
- an ASTNode
public static boolean isLocalParameter(ASTNode node, java.lang.String name)
public static boolean isSpeciesReference(Model m, java.lang.String name)
public static boolean isValidVariable(Variable var, int level)
public static boolean isLetter(char c)
c
- public static boolean isSmallLetter(char c)
c
- public static boolean isBigLetter(char c)
c
- public static boolean isIdChar(char c)
c
- public static boolean isDigit(char c)
c
- public static boolean isNameChar(char c)
c
- public static boolean isId(java.lang.String s, int level, int version)
s
- public static boolean isSboTerm(java.lang.String s)
s
- public static boolean isXmlId(java.lang.String s)
s
- public static boolean haveEquivalentUnits(Assignment assignment, Variable var)
Assignment
and Variable
have equivalent derived units.assignment
- the assignment to checkvar
- the variable to checkAssignment
and Variable
have equivalent derived units.