The base XML Schema Type class.
ANYURI_TYPE
public static final short ANYURI_TYPE
xsd:anyURI.
BASE64BINARY_TYPE
public static final short BASE64BINARY_TYPE
xsd:base64Binary.
BOOLEAN_TYPE
public static final short BOOLEAN_TYPE
xsd:boolean.
BYTE_TYPE
public static final short BYTE_TYPE
xsd:byte.
CLASS
public static final short CLASS
A user-defined type.
COLLECTION
public static final short COLLECTION
A collection type.
DATETIME_TYPE
public static final short DATETIME_TYPE
xsd:dateTime.
DATE_TYPE
public static final short DATE_TYPE
xsd:date.
DECIMAL_TYPE
public static final short DECIMAL_TYPE
xsd:decimal.
DOUBLE_TYPE
public static final short DOUBLE_TYPE
xsd:double.
DURATION_TYPE
public static final short DURATION_TYPE
xsd:duration.
ENTITIES
public static final short ENTITIES
xsd:ENTITIES.
ENTITY
public static final short ENTITY
xsd:ENTITY.
FLOAT_TYPE
public static final short FLOAT_TYPE
xsd:float.
GDAY_TYPE
public static final short GDAY_TYPE
xsd:gDay.
GMONTHDAY_TYPE
public static final short GMONTHDAY_TYPE
xsd:gMonthDay.
GMONTH_TYPE
public static final short GMONTH_TYPE
xsd:gMonth.
GYEARMONTH_TYPE
public static final short GYEARMONTH_TYPE
xsd:gYearMonth.
GYEAR_TYPE
public static final short GYEAR_TYPE
xsd:gYear.
HEXBINARY_TYPE
public static final short HEXBINARY_TYPE
xsd:hexBinary.
IDREFS_TYPE
public static final short IDREFS_TYPE
xsd:IDREFS.
IDREF_TYPE
public static final short IDREF_TYPE
xsd:IDREF.
ID_TYPE
public static final short ID_TYPE
xsd:ID.
INTEGER_TYPE
public static final short INTEGER_TYPE
xsd:integer.
INT_TYPE
public static final short INT_TYPE
xsd:int.
LANGUAGE_TYPE
public static final short LANGUAGE_TYPE
xsd:language.
LONG_TYPE
public static final short LONG_TYPE
xsd:long.
NAME_TYPE
public static final short NAME_TYPE
xsd:name.
NCNAME_TYPE
public static final short NCNAME_TYPE
xsd:NCNAME.
NEGATIVE_INTEGER_TYPE
public static final short NEGATIVE_INTEGER_TYPE
xsd:negativeInteger.
NMTOKENS_TYPE
public static final short NMTOKENS_TYPE
xsd:NMTOKENS.
NMTOKEN_TYPE
public static final short NMTOKEN_TYPE
xsd:NMTOKEN.
NON_NEGATIVE_INTEGER_TYPE
public static final short NON_NEGATIVE_INTEGER_TYPE
xsd:nonNegativeInteger.
NON_POSITIVE_INTEGER_TYPE
public static final short NON_POSITIVE_INTEGER_TYPE
xsd:nonPositiveInteger.
NORMALIZEDSTRING_TYPE
public static final short NORMALIZEDSTRING_TYPE
xsd:normalizedString.
NOTATION_TYPE
public static final short NOTATION_TYPE
xsd:notation.
NULL
public static final short NULL
Value meaning the type is unassigned.
POSITIVE_INTEGER_TYPE
public static final short POSITIVE_INTEGER_TYPE
xsd:positiveInteger.
QNAME_TYPE
public static final short QNAME_TYPE
xsd:QName.
SHORT_TYPE
public static final short SHORT_TYPE
xsd:short.
STRING_TYPE
public static final short STRING_TYPE
xsd:string.
TIME_TYPE
public static final short TIME_TYPE
xsd:time.
TOKEN_TYPE
public static final short TOKEN_TYPE
xsd:token.
UNSIGNED_BYTE_TYPE
public static final short UNSIGNED_BYTE_TYPE
xsd:unsignedByte.
UNSIGNED_INT_TYPE
public static final short UNSIGNED_INT_TYPE
xsd:unsignedInt.
UNSIGNED_LONG_TYPE
public static final short UNSIGNED_LONG_TYPE
xsd:unsignedLong.
UNSIGNED_SHORT_TYPE
public static final short UNSIGNED_SHORT_TYPE
xsd:unsignedShort.
createDefaultValueWithString
public String createDefaultValueWithString(String variableName)
Creates source code for an additional constructor that deals with default
values as specified in the XML schema instance.
variableName
- Name of the constructor argument.
- Source code for dealing with default values.
createFromJavaObjectCode
public abstract String createFromJavaObjectCode(String variableName)
Returns the string necessary to convert an Object to an instance of this
XSType. This method is really only useful for primitive types.
variableName
- The name of the Object.
- The String necessary to convert an Object to an instance of this XSType.
createToJavaObjectCode
public abstract String createToJavaObjectCode(String variableName)
Returns the string necessary to convert an instance of this XSType to an
Object. This method is really only useful for primitive types.
variableName
- The name of the instance variable.
- The String necessary to convert an instance of this XSType to an Object.
getJType
public abstract JType getJType()
Returns the JType that this XSType represents.
- The JType that this XSType represents.
getName
public abstract String getName()
Returns the name of this XSType.
getType
public abstract short getType()
Returns the type of this XSType.
isCollection
public boolean isCollection()
Returns true if this XSType represents a collection.
- True if this XSType represents a collection.
isDateTime
public abstract boolean isDateTime()
Returns true if the XSType represents an XML Schema date/time type.
- True if the XSType represents an XML Schema date/time type.
isEnumerated
public final boolean isEnumerated()
Returns true if this XSType represents an enumerated type.
- True if this XSType represents an enumerated type.
isPrimitive
public abstract boolean isPrimitive()
Returns true if this XSType represents a primitive type.
- True if this XSType represents a primitive type.
newInstanceCode
public abstract String newInstanceCode()
Returns the Java code neccessary to create a new instance of the JType
associated with this XSType.
- The Java code neccessary to create a new instance.
setAsEnumerated
public final void setAsEnumerated(boolean enumerated)
Sets the enumerated flag for this XSClass.
enumerated
- A boolean indicating whether or not this XSClass represents an
enumerated type.
setFacet
protected abstract void setFacet(Facet facet)
Set the given facet for XSType if applicable.
facet
- The facet to set for XSType.
setFacets
public final void setFacets(SimpleType simpleType)
Reads and sets the facets for XSType.
simpleType
- The SimpleType containing the facets.
validationCode
public abstract void validationCode(JSourceCode jsc,
String fixedValue,
String validatorInstanceName)
Creates the validation code for an instance of this XSType. If necessary the validation
code should create a newly configured TypeValidator, that should then be added to a
FieldValidator instance whose name is provided.
jsc
- The JSourceCode to fill in.fixedValue
- A fixed value to use if any.validatorInstanceName
- The name of the FieldValidator that the configured
TypeValidator should be added to.