com.bowstreet.xml.schema
Class ElementPathData

java.lang.Object
  extended by com.bowstreet.xml.schema.ElementPathData

public class ElementPathData
extends java.lang.Object

ElementPathData provides a schema element data abstraction layer over an underlying schema manipulation library, to protect the developer from the details of the particular schema support library in use. An ElementPathData object may be retrieved from a schema, via the Schema.getElementPathData(String xPathRef) method.


Field Summary
static java.lang.String COMPOSITOR_ALL
           
static java.lang.String COMPOSITOR_CHOICE
           
static java.lang.String COMPOSITOR_SEQUENCE
           
static int UNBOUNDED
           
static java.lang.String VALUE_TYPE_BINARY
           
static java.lang.String VALUE_TYPE_BOOLEAN
           
static java.lang.String VALUE_TYPE_CENTURY
           
static java.lang.String VALUE_TYPE_CHAR
           
static java.lang.String VALUE_TYPE_COMPLEX
           
static java.lang.String VALUE_TYPE_DATE
           
static java.lang.String VALUE_TYPE_DATETIMEAR
           
static java.lang.String VALUE_TYPE_DATETIMETZ
           
static java.lang.String VALUE_TYPE_DECIMAL
           
static java.lang.String VALUE_TYPE_DOUBLE
           
static java.lang.String VALUE_TYPE_DURATION
           
static java.lang.String VALUE_TYPE_FIXED144
           
static java.lang.String VALUE_TYPE_FLOAT
           
static java.lang.String VALUE_TYPE_ID
           
static java.lang.String VALUE_TYPE_INTEGER
           
static java.lang.String VALUE_TYPE_LIST
           
static java.lang.String VALUE_TYPE_MONTH
           
static java.lang.String VALUE_TYPE_NMTOKEN
           
static java.lang.String VALUE_TYPE_QNAME
           
static java.lang.String VALUE_TYPE_RECUR_DATE
           
static java.lang.String VALUE_TYPE_RECUR_DAY
           
static java.lang.String VALUE_TYPE_RECURRING_DURATION
           
static java.lang.String VALUE_TYPE_STRING
           
static java.lang.String VALUE_TYPE_TIME
           
static java.lang.String VALUE_TYPE_TIME_INSTANCE
           
static java.lang.String VALUE_TYPE_TIME_PERIOD
           
static java.lang.String VALUE_TYPE_TIMETZ
           
static java.lang.String VALUE_TYPE_UNION
           
static java.lang.String VALUE_TYPE_URI
           
static java.lang.String VALUE_TYPE_YEAR
           
 
Method Summary
 java.lang.String getAnnotation()
          Return a string representation of annotation information for this particular ElementPathData, or null if not found.
 AttributePathData getAttributePathData(java.lang.String attributeXPathRef)
          Return AttributePathData for the attribute specified by XPath reference.
 java.util.List getAttributes()
          Return a List of attributes defined for this ElementPathData.
 java.util.List getAttributeXPathRefs()
          Return a list of XPath references to AttributePathData available for this ElementPathData.
 java.lang.String getBaseTypeName()
           
 java.lang.String getBaseTypeNamespace()
           
 java.util.List getChildElementPathDataList()
          Return a List of ElementPathData for children of this ElementPathData
 java.lang.String getChildElementsConstraintType()
          Return the constraints type of the first child element if available, otherwise return null.
 java.lang.String getCompositor()
          Return String representation of the compositor type of this particular ElementPathData.
 java.lang.String getDefault()
           
 org.apache.xerces.xs.XSElementDeclaration getElementDeclaration()
           
 java.util.List getEnumeratedValues()
          Return a List of Strings, possibly empty, of enumeration values for this particular ElementPathData.
 int getMaxOccurs()
          Return the maximum number of times this Element may occur within its parent element.
 int getMinOccurs()
          Return the minimum number of times this Element must occur within its parent element.
 java.lang.String getName()
          Return the name associated with this particular ElementPathData as specified in the schema.
 java.lang.String getNamespace()
           
 ElementPathData getParent()
          Return ElementPathData for the parent of this ElementPathData if available, otherwise return null.
 org.apache.xerces.xs.XSTypeDefinition getTypeDefinition()
           
 java.lang.String getTypeName()
           
 java.lang.String getTypeNamespace()
           
 java.lang.String getValueType()
          Return the type associated with this element's child value, such as VALUE_TYPE_COMPLEX, VALUE_TYPE_DECIMAL or one of the other field value constants specified in this class starting with VALUE_TYPE_
 java.lang.String getXPathRef()
          Return the XPath reference for this particular ElementPathData.
 boolean hasChildElements()
          Return a boolean specifying whether this ElementPathData has any child elements.
 boolean hasDefault()
           
 boolean hasDeferredChildren()
          Determine whether or not this instance has children whose construction was deferred.
 boolean isAType()
           
 boolean isEmptyContent()
          Return a boolean specifying whether this ElementPathData contains no content.
 boolean isTextOnlyContent()
          Return a boolean specifying whether this ElementPathData contains only text content.
 void setHasDeferredChildren(boolean hasDeferredChildren)
          Set whether or not this instance has children whose construction was deferred.
 java.lang.String toString()
          Return a string representation of this ElementPathData for debugging.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPOSITOR_ALL

public static java.lang.String COMPOSITOR_ALL

COMPOSITOR_CHOICE

public static java.lang.String COMPOSITOR_CHOICE

COMPOSITOR_SEQUENCE

public static java.lang.String COMPOSITOR_SEQUENCE

UNBOUNDED

public static final int UNBOUNDED
See Also:
Constant Field Values

VALUE_TYPE_BINARY

public static final java.lang.String VALUE_TYPE_BINARY
See Also:
Constant Field Values

VALUE_TYPE_BOOLEAN

public static final java.lang.String VALUE_TYPE_BOOLEAN
See Also:
Constant Field Values

VALUE_TYPE_CENTURY

public static final java.lang.String VALUE_TYPE_CENTURY
See Also:
Constant Field Values

VALUE_TYPE_CHAR

public static final java.lang.String VALUE_TYPE_CHAR
See Also:
Constant Field Values

VALUE_TYPE_COMPLEX

public static final java.lang.String VALUE_TYPE_COMPLEX
See Also:
Constant Field Values

VALUE_TYPE_DATE

public static final java.lang.String VALUE_TYPE_DATE
See Also:
Constant Field Values

VALUE_TYPE_DATETIMEAR

public static final java.lang.String VALUE_TYPE_DATETIMEAR
See Also:
Constant Field Values

VALUE_TYPE_DATETIMETZ

public static final java.lang.String VALUE_TYPE_DATETIMETZ
See Also:
Constant Field Values

VALUE_TYPE_DECIMAL

public static final java.lang.String VALUE_TYPE_DECIMAL
See Also:
Constant Field Values

VALUE_TYPE_DOUBLE

public static final java.lang.String VALUE_TYPE_DOUBLE
See Also:
Constant Field Values

VALUE_TYPE_DURATION

public static final java.lang.String VALUE_TYPE_DURATION
See Also:
Constant Field Values

VALUE_TYPE_FIXED144

public static final java.lang.String VALUE_TYPE_FIXED144
See Also:
Constant Field Values

VALUE_TYPE_FLOAT

public static final java.lang.String VALUE_TYPE_FLOAT
See Also:
Constant Field Values

VALUE_TYPE_ID

public static final java.lang.String VALUE_TYPE_ID
See Also:
Constant Field Values

VALUE_TYPE_INTEGER

public static final java.lang.String VALUE_TYPE_INTEGER
See Also:
Constant Field Values

VALUE_TYPE_LIST

public static final java.lang.String VALUE_TYPE_LIST
See Also:
Constant Field Values

VALUE_TYPE_MONTH

public static final java.lang.String VALUE_TYPE_MONTH
See Also:
Constant Field Values

VALUE_TYPE_NMTOKEN

public static final java.lang.String VALUE_TYPE_NMTOKEN
See Also:
Constant Field Values

VALUE_TYPE_QNAME

public static final java.lang.String VALUE_TYPE_QNAME
See Also:
Constant Field Values

VALUE_TYPE_RECUR_DATE

public static final java.lang.String VALUE_TYPE_RECUR_DATE
See Also:
Constant Field Values

VALUE_TYPE_RECUR_DAY

public static final java.lang.String VALUE_TYPE_RECUR_DAY
See Also:
Constant Field Values

VALUE_TYPE_RECURRING_DURATION

public static final java.lang.String VALUE_TYPE_RECURRING_DURATION
See Also:
Constant Field Values

VALUE_TYPE_STRING

public static final java.lang.String VALUE_TYPE_STRING
See Also:
Constant Field Values

VALUE_TYPE_TIME

public static final java.lang.String VALUE_TYPE_TIME
See Also:
Constant Field Values

VALUE_TYPE_TIME_INSTANCE

public static final java.lang.String VALUE_TYPE_TIME_INSTANCE
See Also:
Constant Field Values

VALUE_TYPE_TIME_PERIOD

public static final java.lang.String VALUE_TYPE_TIME_PERIOD
See Also:
Constant Field Values

VALUE_TYPE_TIMETZ

public static final java.lang.String VALUE_TYPE_TIMETZ
See Also:
Constant Field Values

VALUE_TYPE_UNION

public static final java.lang.String VALUE_TYPE_UNION
See Also:
Constant Field Values

VALUE_TYPE_URI

public static final java.lang.String VALUE_TYPE_URI
See Also:
Constant Field Values

VALUE_TYPE_YEAR

public static final java.lang.String VALUE_TYPE_YEAR
See Also:
Constant Field Values
Method Detail

getAnnotation

public java.lang.String getAnnotation()
Return a string representation of annotation information for this particular ElementPathData, or null if not found.

