Public Member Functions | |
XSString () | |
String | createFromJavaObjectCode (String variableName) |
JType | getJType () |
int | getMaxLength () |
int | getMinLength () |
int | getLength () |
String | getWhiteSpace () |
boolean | hasMaxLength () |
boolean | hasMinLength () |
boolean | hasLength () |
boolean | hasWhiteSpace () |
void | setLength (int length) |
void | setMaxLength (int maxLength) |
void | setMinLength (int minLength) |
void | setWhiteSpace (String value) |
void | setFacets (SimpleType simpleType) |
void | validationCode (JSourceCode jsc, String fixedValue, String fieldValidatorInstanceName) |
The XML Schema String type
org.exolab.castor.builder.types.XSString.XSString | ( | ) |
Creates a new XSString
String org.exolab.castor.builder.types.XSString.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 |
Reimplemented from org.exolab.castor.builder.types.XSType.
JType org.exolab.castor.builder.types.XSString.getJType | ( | ) | [virtual] |
Returns the JType that this XSType represents
Implements org.exolab.castor.builder.types.XSType.
int org.exolab.castor.builder.types.XSString.getLength | ( | ) |
Returns the length that this type must have
Referenced by org.exolab.castor.builder.types.XSString.validationCode().
int org.exolab.castor.builder.types.XSString.getMaxLength | ( | ) |
Returns the maximum length occurances of this type can be. A negative value denotes no maximum length
Referenced by org.exolab.castor.builder.types.XSString.validationCode().
int org.exolab.castor.builder.types.XSString.getMinLength | ( | ) |
Returns the minimum length occurances of this type can be.
Referenced by org.exolab.castor.builder.types.XSString.validationCode().
String org.exolab.castor.builder.types.XSString.getWhiteSpace | ( | ) |
Returns the whiteSpace facet of this type
Referenced by org.exolab.castor.builder.types.XSString.validationCode().
boolean org.exolab.castor.builder.types.XSString.hasLength | ( | ) |
Returns true if a length has been set
Referenced by org.exolab.castor.builder.types.XSString.validationCode().
boolean org.exolab.castor.builder.types.XSString.hasMaxLength | ( | ) |
Returns true if a maximum length has been set
Referenced by org.exolab.castor.builder.types.XSString.validationCode().
boolean org.exolab.castor.builder.types.XSString.hasMinLength | ( | ) |
Returns true if a minimum length has been set
Referenced by org.exolab.castor.builder.types.XSString.validationCode().
boolean org.exolab.castor.builder.types.XSString.hasWhiteSpace | ( | ) |
Returns true if the whiteSpace facet is used
Referenced by org.exolab.castor.builder.types.XSString.validationCode().
void org.exolab.castor.builder.types.XSString.setFacets | ( | SimpleType | simpleType | ) | [virtual] |
Reads and sets the facets for XSType
simpleType | the SimpleType containing the facets |
Implements org.exolab.castor.builder.types.XSType.
References org.exolab.castor.builder.types.XSType.getFacets(), org.exolab.castor.xml.schema.Facet.getName(), org.exolab.castor.xml.schema.Facet.getValue(), org.exolab.castor.builder.types.XSString.setLength(), org.exolab.castor.builder.types.XSString.setMaxLength(), org.exolab.castor.builder.types.XSString.setMinLength(), org.exolab.castor.builder.types.XSPatternBase.setPattern(), org.exolab.castor.builder.types.XSString.setWhiteSpace(), and org.exolab.castor.xml.schema.Facet.toInt().
Referenced by org.exolab.castor.builder.TypeConversion.convertType().
void org.exolab.castor.builder.types.XSString.setLength | ( | int | length | ) |
Sets the length of this XSString. While setting the length, the maxLength and minLength are also set up to this length
length | the length to set |
References org.exolab.castor.builder.types.XSString.setMaxLength(), and org.exolab.castor.builder.types.XSString.setMinLength().
Referenced by org.exolab.castor.builder.types.XSString.setFacets().
void org.exolab.castor.builder.types.XSString.setMaxLength | ( | int | maxLength | ) |
Sets the maximum length of this XSString. To remove the max length facet, use a negative value.
maxLength | the maximum length for occurances of this type |
Referenced by org.exolab.castor.builder.types.XSString.setFacets(), and org.exolab.castor.builder.types.XSString.setLength().
void org.exolab.castor.builder.types.XSString.setMinLength | ( | int | minLength | ) |
Sets the minimum length of this XSString.
minLength | the minimum length for occurances of this type |
Referenced by org.exolab.castor.builder.types.XSString.setFacets(), and org.exolab.castor.builder.types.XSString.setLength().
void org.exolab.castor.builder.types.XSString.setWhiteSpace | ( | String | value | ) |
Sets the whiteSpace facet of this XSString.
The value of the whiteSpace facet must be one of the following:
any other value will generate a Warning and set the whiteSpace to preserved
whiteSpace | the whiteSpace value |
Referenced by org.exolab.castor.builder.types.XSString.setFacets().
void org.exolab.castor.builder.types.XSString.validationCode | ( | JSourceCode | jsc, | |
String | fixedValue, | |||
String | fieldValidatorInstanceName | |||
) | [virtual] |
Creates the validation code for an instance of this XSType. The validation code should if necessary create a newly configured TypeValidator, that should then be added to a FieldValidator instance whose name is provided.
fixedValue | a fixed value to use if any | |
jsc | the JSourceCode to fill in. | |
fieldValidatorInstanceName | the name of the FieldValidator that the configured TypeValidator should be added to. |
Implements org.exolab.castor.builder.types.XSType.
References org.exolab.javasource.JSourceCode.add(), org.exolab.javasource.JSourceCode.append(), org.exolab.castor.builder.types.XSType.escapePattern(), org.exolab.castor.builder.types.XSString.getLength(), org.exolab.castor.builder.types.XSString.getMaxLength(), org.exolab.castor.builder.types.XSString.getMinLength(), org.exolab.castor.builder.types.XSPatternBase.getPattern(), org.exolab.castor.builder.types.XSString.getWhiteSpace(), org.exolab.castor.builder.types.XSString.hasLength(), org.exolab.castor.builder.types.XSString.hasMaxLength(), org.exolab.castor.builder.types.XSString.hasMinLength(), and org.exolab.castor.builder.types.XSString.hasWhiteSpace().