Public Member Functions | |
XSNormalizedString () | |
String | createFromJavaObjectCode (String variableName) |
JType | getJType () |
int | getMaxLength () |
int | getMinLength () |
int | getLength () |
boolean | hasMaxLength () |
boolean | hasMinLength () |
boolean | hasLength () |
void | setLength (int length) |
void | setMaxLength (int maxLength) |
void | setMinLength (int minLength) |
void | setFacets (SimpleType simpleType) |
void | validationCode (JSourceCode jsc, String fixedValue, String fieldValidatorInstanceName) |
The XSType representing a normalizedString type.
normalizedString is simply a XSString with some specific validation
org.exolab.castor.builder.types.XSNormalizedString.XSNormalizedString | ( | ) |
Creates a new XSString
String org.exolab.castor.builder.types.XSNormalizedString.createFromJavaObjectCode | ( | String | variableName | ) |
Returns the Cdata 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.XSNormalizedString.getJType | ( | ) | [virtual] |
Returns the JType that this XSType represents
Implements org.exolab.castor.builder.types.XSType.
int org.exolab.castor.builder.types.XSNormalizedString.getLength | ( | ) |
Returns the length that this type must have
Referenced by org.exolab.castor.builder.types.XSNormalizedString.validationCode().
int org.exolab.castor.builder.types.XSNormalizedString.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.XSNormalizedString.validationCode().
int org.exolab.castor.builder.types.XSNormalizedString.getMinLength | ( | ) |
Returns the minimum length occurances of this type can be.
Referenced by org.exolab.castor.builder.types.XSNormalizedString.validationCode().
boolean org.exolab.castor.builder.types.XSNormalizedString.hasLength | ( | ) |
Returns true if a length has been set
Referenced by org.exolab.castor.builder.types.XSNormalizedString.validationCode().
boolean org.exolab.castor.builder.types.XSNormalizedString.hasMaxLength | ( | ) |
Returns true if a maximum length has been set
Referenced by org.exolab.castor.builder.types.XSNormalizedString.validationCode().
boolean org.exolab.castor.builder.types.XSNormalizedString.hasMinLength | ( | ) |
Returns true if a minimum length has been set
Referenced by org.exolab.castor.builder.types.XSNormalizedString.validationCode().
void org.exolab.castor.builder.types.XSNormalizedString.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.XSNormalizedString.setLength(), org.exolab.castor.builder.types.XSNormalizedString.setMaxLength(), org.exolab.castor.builder.types.XSNormalizedString.setMinLength(), org.exolab.castor.builder.types.XSPatternBase.setPattern(), and org.exolab.castor.xml.schema.Facet.toInt().
Referenced by org.exolab.castor.builder.TypeConversion.convertType().
void org.exolab.castor.builder.types.XSNormalizedString.setLength | ( | int | length | ) |
Sets the length of this XSCDATA 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.XSNormalizedString.setMaxLength(), and org.exolab.castor.builder.types.XSNormalizedString.setMinLength().
Referenced by org.exolab.castor.builder.types.XSNormalizedString.setFacets().
void org.exolab.castor.builder.types.XSNormalizedString.setMaxLength | ( | int | maxLength | ) |
Sets the maximum length of this XSCDATA. 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.XSNormalizedString.setFacets(), and org.exolab.castor.builder.types.XSNormalizedString.setLength().
void org.exolab.castor.builder.types.XSNormalizedString.setMinLength | ( | int | minLength | ) |
Sets the minimum length of this XSCDATA.
minLength | the minimum length for occurances of this type |
Referenced by org.exolab.castor.builder.types.XSNormalizedString.setFacets(), and org.exolab.castor.builder.types.XSNormalizedString.setLength().
void org.exolab.castor.builder.types.XSNormalizedString.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.XSNormalizedString.getLength(), org.exolab.castor.builder.types.XSNormalizedString.getMaxLength(), org.exolab.castor.builder.types.XSNormalizedString.getMinLength(), org.exolab.castor.builder.types.XSPatternBase.getPattern(), org.exolab.castor.builder.types.XSNormalizedString.hasLength(), org.exolab.castor.builder.types.XSNormalizedString.hasMaxLength(), and org.exolab.castor.builder.types.XSNormalizedString.hasMinLength().