oracle.xml.parser.schema
Class XSDSimpleType

oracle.xml.parser.schema.XSDSimpleType

public class XSDSimpleType
implements XSDTypeConstants


Fields inherited from interface oracle.xml.parser.schema.XSDTypeConstants
_atomic, _base64, _collapse, _hex, _preserve, _replace, ANY_SIMPLE, ANY_URI, BASE64_BINARY, BINARY, BOOLEAN, BYTE, CDATA, CENTURY, DATE, DATE_TIME, DECIMAL, DOUBLE, DURATION, ENCODING, ENTITIES, ENTITY, ENUMERATION, FLOAT, FRACTION_DIGITS, GDAY, GMONTH, GMONTH_DAY, GYEAR, GYEAR_MONTH, HEX_BINARY, iANY_SIMPLE, iANY_URI, iBASE64_BINARY, iBOOLEAN, ID, iDATE, iDATE_TIME, iDECIMAL, iDOUBLE, IDREF, IDREFS, iDUMMY, iDURATION, iENUMERATION, iFLOAT, iFRACTION_DIGITS, iGDAY, iGMONTH, iGMONTH_DAY, iGYEAR, iGYEAR_MONTH, iHEX_BINARY, iLENGTH, iMAXEXCLUSIVE, iMAXINCLUSIVE, iMAXLENGTH, iMINEXCLUSIVE, iMININCLUSIVE, iMINLENGTH, iNOTATION, INT, INTEGER, iPATTERN, iQNAME, iSTRING, iTIME, iTOTAL_DIGITS, iWHITESPACE, LANGUAGE, LENGTH, LONG, MAXEXCLUSIVE, MAXINCLUSIVE, MAXLENGTH, MINEXCLUSIVE, MININCLUSIVE, MINLENGTH, MONTH, N_STRING, NAME, NCNAME, NEGATIVE_INTEGER, nFacets, NMTOKEN, NMTOKENS, NON_NEGATIVE_INTEGER, NON_POSITIVE_INTEGER, PATTERN, PERIOD, POSITIVE_INTEGER, PRECISION, QNAME, RECURRING_DATE, RECURRING_DAY, RECURRING_DURATION, SCALE, sFacets, SHORT, SNOTATION, STRING, sTypes, TIME, TIME_DURATION, TIME_INSTANT, TIME_PERIOD, TOKEN, TOTAL_DIGITS, UNSIGNED_BYTE, UNSIGNED_INT, UNSIGNED_LONG, UNSIGNED_SHORT, URI_REFERENCE, WHITESPACE, YEAR
 
Constructor Summary
XSDSimpleType()
          Default constructor
XSDSimpleType(int basic, java.lang.String tnm)
           
 
Method Summary
static XSDSimpleType derivedFrom(XSDSimpleType source, java.lang.String nm, java.lang.String var)
          Derive a type from the given base type
 XSDSimpleType getBase()
           
 int getBasicType()
          Gets the basic type from which this type was derived.
static java.util.Hashtable getBuiltInDatatypes()
          Gets a built-in datatype
 XSDConstrainingFacet[] getFacets()
          Get the facets
 int getMaxOccurs()
          Get the value of maxOccurs
 int getMinOccurs()
          Get the value of minOccurs
 java.lang.String getVariety()
          Get the variety of the type
 boolean isAbstract()
           
 void setFacet(java.lang.String facetName, java.lang.String value)
          Sets a facet for the datatype (Internal private API)
 void setMaxOccurs(int max)
          Set the value of maxOccurs
 void setMinOccurs(int min)
          Set the value of minOccurs
 void setSource(XSDNode src)
          Sets the base type of the datatype, or in case of aggregate types sets the type of the component of the aggregate type
 void validateValue(java.lang.String val)
          Validates the string value with the facets defined for this type
 

Constructor Detail

XSDSimpleType

public XSDSimpleType()
Default constructor

XSDSimpleType

public XSDSimpleType(int basic,
                     java.lang.String tnm)
Method Detail

derivedFrom

public static XSDSimpleType derivedFrom(XSDSimpleType source,
                                        java.lang.String nm,
                                        java.lang.String var)
                                 throws XSDException
Derive a type from the given base type
Parameters:
source - XSDSimpleType The base type
nm - String The name of the new type
var - String The method of derivation
Throws:
java.lang.Exception - if new type can not be created.

getBasicType

public int getBasicType()
Gets the basic type from which this type was derived.
Returns:
basicType

isAbstract

public boolean isAbstract()

getBase

public XSDSimpleType getBase()

getFacets

public XSDConstrainingFacet[] getFacets()
Get the facets
Returns:
facets

getVariety

public java.lang.String getVariety()
Get the variety of the type
Returns:
variety

getBuiltInDatatypes

public static java.util.Hashtable getBuiltInDatatypes()
                                               throws XSDException
Gets a built-in datatype
Parameters:
type - Name of the built-in type
Throws:
XSDException - if the type is not a valid name

getMinOccurs

public int getMinOccurs()
Get the value of minOccurs
Returns:
1

getMaxOccurs

public int getMaxOccurs()
Get the value of maxOccurs
Returns:
1

setMinOccurs

public void setMinOccurs(int min)
Set the value of minOccurs
Parameters:
minOccurs -  

setMaxOccurs

public void setMaxOccurs(int max)
Set the value of maxOccurs
Parameters:
maxOccurs -  

setSource

public void setSource(XSDNode src)
               throws XSDException
Sets the base type of the datatype, or in case of aggregate types sets the type of the component of the aggregate type
Parameters:
src - XSDNode source
Throws:
XSDException - if the src is not a valid type

validateValue

public void validateValue(java.lang.String val)
                   throws java.lang.Exception
Validates the string value with the facets defined for this type
Parameters:
val - value to be validated
Throws:
XSDException - if the value is not valid

setFacet

public void setFacet(java.lang.String facetName,
                     java.lang.String value)
              throws XSDException
Sets a facet for the datatype (Internal private API)
Parameters:
facetName - Name of the facet being set
value - Value of the facet
Throws:
XSDException - if the facet is invalid