Data Request Broker
2-3-release

fr.gael.drb.xsd
Class XsdSimpleType

java.lang.Object
  extended by fr.gael.drb.xsd.XsdType
      extended by fr.gael.drb.xsd.XsdSimpleType
All Implemented Interfaces:
ValueValidator, XsdValueSpace
Direct Known Subclasses:
XsdAtomicType, XsdListType

public abstract class XsdSimpleType
extends XsdType
implements ValueValidator, XsdValueSpace

Declaration of an XML-Schema simple type.


Field Summary
static int ALL_FINAL
          All final derivation.
static int ATOMIC_VARIETY
          Atomic variety
static int EMPTY_FINAL
          Empty final derivation.
protected  XsdFacet[] facets
          facets
protected  int finals
          final properties.
static int LIST_FINAL
          Final property for derivation by list.
static int LIST_VARIETY
          List variety
static int RESTRICTION_FINAL
          Final property for derivation by restriction.
protected  String targetNamespace
          The target namespace of this type.
static int UNION_FINAL
          Final property for derivation by union.
static int UNION_VARIETY
          Union variety
 
Fields inherited from class fr.gael.drb.xsd.XsdType
base, derivationMethod, EXTENSION_METHOD, name, RESTRICTION_METHOD, schema
 
Fields inherited from interface fr.gael.drb.xsd.XsdValueSpace
COUNTABLY_INFINITE, FINITE, PARTIAL, TOTAL, UNCOUNTABLY_INFINITE, UNDEFINED
 
Constructor Summary
protected XsdSimpleType()
          Build a default type definition
protected XsdSimpleType(String name, XsdSimpleType base)
          Build a default type definition
 
Method Summary
 XsdAnnotation getAnnotation()
          Returns annotation of this component.
 XsdSimpleType getDatatype()
          Returns the content of this type.
 DrbAttributeList getExternalAttributes()
          Returns the external attributes of this component.
 DrbNodeList getExternalNodes()
          Returns the external nodes of this component.
 XsdFacet[] getFacets()
          Returns the facets applied to this simple type.
 int getFinals()
          Returns a set of final properties.
 XsdComplexType getStructure()
          Returns the structure of this type.
 String getTargetNamespace()
          Returns the target namespace of this type.
 int getTypeId()
          Returns the identifier of this simple type.
abstract  Value getValue(String text)
          Create a value from a string.
abstract  int getVariety()
          Returns the variety of this simple type.
 boolean isComplex()
          Check if this type is complex.
 XsdInvalid isValid(DrbNode node)
          Validates this node.
 boolean isValid(Value value)
          Validates the present value.
protected  boolean isValidType(Value value)
          Validates the type of the present value.
 void setAnnotation(XsdAnnotation annotation)
          Set annotation of this component.
 void setExternalAttributes(DrbAttributeList external_attributes)
          Set the external attributes of this component.
 void setExternalNodes(DrbNodeList external_nodes)
          Set the external nodes of this component.
 void setTargetNamespace(String target_namespace)
          Set the target namespace of this type.
 XsdInvalid validate(Value value)
          Validates the present value.
 
Methods inherited from class fr.gael.drb.xsd.XsdType
getBase, getDerivation, getName, getSchema, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fr.gael.drb.xsd.XsdValueSpace
getCardinality, getExclusiveLowerBound, getExclusiveUpperBound, getInclusiveLowerBound, getInclusiveUpperBound, getOrderRelation, isBounded, isNumeric, isOrdered
 

Field Detail

UNION_VARIETY

public static final int UNION_VARIETY
Union variety

See Also:
Constant Field Values

ATOMIC_VARIETY

public static final int ATOMIC_VARIETY
Atomic variety

See Also:
Constant Field Values

LIST_VARIETY

public static final int LIST_VARIETY
List variety

See Also:
Constant Field Values

ALL_FINAL

public static final int ALL_FINAL
All final derivation.

See Also:
Constant Field Values

EMPTY_FINAL

public static final int EMPTY_FINAL
Empty final derivation.

See Also:
Constant Field Values

RESTRICTION_FINAL

public static final int RESTRICTION_FINAL
Final property for derivation by restriction.

See Also:
Constant Field Values

LIST_FINAL

public static final int LIST_FINAL
Final property for derivation by list.

See Also:
Constant Field Values

UNION_FINAL

public static final int UNION_FINAL
Final property for derivation by union.

See Also:
Constant Field Values

finals

protected int finals
final properties.


facets

protected XsdFacet[] facets
facets


targetNamespace

protected String targetNamespace
The target namespace of this type.

Constructor Detail

XsdSimpleType

protected XsdSimpleType()
Build a default type definition


XsdSimpleType

protected XsdSimpleType(String name,
                        XsdSimpleType base)
Build a default type definition

Parameters:
name - String name
base - XsdSimpleType
Method Detail

getFinals

public final int getFinals()
Returns a set of final properties.

Returns:
int

getVariety

public abstract int getVariety()
Returns the variety of this simple type.

Returns:
int

getTypeId

public int getTypeId()
Returns the identifier of this simple type.

Returns:
int
See Also:
Value

getFacets

public final XsdFacet[] getFacets()
Returns the facets applied to this simple type.

Returns:
XsdFacet[]

getValue

public abstract Value getValue(String text)
Create a value from a string.

Parameters:
text - the string representation of the value.
Returns:
the text converted to this value type.

isComplex

public final boolean isComplex()
Check if this type is complex.

Specified by:
isComplex in class XsdType
Returns:
true or false

getDatatype

public final XsdSimpleType getDatatype()
Returns the content of this type.

Specified by:
getDatatype in class XsdType
Returns:
XsdSimpleType

getStructure

public final XsdComplexType getStructure()
Returns the structure of this type.

Specified by:
getStructure in class XsdType
Returns:
XsdComplexType

isValid

public boolean isValid(Value value)
Validates the present value.

Specified by:
isValid in interface ValueValidator
Parameters:
value - the value
Returns:
true if this value satifies the type definition, else false

isValidType

protected boolean isValidType(Value value)
Validates the type of the present value.

Parameters:
value - the value
Returns:
true if this value satifies the type definition, else false

validate

public XsdInvalid validate(Value value)
Validates the present value.

Parameters:
value - the value
Returns:
an error report or null.

isValid

public XsdInvalid isValid(DrbNode node)
Validates this node.

Parameters:
node - the DrbNode
Returns:
XsdInvalid

getAnnotation

public final XsdAnnotation getAnnotation()
Returns annotation of this component.

Returns:
The annotation of this component

setAnnotation

public final void setAnnotation(XsdAnnotation annotation)
Set annotation of this component.

Parameters:
annotation - The annotation of this component

getExternalNodes

public final DrbNodeList getExternalNodes()
Returns the external nodes of this component.

Returns:
The list of the node

setExternalNodes

public final void setExternalNodes(DrbNodeList external_nodes)
Set the external nodes of this component.

Parameters:
external_nodes - The list of the node

getExternalAttributes

public final DrbAttributeList getExternalAttributes()
Returns the external attributes of this component.

Returns:
The list of attributes

setExternalAttributes

public final void setExternalAttributes(DrbAttributeList external_attributes)
Set the external attributes of this component.

Parameters:
external_attributes - The list of the attributes

getTargetNamespace

public final String getTargetNamespace()
Returns the target namespace of this type.

Returns:
the target namespace of this type.

setTargetNamespace

public final void setTargetNamespace(String target_namespace)
Set the target namespace of this type.

Parameters:
target_namespace - the target namespace of this type.

Data Request Broker - DRB API®
2-3-release

Copyright© 2001-2009 GAEL Consultant. All rights reserved. Use is subject to license terms .