com.jaxfront.core.schema
Interface SchemaSimpleType

All Superinterfaces:
QName, SchemaType
All Known Implementing Classes:
SchemaSimpleTypeImpl

public interface SchemaSimpleType
extends SchemaType

Represent a simple XML schema type. The XSD constants from the W3C XML Schema specification are defined in the XSD Oracle Parser (oracle.xml.parser.schema.XSDTypeConstants)


Field Summary
static short WHITESPACE_COLLAPSE
           
static short WHITESPACE_PRESERVE
           
static short WHITESPACE_REPLACE
           
 
Fields inherited from interface com.jaxfront.core.schema.SchemaType
NO_NAME
 
Method Summary
 java.lang.String[] getChoices()
          Returns the possible choice values (from the facet 'enumeration') defined in a XML Schema.
 java.util.Hashtable getEnumerationAnnotation(java.lang.String enumeration)
          Return an annotation for an enumeration entry for the passed value or null if none has been defined in the XSD.
 int getFractionDigits()
           
 double getMaxExclValue()
           
 double getMaxInclValue()
           
 long getMaxLength()
          Returns the required maximum length.
 double getMinExclValue()
           
 double getMinInclValue()
           
 long getMinLength()
          Returns the required minimum length.
 int getPrimitiveDataType()
          Returns the index of the primitive data type. e.q.
 java.lang.String getRegularExpression()
          Returns the regular expression if any.
 int getTotalDigits()
           
 short getWhitespace()
           
 boolean hasRegularExpression()
          Returns true if a regular expression is defined for this type.
 boolean isAnyType()
          Returns true if the content of this type can be of any type
 boolean isAttribute()
          Returns true if this type is an attribute.
 boolean isBoolean()
          Returns if the primitive data type of this type is Boolean.
 boolean isDate()
          Returns if the primitive data type of this type is Date.
 boolean isDateTime()
          Returns if the primitive data type of this type is DateTime.
 boolean isDouble()
          Returns if the primitive data type of this type is a double.
 boolean isDuration()
          Returns if the primitive data type of this type is Duration.
 boolean isFloat()
          Returns if the primitive data type of this type is a float.
 boolean isFloatingNumber()
           
 boolean isID()
          Returns true if the primitive data type is an ID.
 boolean isNumber()
          Returns if the primitive data type of this type is a number like Float, Double or Decimal.
 boolean isString()
          Returns if the primitive data type of this type is String.
 boolean isTime()
          Returns if the primitive data type of this type is Date.
 void validate(SimpleType source, java.lang.String value)
          Validates a string against the defined facets in the XML Schema.
 
Methods inherited from interface com.jaxfront.core.schema.SchemaType
addRecursiveElement, countSubNodes, getBaseName, getChoiceMaxOccurs, getChoiceMinOccurs, getName, getNamespacePrefix, getParserXSDNode, getQName, getRecursiveElementNames, getRecursiveElements, getSchemaElement, getType, hasBeenAnalysed, isAbstract, isChoice, isEmptyComplexType, isGlobal, isGroup, isMixedContent, isRecursive, isSimple, release, setIsSimpleContent, setRecursive, setType
 
Methods inherited from interface com.jaxfront.core.schema.QName
getNamespace, getRefName
 

Field Detail

WHITESPACE_COLLAPSE

static final short WHITESPACE_COLLAPSE
See Also:
Constant Field Values

WHITESPACE_PRESERVE

static final short WHITESPACE_PRESERVE
See Also:
Constant Field Values

WHITESPACE_REPLACE

static final short WHITESPACE_REPLACE
See Also:
Constant Field Values
Method Detail

getChoices

java.lang.String[] getChoices()
Returns the possible choice values (from the facet 'enumeration') defined in a XML Schema. Returns an empty string array if no enumeration defined.


getEnumerationAnnotation

java.util.Hashtable getEnumerationAnnotation(java.lang.String enumeration)
Return an annotation for an enumeration entry for the passed value or null if none has been defined in the XSD.


getFractionDigits

int getFractionDigits()

getMaxExclValue

double getMaxExclValue()

getMaxInclValue

double getMaxInclValue()

getMaxLength

long getMaxLength()
Returns the required maximum length.


getMinExclValue

double getMinExclValue()

getMinInclValue

double getMinInclValue()

getMinLength

long getMinLength()
Returns the required minimum length.


getPrimitiveDataType

int getPrimitiveDataType()
Returns the index of the primitive data type. e.q. SimpleType.LONG defined in the oracle.xml.parser.schema.XSDTypeConstants.


getRegularExpression

java.lang.String getRegularExpression()
Returns the regular expression if any.


getTotalDigits

int getTotalDigits()

getWhitespace

short getWhitespace()

hasRegularExpression

boolean hasRegularExpression()
Returns true if a regular expression is defined for this type.


isAnyType

boolean isAnyType()
Returns true if the content of this type can be of any type

Returns:

isAttribute

boolean isAttribute()
Returns true if this type is an attribute.


isBoolean

boolean isBoolean()
Returns if the primitive data type of this type is Boolean.

Returns:
true, if the primitive data type of this type is Boolean, false otherwise

isDate

boolean isDate()
Returns if the primitive data type of this type is Date.

Returns:
true, if the primitive data type of this type is Date, false otherwise

isDateTime

boolean isDateTime()
Returns if the primitive data type of this type is DateTime.

Returns:
true, if the primitive data type of this type is DateTime, false otherwise

isDouble

boolean isDouble()
Returns if the primitive data type of this type is a double.


isDuration

boolean isDuration()
Returns if the primitive data type of this type is Duration.

Returns:
true, if the primitive data type of this type is Duration, false otherwise

isFloat

boolean isFloat()
Returns if the primitive data type of this type is a float.


isFloatingNumber

boolean isFloatingNumber()

isID

boolean isID()
Returns true if the primitive data type is an ID.


isNumber

boolean isNumber()
Returns if the primitive data type of this type is a number like Float, Double or Decimal.

Returns:
true, if the primitive data type of this type is a number, false otherwise

isString

boolean isString()
Returns if the primitive data type of this type is String.

Returns:
true, if the primitive data type of this type is String, false otherwise

isTime

boolean isTime()
Returns if the primitive data type of this type is Date.

Returns:
true, if the primitive data type of this type is Date, false otherwise

validate

void validate(SimpleType source,
              java.lang.String value)
              throws ValidationException
Validates a string against the defined facets in the XML Schema.

Throws:
ValidationException - thrown if the submitted string is not valid