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)

Version:
1.60

Field Summary
 
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()
           
 java.lang.String 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 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(Type 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
 

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.


getPrimitiveDataType

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


isAttribute

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


isID

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


validate

void validate(Type 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

getMinLength

long getMinLength()
Returns the required minimum length.


getMaxLength

long getMaxLength()
Returns the required maximum length.


getMinInclValue

double getMinInclValue()

getMaxInclValue

double getMaxInclValue()

getMinExclValue

double getMinExclValue()

getMaxExclValue

double getMaxExclValue()

getFractionDigits

int getFractionDigits()

getTotalDigits

int getTotalDigits()

getWhitespace

java.lang.String getWhitespace()

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

isFloat

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


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

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

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

hasRegularExpression

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


getRegularExpression

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


isAnyType

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

Returns:

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.


isDouble

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