Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Package Functions

org.exolab.castor.xml.schema.SimpleType Class Reference

Inheritance diagram for org.exolab.castor.xml.schema.SimpleType:
org.exolab.castor.xml.schema.XMLType org.exolab.castor.xml.schema.Referable org.exolab.castor.xml.schema.Annotated org.exolab.castor.xml.schema.Structure org.exolab.castor.xml.schema.DeferredSimpleType org.exolab.castor.xml.schema.SimpleTypeReference org.exolab.castor.xml.schema.simpletypes.AtomicType org.exolab.castor.xml.schema.simpletypes.ListType org.exolab.castor.xml.schema.simpletypes.UrType org.exolab.castor.xml.schema.Union org.exolab.castor.xml.schema.simpletypes.AnyURIType org.exolab.castor.xml.schema.simpletypes.BinaryType org.exolab.castor.xml.schema.simpletypes.BooleanType org.exolab.castor.xml.schema.simpletypes.DateTimeType org.exolab.castor.xml.schema.simpletypes.DecimalType org.exolab.castor.xml.schema.simpletypes.DurationType org.exolab.castor.xml.schema.simpletypes.RealType org.exolab.castor.xml.schema.simpletypes.StringType

List of all members.

Public Member Functions

 SimpleType ()
void addFacet (Facet facet)
Facet getFacet (String name)
Enumeration getFacets (String name)
Enumeration getFacets ()
String getFinal ()
Enumeration getLocalFacets ()
SimpleType getBuiltInBaseType ()
Structure getParent ()
String getReferenceId ()
boolean hasFacet (String name)
boolean isBuiltInType ()
boolean isRedefined ()
void setRedefined ()
int getTypeCode ()
Long getLength ()
Long getMinLength ()
Long getMaxLength ()
boolean removeFacet (Facet facet)
boolean removeFacet (String name)
void setFinal (String finalValue)
short getStructureType ()
void validate () throws ValidationException

Static Public Attributes

static final String FINAL_ALL = "#all"
static final String FINAL_LIST = "list"
static final String FINAL_UNION = "union"
static final String FINAL_RESTRICTION = "restriction"

Protected Member Functions

SimpleType createReference (String name)
void setParent (Structure parent)
void copyFacets (SimpleType target)

Static Protected Member Functions

static SimpleType resolveReference (SimpleType simpleType)

Package Functions

void setTypeCode (int code)

Detailed Description

An XML Schema SimpleType

Author:
Keith Visco
Version:
Revision:
1.3
Date:
2004/09/21 14:04:05

Constructor & Destructor Documentation

org.exolab.castor.xml.schema.SimpleType.SimpleType (  ) 

Default constructor


Member Function Documentation

void org.exolab.castor.xml.schema.SimpleType.addFacet ( Facet  facet  ) 
void org.exolab.castor.xml.schema.SimpleType.copyFacets ( SimpleType  target  )  [protected]

Copy this type's facets to the target type.

Parameters:
target the SimpleType to copy facets to

References org.exolab.castor.xml.schema.FacetList.add().

Referenced by org.exolab.castor.xml.schema.DeferredSimpleType.createInstance().

SimpleType org.exolab.castor.xml.schema.SimpleType.createReference ( String  name  )  [protected]

A helper method for classes which extend SimpleType. This method allows creating a reference to a SimpleType.

Returns:
the reference to the SimpleType.

References org.exolab.castor.xml.schema.XMLType.getSchema().

Referenced by org.exolab.castor.xml.schema.simpletypes.ListType.setItemType().

SimpleType org.exolab.castor.xml.schema.SimpleType.getBuiltInBaseType (  ) 
Enumeration org.exolab.castor.xml.schema.SimpleType.getFacets (  ) 

Returns an Enumeration of all the Facets (including inherited) facets for this type.

Returns:
an Enumeration of all the Facets for this type

References org.exolab.castor.xml.schema.XMLType.getBaseType(), and org.exolab.castor.xml.schema.SimpleType.getFacets().

Referenced by org.exolab.castor.xml.schema.SimpleType.getFacet().

Enumeration org.exolab.castor.xml.schema.SimpleType.getFacets ( String  name  ) 
String org.exolab.castor.xml.schema.SimpleType.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
Long org.exolab.castor.xml.schema.SimpleType.getLength (  ) 

Returns the value of the length facet result can be null

References org.exolab.castor.xml.schema.SimpleType.getFacet(), and org.exolab.castor.xml.schema.Facet.toLong().

Enumeration org.exolab.castor.xml.schema.SimpleType.getLocalFacets (  ) 

Returns the facets of this type (without the parent's facets)

References org.exolab.castor.xml.schema.FacetList.enumerate().

Long org.exolab.castor.xml.schema.SimpleType.getMaxLength (  ) 

Returns the value of the maxlength facet result can be null

References org.exolab.castor.xml.schema.SimpleType.getFacet(), and org.exolab.castor.xml.schema.Facet.toLong().

Long org.exolab.castor.xml.schema.SimpleType.getMinLength (  ) 

Returns the value of the minlength facet result can be null

References org.exolab.castor.xml.schema.SimpleType.getFacet(), and org.exolab.castor.xml.schema.Facet.toLong().

Structure org.exolab.castor.xml.schema.SimpleType.getParent (  ) 
String org.exolab.castor.xml.schema.SimpleType.getReferenceId (  ) 
int org.exolab.castor.xml.schema.SimpleType.getTypeCode (  ) 
boolean org.exolab.castor.xml.schema.SimpleType.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

References org.exolab.castor.xml.schema.FacetList.get(), org.exolab.castor.xml.schema.Facet.getName(), and org.exolab.castor.xml.schema.FacetList.size().

Referenced by org.exolab.castor.builder.TypeConversion.convertType(), org.exolab.castor.builder.MemberFactory.createFieldInfo(), and org.exolab.castor.builder.SourceFactory.createSourceCode().

boolean org.exolab.castor.xml.schema.SimpleType.isBuiltInType (  ) 

Returns true if this SimpleType is a built in type

Returns:
true if this SimpleType is a built in type

Referenced by org.exolab.castor.builder.TypeConversion.convertType(), and org.exolab.castor.builder.MemberFactory.createFieldInfo().

boolean org.exolab.castor.xml.schema.SimpleType.isRedefined (  ) 

Returns true if this simpleType is a redefinition.

Returns:
true if this simpleType is a redefinition.

Referenced by org.exolab.castor.xml.schema.Schema.addSimpleType().

boolean org.exolab.castor.xml.schema.SimpleType.removeFacet ( String  name  ) 

Removes the facet with the given name from this SimpleType. Returns true if this Simpletype has a facet with the given name and it is successfully removed.

Removes only local facets.

Parameters:
name the name of the Facet to remove
Returns:
true if the specified Facet has been removed

References org.exolab.castor.xml.schema.FacetList.get(), org.exolab.castor.xml.schema.Facet.getName(), org.exolab.castor.xml.schema.FacetList.remove(), and org.exolab.castor.xml.schema.FacetList.size().

boolean org.exolab.castor.xml.schema.SimpleType.removeFacet ( Facet  facet  ) 

Removes the given Facet from this SimpleType. Returns true if this SimpleType actually contains the given facet.

Removes only local facets.

Parameters:
facet the Facet to remove
Returns:
true if the specified Facet has been removed

References org.exolab.castor.xml.schema.FacetList.remove().

static SimpleType org.exolab.castor.xml.schema.SimpleType.resolveReference ( SimpleType  simpleType  )  [static, protected]

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

References org.exolab.castor.xml.schema.XMLType.getType().

Referenced by org.exolab.castor.xml.schema.simpletypes.ListType.getItemType().

void org.exolab.castor.xml.schema.SimpleType.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.
Exceptions:
IllegalArgumentException when the value is not a valid value.

References org.exolab.castor.xml.schema.SimpleType.FINAL_ALL, org.exolab.castor.xml.schema.SimpleType.FINAL_LIST, org.exolab.castor.xml.schema.SimpleType.FINAL_RESTRICTION, and org.exolab.castor.xml.schema.SimpleType.FINAL_UNION.

Referenced by org.exolab.castor.xml.schema.reader.SimpleTypeDefinition.copyInto(), and org.exolab.castor.xml.schema.reader.SimpleTypeDefinition.createSimpleType().

void org.exolab.castor.xml.schema.SimpleType.setParent ( Structure  parent  )  [protected]
void org.exolab.castor.xml.schema.SimpleType.setRedefined (  ) 
void org.exolab.castor.xml.schema.SimpleType.setTypeCode ( int  code  )  [package]

Package private setter of the code for this simple type

Referenced by org.exolab.castor.xml.schema.SimpleTypesFactory.createUserSimpleType().

void org.exolab.castor.xml.schema.SimpleType.validate (  )  throws ValidationException

Checks the validity of this SimpleType defintion.

Exceptions:
ValidationException when this SimpleType definition is invalid.

Referenced by org.exolab.castor.xml.schema.Schema.validate(), and org.exolab.castor.xml.schema.ElementDecl.validate().


Member Data Documentation

final String org.exolab.castor.xml.schema.SimpleType.FINAL_ALL = "#all" [static]

The value of the final attribute used for blocking all types of derivation

Referenced by org.exolab.castor.xml.schema.SimpleType.setFinal().

The value of the final attribute used for blocking list derivation

Referenced by org.exolab.castor.xml.schema.SimpleType.setFinal().

final String org.exolab.castor.xml.schema.SimpleType.FINAL_RESTRICTION = "restriction" [static]

The value of the final attribute used for blocking restriction derivation

Referenced by org.exolab.castor.xml.schema.SimpleType.setFinal().

final String org.exolab.castor.xml.schema.SimpleType.FINAL_UNION = "union" [static]

The value of the final attribute used for blocking union derivation

Referenced by org.exolab.castor.xml.schema.SimpleType.setFinal().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties