Public Member Functions

org.exolab.castor.builder.types.XSString Class Reference

Inheritance diagram for org.exolab.castor.builder.types.XSString:
org.exolab.castor.builder.types.XSPatternBase org.exolab.castor.builder.types.XSType

List of all members.

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)

Detailed Description

The XML Schema String type

Author:
Keith Visco
Version:
Revision:
1.4
Date:
2004/10/01 13:24:47

Constructor & Destructor Documentation

org.exolab.castor.builder.types.XSString.XSString (  ) 

Creates a new XSString


Member Function Documentation

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

Parameters:
variableName the name of the Object
Returns:
the String necessary to convert an Object to an instance of this XSType

Reimplemented from org.exolab.castor.builder.types.XSType.

JType org.exolab.castor.builder.types.XSString.getJType (  )  [virtual]

Returns the JType that this XSType represents

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

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

Returns:
the maximum length facet

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.

Returns:
the minimum length facet

Referenced by org.exolab.castor.builder.types.XSString.validationCode().

String org.exolab.castor.builder.types.XSString.getWhiteSpace (  ) 

Returns the whiteSpace facet of this type

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

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

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

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

Returns:
true if the whiteSpace facet is used

Referenced by org.exolab.castor.builder.types.XSString.validationCode().

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

Parameters:
length the length to set
See also:
setMaxLength
setMinLength

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.

Parameters:
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.

Parameters:
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:

  • preserve
  • replace
  • collapse

any other value will generate a Warning and set the whiteSpace to preserved

Parameters:
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.

Parameters:
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().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties