Data Request Broker
2-3-release

fr.gael.drb.xsd
Class XsdListType

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

public class XsdListType
extends XsdSimpleType

Declaration of an XML-Schema list type.


Field Summary
static int LIST_METHOD
          List derivation method.
protected  String targetNamespace
          The target namespace of this type.
 
Fields inherited from class fr.gael.drb.xsd.XsdSimpleType
ALL_FINAL, ATOMIC_VARIETY, EMPTY_FINAL, facets, finals, LIST_FINAL, LIST_VARIETY, RESTRICTION_FINAL, UNION_FINAL, 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
XsdListType(String name, XsdSimpleType base_type, XsdFacet[] facets)
          Build an XsdListType.
XsdListType(XsdSimpleType item_type, XsdFacet[] facets)
          Build an XsdListType.
 
Method Summary
 XsdAnnotation getAnnotation()
          Returns annotation of this component.
 int getCardinality()
          Returns the cardinality of this value space.
 Value getExclusiveLowerBound()
          Returns the exclusive lower bound.
 Value getExclusiveUpperBound()
          Returns the exclusive upper bound.
 DrbAttributeList getExternalAttributes()
          Returns the external attributes of this component.
 DrbNodeList getExternalNodes()
          Returns the external nodes of this component.
 Value getInclusiveLowerBound()
          Returns the inclusive lower bound.
 Value getInclusiveUpperBound()
          Returns the inclusive upper bound.
 XsdSimpleType getItemType()
          Returns the item type of this list.
 int getItemTypeId()
          Returns the Value identifier of the items.
 int getOrderRelation()
          Returns the order-relation of this value space.
 String getTargetNamespace()
          Returns the target namespace of this type.
 int getTypeId()
          Returns the identifier of this simple type.
 Value getValue(String text)
          Create a value from a string.
 int getVariety()
          Returns the variety of this simple type.
 boolean isBounded()
          A datatype is bounded if its value space has either an inclusive upper bound or an exclusive upper bound and either an inclusive lower bound and an exclusive lower bound.
 boolean isNumeric()
          A datatype is said to be numeric if its values are conceptually quantities (in some mathematical number system).
 boolean isOrdered()
          A value space, is said to be ordered if there exists an order-relation defined for that value space.
protected  boolean isValidType(Value value)
          Validates the type of the present value.
static void main(String[] args)
          Makes this class runnable for testing.
 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.XsdSimpleType
getDatatype, getFacets, getFinals, getStructure, isComplex, isValid, isValid
 
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
 

Field Detail

LIST_METHOD

public static final int LIST_METHOD
List derivation method.

See Also:
Constant Field Values

targetNamespace

protected String targetNamespace
The target namespace of this type.

Constructor Detail

XsdListType

public XsdListType(String name,
                   XsdSimpleType base_type,
                   XsdFacet[] facets)
Build an XsdListType.

Parameters:
name - the name
base_type - the base type
facets - the facets

XsdListType

public XsdListType(XsdSimpleType item_type,
                   XsdFacet[] facets)
Build an XsdListType.

Parameters:
item_type - the item type
facets - the facets
Method Detail

getVariety

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

Specified by:
getVariety in class XsdSimpleType
Returns:
the variety of this simple type.

getItemType

public final XsdSimpleType getItemType()
Returns the item type of this list.

Returns:
the item type of this list.

getTypeId

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

Overrides:
getTypeId in class XsdSimpleType
Returns:
the identifier of this simple type.
See Also:
Value

getItemTypeId

public int getItemTypeId()
Returns the Value identifier of the items.

Returns:
the Value identifier of the items.

getValue

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

Specified by:
getValue in class XsdSimpleType
Parameters:
text - the string representation of the value.
Returns:
the text converted to this value type.

isOrdered

public boolean isOrdered()
A value space, is said to be ordered if there exists an order-relation defined for that value space.

Returns:
true if this value space is ordered and false otherwise.

getOrderRelation

public int getOrderRelation()
Returns the order-relation of this value space. An order relation on a value space is a mathematical relation that imposes a total order or a partial order on the members of the value space

Returns:
the order-relation defined on that value space
See Also:
PARTIAL, TOTAL

isBounded

public boolean isBounded()
A datatype is bounded if its value space has either an inclusive upper bound or an exclusive upper bound and either an inclusive lower bound and an exclusive lower bound.

Returns:
true if this value space is bounded and false otherwise.

getInclusiveLowerBound

public Value getInclusiveLowerBound()
Returns the inclusive lower bound.

Returns:
The inclusive lower bound or null if not defined.

getInclusiveUpperBound

public Value getInclusiveUpperBound()
Returns the inclusive upper bound.

Returns:
The inclusive upper bound or null if not defined.

getExclusiveLowerBound

public Value getExclusiveLowerBound()
Returns the exclusive lower bound.

Returns:
The exclusive lower bound or null if not defined.

getExclusiveUpperBound

public Value getExclusiveUpperBound()
Returns the exclusive upper bound.

Returns:
The exclusive upper bound or null if not defined.

getCardinality

public int getCardinality()
Returns the cardinality of this value space. Every value space has associated with it the concept of cardinality. Some value spaces are finite, some are countably infinite while still others could conceivably be uncountably infinite (although no value space defined by the XML-Schema specification is uncountable infinite). A datatype is said to have the cardinality of its value space.

Returns:
The cardinality of this value space.
See Also:
XsdValueSpace.FINITE, XsdValueSpace.COUNTABLY_INFINITE, XsdValueSpace.UNCOUNTABLY_INFINITE

isNumeric

public boolean isNumeric()
A datatype is said to be numeric if its values are conceptually quantities (in some mathematical number system).

Returns:
true if the datatype is numeric and false otherwise

isValidType

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

Overrides:
isValidType in class XsdSimpleType
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.

Overrides:
validate in class XsdSimpleType
Parameters:
value - the value
Returns:
an error report or null.

main

public static void main(String[] args)
Makes this class runnable for testing.

Parameters:
args - strimg[]

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 .