org.apache.ws.jaxme.xs.impl

Class XSObjectImpl

Implemented Interfaces:
XSObject
Known Direct Subclasses:
XSAppinfoImpl, XSDocumentationImpl, XSEnumerationImpl, XSNotationImpl, XSOpenAttrsImpl

public abstract class XSObjectImpl
extends java.lang.Object
implements XSObject

Author:
Jochen Wiedmann

Constructor Summary

XSObjectImpl(XSObject pParent, XsObject pBaseObject)

Method Summary

Locator
getLocator()
Returns the objects location.
XSObject
getParentObject()
Returns either of the following:
  • If the object is the schema itself, returns null.
XSSchema
getXSSchema()
Returns the objects schema.
protected XsObject
getXsObject()
boolean
isTopLevelObject()
Returns whether the object is a top-level object.
void
validate()
Validates the objects internal state.
protected void
validateAllIn(XSObject[] objects)
Utility method used to call validate() on every element within an array.

Constructor Details

XSObjectImpl

protected XSObjectImpl(XSObject pParent,
                       XsObject pBaseObject)

Method Details

getLocator

public Locator getLocator()
Returns the objects location.
Specified by:
getLocator in interface XSObject

getParentObject

public XSObject getParentObject()
Returns either of the following:
  • If the object is the schema itself, returns null. The schema doesn't have a parent object.
  • If the object is a top-level object, returns the schema.
  • Otherwise returns the object in which the given object is embedded.
Specified by:
getParentObject in interface XSObject

getXSSchema

public XSSchema getXSSchema()
Returns the objects schema.
Specified by:
getXSSchema in interface XSObject

getXsObject

protected XsObject getXsObject()

isTopLevelObject

public boolean isTopLevelObject()
Returns whether the object is a top-level object. This is the case for the XsESchema itself and for all its childs only.
Specified by:
isTopLevelObject in interface XSObject

validate

public void validate()
            throws SAXException
Validates the objects internal state.
Specified by:
validate in interface XSObject

validateAllIn

protected final void validateAllIn(XSObject[] objects)
            throws SAXException
Utility method used to call validate() on every element within an array.
Parameters:
objects - Array must not have any null elements.