Returns:
String representation of annotation for this element, or null.

getAttributePathData

public AttributePathData getAttributePathData(java.lang.String attributeXPathRef)
Return AttributePathData for the attribute specified by XPath reference.

Returns:
AttributePathData for the specified attribute, or null.

getAttributes

public java.util.List getAttributes()
Return a List of attributes defined for this ElementPathData.

Returns:
List of attributes for this ElementPathData

getAttributeXPathRefs

public java.util.List getAttributeXPathRefs()
Return a list of XPath references to AttributePathData available for this ElementPathData.

Returns:
List of Attribute XPath refs (String values).

getBaseTypeName

public java.lang.String getBaseTypeName()

getBaseTypeNamespace

public java.lang.String getBaseTypeNamespace()

getChildElementPathDataList

public java.util.List getChildElementPathDataList()
Return a List of ElementPathData for children of this ElementPathData

Returns:
List of ElementPathData

getChildElementsConstraintType

public java.lang.String getChildElementsConstraintType()
Return the constraints type of the first child element if available, otherwise return null.
Return values are one of the following field values of this class COMPOSITOR_ALL, COMPOSITOR_CHOICE, COMPOSITOR_SEQUENCE, or null.

Returns:
String representation of the child element's constraint type.

getCompositor

public java.lang.String getCompositor()
Return String representation of the compositor type of this particular ElementPathData.
Return values may be the following field values defined in this class COMPOSITOR_ALL, COMPOSITOR_CHOICE, COMPOSITOR_SEQUENCE, or null.

Returns:
String representation of the compositor type for this ElementPathData.

getDefault

public java.lang.String getDefault()

getElementDeclaration

public org.apache.xerces.xs.XSElementDeclaration getElementDeclaration()

getEnumeratedValues

public java.util.List getEnumeratedValues()
Return a List of Strings, possibly empty, of enumeration values for this particular ElementPathData.

Returns:
List of enumeration values for this ElementPathData.

getMaxOccurs

public int getMaxOccurs()
Return the maximum number of times this Element may occur within its parent element.

Returns:
int representation of the maximum occurrence required.

getMinOccurs

public int getMinOccurs()
Return the minimum number of times this Element must occur within its parent element.

Returns:
int representation of the minimum occurrence required.

getName

public java.lang.String getName()
Return the name associated with this particular ElementPathData as specified in the schema.

Returns:
String representation of the name for this element.

getNamespace

public java.lang.String getNamespace()

getParent

public ElementPathData getParent()
Return ElementPathData for the parent of this ElementPathData if available, otherwise return null.

Returns:
ElementPathData for the parent of this ElementPathData, or null.

getTypeDefinition

public org.apache.xerces.xs.XSTypeDefinition getTypeDefinition()

getTypeName

public java.lang.String getTypeName()

getTypeNamespace

public java.lang.String getTypeNamespace()

getValueType

public java.lang.String getValueType()
Return the type associated with this element's child value, such as VALUE_TYPE_COMPLEX, VALUE_TYPE_DECIMAL or one of the other field value constants specified in this class starting with VALUE_TYPE_

Returns:
String representation of the type of this value.

getXPathRef

public java.lang.String getXPathRef()
Return the XPath reference for this particular ElementPathData.

Returns:
String representation of the XPath reference to this particualr ElementPathData.

hasChildElements

public boolean hasChildElements()
Return a boolean specifying whether this ElementPathData has any child elements. It is possible that this method will return true even if subsequently getChildElementPathDataList returns an empty list. This is because some elements (eg "Body" in the soap encoding schema) have a wildcard element defined as a child. In that case we do not add the wildcard as a child elementPathData, but we do indicate that Body has child elements.

Returns:
boolean specifying whether this ElementPathData has any child elements.

hasDefault

public boolean hasDefault()

hasDeferredChildren

public boolean hasDeferredChildren()
Determine whether or not this instance has children whose construction was deferred.

Returns:
TRUE if child construction was deferred.

isAType

public boolean isAType()

isEmptyContent

public boolean isEmptyContent()
                       throws java.lang.Exception
Return a boolean specifying whether this ElementPathData contains no content.

Returns:
boolean specifying whether the content of this element is empty.
Throws:
java.lang.Exception - if no type information is available for this element.

isTextOnlyContent

public boolean isTextOnlyContent()
                          throws java.lang.Exception
Return a boolean specifying whether this ElementPathData contains only text content.

Returns:
boolean specifying whether the content of this element is text.
Throws:
java.lang.Exception - if no type information is available for this element.

setHasDeferredChildren

public void setHasDeferredChildren(boolean hasDeferredChildren)
Set whether or not this instance has children whose construction was deferred.

Parameters:
hasDeferredChildren - TRUE if child construction was deferred.

toString

public java.lang.String toString()
Return a string representation of this ElementPathData for debugging.

Overrides:
toString in class java.lang.Object
Returns:
String represenation of this ElementPathData.


Copyright © 2009 IBM. All Rights Reserved.