public class STMLType extends Object implements XMLConstants
supports XSD and derived types generated by software and only instantiated as singletons
| Modifier and Type | Field and Description |
|---|---|
protected String |
base |
protected double[] |
dEnumerationValues |
protected String |
description |
protected double |
dMaxExclusive |
protected double |
dMaxInclusive |
protected double |
dMinExclusive |
protected double |
dMinInclusive |
protected String |
id |
protected int[] |
iEnumerationValues |
protected int |
iMaxExclusive |
protected int |
iMaxInclusive |
protected int |
iMinExclusive |
protected int |
iMinInclusive |
protected boolean |
isList |
protected String |
javaType |
protected nu.xom.Element |
list |
protected int |
listLength |
protected String |
name |
static String |
NO_BASE
dewisott
|
protected String |
pattern |
protected nu.xom.Element |
restriction |
protected String[] |
sEnumerationValues |
protected STMLType[] |
subTypes |
protected String |
summary |
protected nu.xom.Element |
union |
ATTRIBUTES, AUTOGENERATED_DONOTEDIT_S, BANNER_S, CATALOG_XML, CML_SIUNITS, CML_UNITS, ELEMENTS, FPX_REAL, JAVA_ARRAY, JAVA_BOOL, JAVA_BOOLEAN, JAVA_DOUB, JAVA_DOUBLE, JAVA_INT, JAVA_INTEGER, JAVA_STRING, PATTERN_ANYURI, PATTERN_QNAME, SVG_NS, SVG_NS_BASE, SVG_XPATH, TYPES, U_ANGSTROM, U_CELSIUS, U_DEGREE, U_KCAL, WARNING_S, X_OR, XHTML_NS, XLINK_NS, XLINK_PREFIX, XML_SUFF, XMLNS, XPATH_XSD, XSD_ANNOTATION, XSD_ANYURI, XSD_ATTRIBUTE, XSD_ATTRIBUTE_GROUP, XSD_BOOLEAN, XSD_COMPLEX_TYPE, XSD_DATE, XSD_DOCUMENTATION, XSD_DOUBLE, XSD_ELEMENT, XSD_ENUMERATION, XSD_EXTENSION, XSD_FLOAT, XSD_INTEGER, XSD_LENGTH, XSD_LIST, XSD_MAXEXCLUSIVE, XSD_MAXINCLUSIVE, XSD_MINEXCLUSIVE, XSD_MININCLUSIVE, XSD_NONNEGATIVEINTEGER, XSD_NS, XSD_PATTERN, XSD_POSITIVE_NUMBER, XSD_POSITIVEINTEGER, XSD_PREFIX, XSD_QNAME, XSD_RESTRICTION, XSD_SIMPLE_CONTENT, XSD_SIMPLE_TYPE, XSD_STRING, XSD_SUFF, XSD_UNION, XSD_XMLNSC_AMP, C_APOS, C_ATSIGN, C_BACKSLASH, C_BACKSPACE, C_CARET, C_COLON, C_COMMA, C_DEL, C_DOLLAR, C_EQUALS, C_FORMFEED, C_HASH, C_LANGLE, C_LBRAK, C_LCURLY, C_LSQUARE, C_MINUS, C_NBSP, C_NEWLINE, C_NL, C_PERCENT, C_PERIOD, C_PIPE, C_PLUS, C_POUND, C_QUERY, C_QUOT, C_RANGLE, C_RBRAK, C_RCURLY, C_RETURN, C_RSQUARE, C_SEMICOLON, C_SHRIEK, C_SLASH, C_SPACE, C_STAR, C_TAB, C_TILDE, C_UNDER, EPS, F_S, NONWHITEPUNC, NONWHITEPUNC0, NONWHITEPUNC0REGEX, ONE_THIRD, PUNC, S_AMP, S_APOS, S_ATSIGN, S_BACKSLASH, S_CARET, S_COLON, S_COMMA, S_DOLLAR, S_EMPTY, S_EQUALS, S_FORMFEED, S_HASH, S_LANGLE, S_LBRAK, S_LCURLY, S_LSQUARE, S_MINUS, S_NEWLINE, S_NL, S_PERCENT, S_PERIOD, S_PIPE, S_PLUS, S_POUND, S_QUERY, S_QUOT, S_RANGLE, S_RBRAK, S_RCURLY, S_RETURN, S_RSQUARE, S_SEMICOLON, S_SHRIEK, S_SLASH, S_SPACE, S_STAR, S_TAB, S_TILDE, S_UNDER, S_WHITEREGEX, TWO_THIRDS, U_S, WHITESPACE| Constructor and Description |
|---|
STMLType()
default.
|
STMLType(nu.xom.Element simpleType)
create from XSD simpleType.
|
STMLType(STMLType st)
copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkValue(boolean b)
checks value of simpleType.
|
void |
checkValue(boolean[] bb)
checks value of simpleType.
|
void |
checkValue(double d)
checks value of simpleType.
|
void |
checkValue(double[] dd)
checks value of simpleType.
|
void |
checkValue(int i)
checks value of simpleType.
|
void |
checkValue(int[] ii)
checks value of simpleType.
|
void |
checkValue(String s)
checks value of simpleType.
|
void |
checkValue(String[] ss)
checks value of simpleType.
|
int |
compareTo(STMLType type)
compares cmlType.
|
void |
createMinMaxAndEnumerations()
create min max.
|
String |
getBase()
get Base.
|
double[] |
getDEnumerationValues() |
String |
getDescription()
get description.
|
double |
getDMaxExclusive() |
double |
getDMaxInclusive() |
double |
getDMinExclusive() |
double |
getDMinInclusive() |
double[] |
getDoubleEnumeration()
get double enumeration.
|
double |
getDoubleMaxExclusive()
get double max exclusive.
|
double |
getDoubleMaxInclusive()
get double max inclusive.
|
double |
getDoubleMinExclusive()
get double min exclusive.
|
double |
getDoubleMinInclusive()
get double min inclusive.
|
String |
getFullDescription()
get full description.
|
String |
getId() |
int[] |
getIEnumerationValues() |
int |
getIMaxExclusive() |
int |
getIMaxInclusive() |
int |
getIMinExclusive() |
int |
getIMinInclusive() |
int[] |
getIntEnumeration()
get int enumeration.
|
int |
getIntMaxExclusive()
get int max exclusive.
|
int |
getIntMaxInclusive()
get int max inclusive.
|
int |
getIntMinExclusive()
get int min exclusive.
|
int |
getIntMinInclusive()
get int min inclusive.
|
boolean |
getIsList()
returns whether ST uses a list.
|
String |
getJavaType() |
nu.xom.Element |
getList() |
int |
getListLength()
get list length.
|
String |
getName()
get name.
|
static String |
getNormalizedValue(String value)
maps datatypes onto simpler values.
|
String |
getPattern()
get pattern.
|
nu.xom.Element |
getRestriction() |
String[] |
getSEnumerationValues() |
nu.xom.Element |
getSimpleType() |
String[] |
getStringEnumeration()
get string enumeration.
|
STMLType[] |
getSubTypes() |
String |
getSummary()
get summary.
|
nu.xom.Element |
getUnion() |
String |
listDataType()
get data type of list.
|
void |
setBase(String base)
set base.
|
void |
setDEnumerationValues(double[] enumerationValues) |
void |
setDescription(String d)
set description.
|
void |
setDMaxExclusive(double maxExclusive) |
void |
setDMaxInclusive(double maxInclusive) |
void |
setDMinExclusive(double minExclusive) |
void |
setDMinInclusive(double minInclusive) |
void |
setEnumeration(double[] dd)
set enumeration.
|
void |
setEnumeration(int[] ii)
set enumeration.
|
void |
setEnumeration(String[] ss)
set enumeration.
|
void |
setId(String id)
set id.
|
void |
setIEnumerationValues(int[] enumerationValues) |
void |
setIMaxExclusive(int maxExclusive) |
void |
setIMaxInclusive(int maxInclusive) |
void |
setIMinExclusive(int minExclusive) |
void |
setIMinInclusive(int minInclusive) |
void |
setIsList(boolean b)
set is list.
|
void |
setJavaType(String javaType) |
void |
setList(boolean isList) |
void |
setList(nu.xom.Element list) |
void |
setListLength(int l)
set list length.
|
void |
setMaxExclusive(double d)
set max exclusive.
|
void |
setMaxExclusive(int i)
set max exclusive.
|
void |
setMaxInclusive(double d)
set max inclusive.
|
void |
setMaxInclusive(int i)
set max inclusive.
|
void |
setMinExclusive(double d)
set min exclusive.
|
void |
setMinExclusive(int i)
set min exclusive.
|
void |
setMinInclusive(double d)
set min exclusive.
|
void |
setMinInclusive(int i)
set min inclusive.
|
void |
setName(String name)
set name.
|
void |
setPattern(String p)
set pattern.
|
void |
setRestriction(nu.xom.Element restriction) |
void |
setSEnumerationValues(String[] enumerationValues) |
void |
setSimpleType(nu.xom.Element simpleType) |
void |
setSubTypes(STMLType[] st)
set subtypes.
|
void |
setSummary(String s)
set summary.
|
void |
setUnion(nu.xom.Element union) |
String |
toString()
to string.
|
public static final String NO_BASE
protected String summary
protected String description
protected String base
protected String name
protected String id
protected boolean isList
protected String pattern
protected int listLength
protected int iMinInclusive
protected int iMinExclusive
protected int iMaxInclusive
protected int iMaxExclusive
protected double dMinInclusive
protected double dMinExclusive
protected double dMaxInclusive
protected double dMaxExclusive
protected STMLType[] subTypes
protected String[] sEnumerationValues
protected int[] iEnumerationValues
protected double[] dEnumerationValues
protected String javaType
protected nu.xom.Element restriction
protected nu.xom.Element union
protected nu.xom.Element list
public STMLType()
public STMLType(STMLType st)
st - public STMLType(nu.xom.Element simpleType)
simpleType - public void createMinMaxAndEnumerations()
public void checkValue(String s) throws RuntimeException
s - the stringRuntimeException - wrong type or pattern failspublic void checkValue(String[] ss) throws RuntimeException
ss - the stringsRuntimeException - wrong type or pattern failspublic void checkValue(int i)
throws RuntimeException
i - the intRuntimeException - wrong type or value failspublic void checkValue(int[] ii)
throws RuntimeException
ii - the intRuntimeException - wrong type or value failspublic void checkValue(double d)
throws RuntimeException
d - the doubleRuntimeException - wrong type or value failspublic void checkValue(double[] dd)
throws RuntimeException
dd - the doubleRuntimeException - wrong type or value failspublic void checkValue(boolean b)
throws RuntimeException
b - the booleanRuntimeException - wrong type or value failspublic void checkValue(boolean[] bb)
throws RuntimeException
bb - the boolean arrayRuntimeException - wrong type or value failspublic String getName()
public void setName(String name)
name - public String getBase()
public void setBase(String base)
base - public void setId(String id)
id - public boolean getIsList()
public void setIsList(boolean b)
b - public void setPattern(String p)
p - public String getPattern()
public int getListLength()
public void setListLength(int l)
l - public void setMinInclusive(int i)
i - public void setMinExclusive(int i)
i - public void setMaxInclusive(int i)
i - public void setMaxExclusive(int i)
i - public void setMinInclusive(double d)
d - public void setMinExclusive(double d)
d - public void setMaxInclusive(double d)
d - public void setMaxExclusive(double d)
d - public int getIntMinInclusive()
public int getIntMinExclusive()
public int getIntMaxInclusive()
public int getIntMaxExclusive()
public double getDoubleMinInclusive()
public double getDoubleMinExclusive()
public double getDoubleMaxInclusive()
public double getDoubleMaxExclusive()
public void setSubTypes(STMLType[] st)
st - public void setEnumeration(String[] ss)
ss - public void setEnumeration(int[] ii)
ii - public void setEnumeration(double[] dd)
dd - public String[] getStringEnumeration()
public int[] getIntEnumeration()
public double[] getDoubleEnumeration()
public int compareTo(STMLType type)
type - to comparepublic String getSummary()
public void setSummary(String s)
s - public String getDescription()
public String getFullDescription()
public void setDescription(String d)
d - public double[] getDEnumerationValues()
public void setDEnumerationValues(double[] enumerationValues)
enumerationValues - the dEnumerationValues to setpublic double getDMaxExclusive()
public void setDMaxExclusive(double maxExclusive)
maxExclusive - the dMaxExclusive to setpublic double getDMaxInclusive()
public void setDMaxInclusive(double maxInclusive)
maxInclusive - the dMaxInclusive to setpublic double getDMinExclusive()
public void setDMinExclusive(double minExclusive)
minExclusive - the dMinExclusive to setpublic double getDMinInclusive()
public void setDMinInclusive(double minInclusive)
minInclusive - the dMinInclusive to setpublic int[] getIEnumerationValues()
public void setIEnumerationValues(int[] enumerationValues)
enumerationValues - the iEnumerationValues to setpublic int getIMaxExclusive()
public void setIMaxExclusive(int maxExclusive)
maxExclusive - the iMaxExclusive to setpublic int getIMaxInclusive()
public void setIMaxInclusive(int maxInclusive)
maxInclusive - the iMaxInclusive to setpublic int getIMinExclusive()
public void setIMinExclusive(int minExclusive)
minExclusive - the iMinExclusive to setpublic int getIMinInclusive()
public void setIMinInclusive(int minInclusive)
minInclusive - the iMinInclusive to setpublic String getJavaType()
public void setJavaType(String javaType)
javaType - the javaType to setpublic nu.xom.Element getList()
public void setList(nu.xom.Element list)
list - the list to setpublic nu.xom.Element getRestriction()
public void setRestriction(nu.xom.Element restriction)
restriction - the restriction to setpublic String[] getSEnumerationValues()
public void setSEnumerationValues(String[] enumerationValues)
enumerationValues - the sEnumerationValues to setpublic nu.xom.Element getSimpleType()
public void setSimpleType(nu.xom.Element simpleType)
simpleType - the simpleType to setpublic nu.xom.Element getUnion()
public void setUnion(nu.xom.Element union)
union - the union to setpublic String getId()
public STMLType[] getSubTypes()
public void setList(boolean isList)
isList - the isList to setpublic String listDataType()
Copyright © 1994–2024 Peter Murray-Rust. All rights reserved.