Oracle® Database XML Java API Reference
10g Release 2 (10.2)

B14293-01


oracle.xml.parser.schema
Class XSDSimpleType

java.lang.Object
  extended byoracle.xml.parser.schema.XSDNode
      extended byoracle.xml.parser.schema.XSDSimpleType

All Implemented Interfaces:
XSDConstantValues, XSDParticleNode, XSDTypeConstants

public class XSDSimpleType
extends XSDNode
implements XSDParticleNode, XSDTypeConstants

This class represents Schema simpleType definitions


Field Summary
static XSDSimpleType dayTimeDuration
static XSDSimpleType untypedAtomic
static XSDSimpleType yearMonthDuration

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, DAYTIME_DURATION, DECIMAL, DOUBLE, DURATION, ENCODING, ENTITIES, ENTITY, ENUMERATION, fDAYTIME, fFINITE, fID, fIDREF, fINTEGER, FLOAT, fNUMERIC, fORDERED, FRACTION_DIGITS, fYEARMONTH, GDAY, GMONTH, GMONTH_DAY, GYEAR, GYEAR_MONTH, HEX_BINARY, iANY_SIMPLE, iANY_URI, iBASE64_BINARY, iBOOLEAN, iBYTE, ID, iDATE, iDATE_TIME, iDAYTIME_DURATION, iDECIMAL, iDOUBLE, IDREF, IDREFS, iDUMMY, iDURATION, iENTITIES, iENTITY, iENUMERATION, iFLOAT, iFRACTION_DIGITS, iGDAY, iGMONTH, iGMONTH_DAY, iGYEAR, iGYEAR_MONTH, iHEX_BINARY, iID, iIDREF, iIDREFS, iINT, iINTEGER, iLANGUAGE, iLENGTH, iLONG, iMAXEXCLUSIVE, iMAXINCLUSIVE, iMAXLENGTH, iMINEXCLUSIVE, iMININCLUSIVE, iMINLENGTH, iN_STRING, iNAME, iNCNAME, iNEGATIVE_INTEGER, iNMTOKEN, iNMTOKENS, iNON_NEGATIVE_INTEGER, iNON_POSITIVE_INTEGER, iNOTATION, INT, INTEGER_STR, iPATTERN, iPOSITIVE_INTEGER, iQNAME, iSHORT, iSTRING, iTIME, iTOKEN, iTOTAL_DIGITS, iUNSIGNED_BYTE, iUNSIGNED_INT, iUNSIGNED_LONG, iUNSIGNED_SHORT, iWHITESPACE, iYEARMONTH_DURATION, LANGUAGE, LENGTH, LONG, MAXEXCLUSIVE, MAXINCLUSIVE, MAXLENGTH, MINEXCLUSIVE, MININCLUSIVE, MINLENGTH, MONTH, N_STRING, NAME, nBUILTIN, NCNAME, NEGATIVE_INTEGER, nFacets, NMTOKEN, NMTOKENS, NON_NEGATIVE_INTEGER, NON_POSITIVE_INTEGER, nPRIMITIVE, 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, UNTYPED_ATOMIC, URI_REFERENCE, WHITESPACE, YEAR, YEARMONTH_DURATION

Fields inherited from interface oracle.xml.parser.schema.XSDConstantValues
_abstract, _all, _annotation, _any, _anyAttribute, _anySimpleType, _anyType, _appinfo, _attrFormDefault, _attribute, _attributeGroup, _attrTag, _base, _block, _blockDefault, _choice, _complexContent, _complexType, _content, _default, _derivedBy, _documentation, _element, _elementOnly, _elemFormDefault, _empty, _enumeration, _equivClass, _extension, _false, _field, _final, _finalDefault, _fixed, _form, _group, _id, _import, _include, _itemType, _key, _keyref, _lax, _list, _maxOccurs, _memberTypes, _minOccurs, _mixed, _nall, _name, _namespace, _nil, _nillable, _nnany, _nnlist, _nnlocal, _nnother, _nntargetNS, _noNSSchemaLocation, _notation, _null, _nullable, _optional, _pattern, _processContents, _prohibited, _publicid, _qualified, _redefine, _ref, _refer, _required, _restriction, _restrictions, _schema, _schemaLocation, _selector, _sequence, _simpleContent, _simpleType, _skip, _strict, _substitution, _substitutionGrp, _systemid, _targetNS, _textOnly, _this, _true, _type, _undef, _union, _unique, _unqualified, _use, _value, _version, _xmlns, ABSENT_NS, ACCEPTED, ALL, ANNOTATION, ANY, ANY_ATTRIBUTE, ANY_NODE, ATTRIBUTE, ATTRIBUTE_GROUP, AUTO_VALIDATION, BASE_RESOLVED, BASE_UNRESOLVED, BASE_URL, BUILD_FAIL, CHOICE, CIRCULAR_SUBST, CONFLICIT_FACET, constName, DATATYPE, DEEP_VALIDATION, derivationBlock, DONE, DUPLICATE_DEF, duplicateId, ELEMENT, ELEMENT_CHILD, ELEMENT_ONLY, elemNotNullable, EMPTY, ENTITY_RESOLVER, EQUIV_RESOLVED, EQUIV_UNRESOLVED, ERROR, EXTENTION, FACET_CHILD, FAKE_ATTR, FAKE_NODE, FIXED_SCHEMA, GROUP, IABSTRACT, IBLOCKEXT, IBLOCKRST, IBLOCKSUB, IDENTITY_ERROR, IDENTITY_KEY, IDENTITY_KEYREF, IDENTITY_UNIQUE, IFINALEXT, IFINALLIST, IFINALRST, IFINALUNION, IMPORT, INCLUDE, INCORRECT_ATTR, INCORRECT_ELEM, INFINITY, INTERNAL_ERROR, INVALID_DERIVATION, INVALID_FACET, INVALID_FACET_VALUE, INVALID_NOTATION, INVALID_REGEX, INVALID_SCHEMA_NS, INVALID_TYPE_VALUE, invalidAttr, invalidAttrVal, invalidChars, invalidElem, invalidFixedChars, invalidNS, invalidPrefix, invalidProperty, invalidRef, invalidSubstitution, invalidTargetNS, LAX_VALIDATION, MISSING_NS, missingAttr, MIXED, NEW_STATE, NO_CHILD, noDefinition, NOT_DONE, NOTATION, notComplete, notSubstitutable, notSubTypeOf, NS_CONFLICT, NS_DIF_SPECIFIED, NS_NOT_ALLOWED, NS_NOT_EXPECTED, NS_NOT_SAME, NS_RESOLVER, REDEFINE, REF_RESOLVED, REF_UNRESOLVED, RESTRICTION, ROOT_ELEMENT, ROOT_NODE, ROOT_TYPE, SCHEMA_NS, SEQ, STRICT_VALIDATION, TEXT_ONLY, TOP_LEVEL, TYPE, TYPE_RESOLVED, TYPE_UNRESOLVED, UNDEF, unexpectedAttr, unexpectedElem, VALIDATION_MODE, VIOLATE_FACET, XDTNS, XSDRECNS, XSDRECTYPENS, XSIRECNS, XSITYPE_ABSENT

Constructor Summary
XSDSimpleType(int basic, java.lang.String tnm)
Deprecated.

Method Summary
int compareValues(java.lang.String str1, java.lang.String str2)
static XSDSimpleType derivedFrom(XSDSimpleType source, java.lang.String nm, java.lang.String var)
Deprecated.
XSDSimpleType getBase()
int getBasicType()
Gets the basic type from which this type was derived.
static int getBasicType(int btype)
Gets the basic type from which this type was derived.
static java.util.Hashtable getBuiltInDatatypes()
Gets all built-in datatype
int getBuiltInId()
Gets the id of builtIn type from which this type was derived.
XSDConstrainingFacet[] getFacets()
Get the facets
static XSDSimpleType getPrimitiveType(int itype)
Get primitive type
java.lang.String getTargetNS()
Get target namespace
java.lang.String getVariety()
Get the variety of the type
java.lang.String getWSFacetValue()
Get the value for the whitespace facet
boolean hasFlag(int flag)
Check proprety indicated by the flag
boolean isAbstract()
boolean isPrimitive()
void setFacet(java.lang.String fname, java.lang.String value)
Sets a facet for restriction
void validateValue(java.lang.String val)
Validates the string value with the facets defined for this type

Methods inherited from class oracle.xml.parser.schema.XSDNode
getName, getNodeType, getOwnerSchema, getRefLocalname, isNodeType

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface oracle.xml.parser.schema.XSDParticleNode
getMaxOccurs, getMinOccurs, setMaxOccurs, setMinOccurs

Field Detail

yearMonthDuration

public static final XSDSimpleType yearMonthDuration

dayTimeDuration

public static final XSDSimpleType dayTimeDuration

untypedAtomic

public static final XSDSimpleType untypedAtomic

Constructor Detail

XSDSimpleType

public XSDSimpleType(int basic,
                     java.lang.String tnm)
Deprecated.
Constructor for built-in types

Method Detail

hasFlag

public boolean hasFlag(int flag)
Check proprety indicated by the flag
Parameters:
flag - - the flag to be check
Returns:
true is the flag is set, false otherwise

getTargetNS

public java.lang.String getTargetNS()
Get target namespace
Overrides:
getTargetNS in class XSDNode
Returns:
tagetNS

isPrimitive

public boolean isPrimitive()

getPrimitiveType

public static XSDSimpleType getPrimitiveType(int itype)
Get primitive type
Returns:
the primitive simple type

derivedFrom

public static XSDSimpleType derivedFrom(XSDSimpleType source,
                                        java.lang.String nm,
                                        java.lang.String var)
                                 throws XSDException
Deprecated.
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:
XSDException - if new type can not be created.

getBasicType

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

getBasicType

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

getBuiltInId

public int getBuiltInId()
Gets the id of builtIn type from which this type was derived.
Returns:
the buitIn type id this type belongs to

isAbstract

public boolean isAbstract()

getBase

public XSDSimpleType getBase()

getWSFacetValue

public java.lang.String getWSFacetValue()
Get the value for the whitespace facet
Returns:
one of preserve, replace or collapse, "" for anySimple

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 all built-in datatype
Throws:
XSDException

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
java.lang.Exception

compareValues

public int compareValues(java.lang.String str1,
                         java.lang.String str2)

setFacet

public void setFacet(java.lang.String fname,
                     java.lang.String value)
              throws XSDException
Sets a facet for restriction
Parameters:
value - Value of the facet
Throws:
XSDException - if the facet is invalid

Oracle® Database XML Java API Reference
10g Release 2 (10.2)

B14293-01


Copyright © 2003, 2005, Oracle. All rights reserved.