Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.exolab.castor.xml.schema.Structure
org.exolab.castor.xml.schema.Annotated
org.exolab.castor.xml.schema.XMLType
org.exolab.castor.xml.schema.SimpleType
Field Summary | |
static String |
|
static String |
|
static String |
|
static String |
|
Fields inherited from class org.exolab.castor.xml.schema.XMLType | |
NULL_ARGUMENT |
Fields inherited from class org.exolab.castor.xml.schema.Structure | |
ANNOTATION , ANYTYPE , APPINFO , ATTRIBUTE , ATTRIBUTE_GROUP , COMPLEX_CONTENT , COMPLEX_TYPE , DOCUMENTATION , ELEMENT , FACET , GROUP , IDENTITY_FIELD , IDENTITY_SELECTOR , KEY , KEYREF , LIST , MODELGROUP , MODELGROUP_REF , REDEFINE , SCHEMA , SIMPLE_CONTENT , SIMPLE_TYPE , UNION , UNIQUE , UNKNOWN , WILDCARD |
Constructor Summary | |
|
Method Summary | |
void | |
protected void |
|
protected SimpleType |
|
SimpleType |
|
Facet |
|
Enumeration |
|
Enumeration |
|
String |
|
Long |
|
Enumeration |
|
Long |
|
Long |
|
Structure |
|
String |
|
short |
|
int |
|
boolean |
|
boolean |
|
protected static SimpleType |
|
void |
|
protected void | |
(package private) void |
|
void |
|
Methods inherited from class org.exolab.castor.xml.schema.XMLType | |
getBaseType , getDerivationMethod , getId , getName , getSchema , getType , isAnyType , isComplexType , isSimpleType , setBaseType , setDerivationMethod , setId , setName , setParent , setSchema |
Methods inherited from class org.exolab.castor.xml.schema.Annotated | |
addAnnotation , getAnnotations , removeAnnotation |
Methods inherited from class org.exolab.castor.xml.schema.Structure | |
getStructureType , isValid , validate |
public static final String FINAL_ALL
The value of the final attribute used for blocking all types of derivation
public static final String FINAL_LIST
The value of the final attribute used for blocking list derivation
public static final String FINAL_RESTRICTION
The value of the final attribute used for blocking restriction derivation
public static final String FINAL_UNION
The value of the final attribute used for blocking union derivation
public void addFacet(Facet facet)
Adds the given Facet to this Simpletype.
- Parameters:
facet
- the Facet to add to this Simpletype
protected void copyFacets(SimpleType target)
Copy this type's facets to the target type.
- Parameters:
target
- the SimpleType to copy facets to
protected SimpleType createReference(String name)
A helper method for classes which extend SimpleType. This method allows creating a reference to a SimpleType.
- Returns:
- the reference to the SimpleType.
public SimpleType getBuiltInBaseType()
Returns the built in type this type is derived from.
public Facet getFacet(String name)
Returns the first facet associated with the given name
- Returns:
- the first facet associated with the given name
public Enumeration getFacets()
Returns an Enumeration of all the Facets (including inherited) facets for this type.
- Returns:
- an Enumeration of all the Facets for this type
public Enumeration getFacets(String name)
Returns the facets associated with the given name
- Returns:
- the facets associated with the given name
public String getFinal()
Returns the value of the 'final' property, indicating which types of derivation are not allowed, or null if the final property has not been set.
- Returns:
- the value of the final property or null if no value has been set
public Long getLength()
Returns the value of the length facet result can be null
public Enumeration getLocalFacets()
Returns the facets of this type (without the parent's facets)
public Long getMaxLength()
Returns the value of the maxlength facet result can be null
public Long getMinLength()
Returns the value of the minlength facet result can be null
public Structure getParent()
Returns the parent Structure that contains this SimpleType. This can be either a Schema, AttributeDecl or ElementDecl.
- Returns:
- the parent of this SimpleType
public String getReferenceId()
Returns the Id used to Refer to this Object.
- Specified by:
- getReferenceId in interface Referable
- Returns:
- the Id used to Refer to this Object
- See Also:
Referable
public short getStructureType()
Returns the type of this Schema Structure
- Overrides:
- getStructureType in interface Structure
- Returns:
- the type of this Schema Structure
public int getTypeCode()
Gets the code for this simple type (as defined in SimpleTypesFactory)
- Returns:
- the type code for this simple type
public boolean hasFacet(String name)
Returns true if this Simpletype has a specified Facet with the given name.
- Parameters:
name
- the name of the Facet to look for
- Returns:
- true if this Simpletype has a specified Facet with the given name
public boolean isBuiltInType()
Returns true if this SimpleType is a built in type
- Returns:
- true if this SimpleType is a built in type
protected static SimpleType resolveReference(SimpleType simpleType)
A helper method for classes which extend SimpleType. This method allows resolving a SimpleType reference to a SimpleType.
- Returns:
- the resolved SimpleType.
- See Also:
createReference
public void setFinal(String finalValue)
Sets the value of the 'final' property, indicating which types of derivation are not allowed. A null value will indicate all types of derivation (list, restriction, union) are allowed.
- Parameters:
finalValue
- the value of the final property.
protected void setParent(Structure parent)
Sets the parent for this SimpleType
- Parameters:
parent
- the Structure that contains this SimpleType. Currently this should only be Schema, ElementDecl or AttributeDecl.
(package private) void setTypeCode(int code)
Package private setter of the code for this simple type *
public void validate() throws ValidationException
Checks the validity of this SimpleType defintion.
- Throws:
ValidationException
- when this SimpleType definition is invalid.