|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.builder.types.XSType
org.exolab.castor.builder.types.XSPatternBase
org.exolab.castor.builder.types.XSString
public final class XSString
The XML Schema String type
Field Summary |
---|
Constructor Summary | |
---|---|
XSString()
Creates a new XSString |
Method Summary | |
---|---|
java.lang.String |
createFromJavaObjectCode(java.lang.String variableName)
Returns the String necessary to convert an Object to an instance of this XSType. |
JType |
getJType()
Returns the JType that this XSType represents |
int |
getLength()
Returns the length that this type must have |
int |
getMaxLength()
Returns the maximum length occurances of this type can be. |
int |
getMinLength()
Returns the minimum length occurances of this type can be. |
java.lang.String |
getWhiteSpace()
Returns the whiteSpace facet of this type |
boolean |
hasLength()
Returns true if a length has been set |
boolean |
hasMaxLength()
Returns true if a maximum length has been set |
boolean |
hasMinLength()
Returns true if a minimum length has been set |
boolean |
hasWhiteSpace()
Returns true if the whiteSpace facet is used |
void |
setFacets(SimpleType simpleType)
Reads and sets the facets for XSType |
void |
setLength(int length)
Sets the length of this XSString. |
void |
setMaxLength(int maxLength)
Sets the maximum length of this XSString. |
void |
setMinLength(int minLength)
Sets the minimum length of this XSString. |
void |
setWhiteSpace(java.lang.String value)
Sets the whiteSpace facet of this XSString. |
void |
validationCode(JSourceCode jsc,
java.lang.String fixedValue,
java.lang.String fieldValidatorInstanceName)
Creates the validation code for an instance of this XSType. |
Methods inherited from class org.exolab.castor.builder.types.XSPatternBase |
---|
getPattern, setPattern |
Methods inherited from class org.exolab.castor.builder.types.XSType |
---|
createToJavaObjectCode, escapePattern, getFacets, getName, getType, isDateTime, isEnumerated, isPrimitive, newInstanceCode, setAsEnumerated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XSString()
Method Detail |
---|
public java.lang.String createFromJavaObjectCode(java.lang.String variableName)
createFromJavaObjectCode
in class XSType
variableName
- the name of the Object
public JType getJType()
getJType
in class XSType
public int getMaxLength()
public int getMinLength()
public int getLength()
public java.lang.String getWhiteSpace()
public boolean hasMaxLength()
public boolean hasMinLength()
public boolean hasLength()
public boolean hasWhiteSpace()
public void setLength(int length)
length
- the length to setsetMaxLength(int)
,
setMinLength(int)
public void setMaxLength(int maxLength)
maxLength
- the maximum length for occurances of this typepublic void setMinLength(int minLength)
minLength
- the minimum length for occurances of this typepublic void setWhiteSpace(java.lang.String value)
Sets the whiteSpace facet of this XSString.
The value of the whiteSpace facet must be one of the following:
value
- the whiteSpace valuepublic void setFacets(SimpleType simpleType)
XSType
setFacets
in class XSType
simpleType
- the SimpleType containing the facetspublic void validationCode(JSourceCode jsc, java.lang.String fixedValue, java.lang.String fieldValidatorInstanceName)
validationCode
in class XSType
fixedValue
- a fixed value to use if anyjsc
- the JSourceCode to fill in.fieldValidatorInstanceName
- the name of the FieldValidator
that the configured TypeValidator should be added to.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |