org.jbind.xml.schema.element
Class SchemaElement
java.lang.Object
org.jbind.xml.schema.element.Parent
org.jbind.xml.schema.element.Element
org.jbind.xml.schema.element.OpenAttributes
org.jbind.xml.schema.element.SchemaElement
- All Implemented Interfaces:
- IElement, IHasBindingAttributes, IHasLocation, IJobHelper, INode, IOpenAttributes, IParent, ISchemaElement, ISchemaJobHelper, ISourceInfo, IXmlElement, IXmlNode
- public class SchemaElement
- extends OpenAttributes
- implements ISchemaElement, IOpenAttributes
Methods inherited from class org.jbind.xml.schema.element.Element |
acceptAppInfoVisitor, addAttribute, createChild, createGlobalRef, getAnnotation, getAttributes, getBoolean, getChildByClass, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalName, getLocalStringBindingAttribute, getLocation, getNamespace, getNamespaceUri, getParent_, getParentHelper, getPrefix, getPrefixToNamespaceMapping, getQName, getSchemaDocument, getSchemaElement, getStringBindingAttribute, getSubElement, isTopLevelComponent, iterChildrenByClass, setLocation, setParent_, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SchemaElement
public SchemaElement(CreationParams aCreationParams,
ISchemaElement aParentSchemaElement)
iterTopLevelComponents
public java.util.Iterator iterTopLevelComponents()
removeTopLevelElement
public ITopLevelElement removeTopLevelElement(IRef aRef)
- Description copied from interface:
ISchemaElement
- Removed a top level element.
- Specified by:
removeTopLevelElement
in interface ISchemaElement
- Parameters:
aRef
- (required).
- Returns:
- (optional). The removed element.
iterAdditionalSources
public java.util.Iterator iterAdditionalSources()
doCreateChild
public IElement doCreateChild(CreationParams aCreationParams)
throws XmlException
- Description copied from class:
Element
- Hook method to create a child element.
- Overrides:
doCreateChild
in class Element
- Parameters:
aCreationParams
- (required).
- Returns:
- (optional). The created element.
- Throws:
XmlException
- Raised if the creation was not successful.
doCreateAttribute
protected IAttribute doCreateAttribute(ACParams anACParams)
throws XmlException
- Description copied from class:
Element
- Hook method to create an attribute.
- Overrides:
doCreateAttribute
in class OpenAttributes
- Throws:
XmlException
getDefaultBlockTypes
public java.util.Set getDefaultBlockTypes()
getDefaultFinalTypes
public java.util.Set getDefaultFinalTypes()
getAttributeFormDefault
public FormType getAttributeFormDefault()
getElementFormDefault
public FormType getElementFormDefault()
getTopLevelElement
public ITopLevelElement getTopLevelElement(IRef aGlobalRef)
- Description copied from interface:
ISchemaElement
- Gets a top level element.
- Specified by:
getTopLevelElement
in interface ISchemaElement
- Parameters:
aGlobalRef
- (required).
- Returns:
- (optional).
setTopLevelElement
public ITopLevelElement setTopLevelElement(ITopLevelElement aTopLevelElement)
- Description copied from interface:
ISchemaElement
- Sets a top level element.
- Specified by:
setTopLevelElement
in interface ISchemaElement
- Returns:
- (optional). Returns any previously set top level element.
validateElement
public void validateElement(IElemValHelper aHelper,
IConstraintViolations aViolations)
- Specified by:
validateElement
in interface IElement
- Overrides:
validateElement
in class Element
createJobs
public void createJobs(IHasTopLevelJobs aSchemaJob)
- Specified by:
createJobs
in interface ISchemaElement
isChameleon
public boolean isChameleon()
- Description copied from interface:
ISchemaElement
- Indicates if the schema element is a chameleon. A chameleon schema element
has no target namespace of its own. It gets its target namespace when
it is included or redefined by another schema element.
- Specified by:
isChameleon
in interface ISchemaElement
getTargetNamespace
public java.lang.String getTargetNamespace()
- Description copied from interface:
ISchemaElement
- Gets the target namespace. A schema element that is included or redefined
by another schema element returns the target namespace of the other schema
element. A schema element that has no target namespace return the constant
INamespaces.NO
.
- Specified by:
getTargetNamespace
in interface ISchemaElement
- Overrides:
getTargetNamespace
in class Element
getSchema
public ISchema getSchema()
- Specified by:
getSchema
in interface ISchemaElement
- Overrides:
getSchema
in class Element
setSchema
public void setSchema(ISchema aSchema)
- Specified by:
setSchema
in interface ISchemaElement
getBindingAttribute
public IAttribute getBindingAttribute(java.lang.String aName)
- Description copied from interface:
IHasBindingAttributes
- Gets the specified binding attribute. The attribute may be searched in different
contexts (for example a schema component may asked its ancestor component
and its schema for the specified attribute. The the first occurence is returned.
- Specified by:
getBindingAttribute
in interface IHasBindingAttributes
- Overrides:
getBindingAttribute
in class Element
addElementId
public boolean addElementId(java.lang.String anId)
- Description copied from interface:
ISchemaElement
- Adds the id of a schema element.
- Specified by:
addElementId
in interface ISchemaElement
- Parameters:
anId
- (required).
- Returns:
- Returns
true
iff the id was not already added,
i.e. the id is unique so far.