org.jbind.xml.schema.element
Class SimpleRestrictionDerivation

java.lang.Object
  extended byorg.jbind.xml.schema.element.Parent
      extended byorg.jbind.xml.schema.element.Element
          extended byorg.jbind.xml.schema.element.OpenAttributes
              extended byorg.jbind.xml.schema.element.Annotated
                  extended byorg.jbind.xml.schema.element.SimpleRestriction
                      extended byorg.jbind.xml.schema.element.SimpleRestrictionDerivation
All Implemented Interfaces:
IAnnotated, IComponentJobHelper, IDerivation, IElement, IHasBindingAttributes, IHasLocation, IJobHelper, INode, IOpenAttributes, IParent, ISchemaDataAdder, ISimpleDerivation, ISimpleRestrictionDerivation, ISourceInfo, ITopLevelJobHelper, IXmlElement, IXmlNode

public class SimpleRestrictionDerivation
extends SimpleRestriction
implements ISimpleRestrictionDerivation


Constructor Summary
SimpleRestrictionDerivation(CreationParams aCreationParams, java.lang.String aRole)
           
 
Method Summary
 void completeComponent(IElementHelper aHelper, IComponent aComponent, IConstraintViolations aViolations)
           
 void createAndAddJob(IHasTopLevelJobs aSchemaJob)
          Creates a job for this helper and adds it to the schema job.
 IComponent createComponent(IElementHelper aHelper, IConstraintViolations aViolations)
          Creates the simple content type.
protected  IElement doCreateChild(CreationParams aCreationParams)
          Hook method to create a child element.
 IAttributeInfos getAttributeInfos()
          Gets the attribute infos enclosed in the derivation.
 IRef getEffectiveBaseAttribute()
          Gets the effective base attribute.
 IRef getInlinedBaseAttribute()
          Gets the inlined base attribute.
 boolean getIsExtension()
           
 IModelGroup getModelGroup()
          Gets the model group.
 IModelGroupRef getModelGroupRef()
           
 java.lang.String getName()
           
 ISymbolspace getSymbolSpace()
           
 boolean isTopLevelComponent()
           
protected  boolean referencedBaseTypeMustNotBeComplex()
           
 
Methods inherited from class org.jbind.xml.schema.element.SimpleRestriction
addSchemaData, collectConstraints, collectRefsForCompletion, collectRefsForCreation, collectRefsForValidation, createComponent, doCreateAttribute, getBaseAttribute, getSimpleTypeDef, iterFacets, setBaseAttribute, validateElement
 
Methods inherited from class org.jbind.xml.schema.element.Annotated
getAnnotation, getAnnotationElement, getId, iterAppInfos
 
Methods inherited from class org.jbind.xml.schema.element.OpenAttributes
getAttributeString
 
Methods inherited from class org.jbind.xml.schema.element.Element
acceptAppInfoVisitor, addAttribute, createChild, createGlobalRef, getAttributes, getBindingAttribute, getBoolean, getChildByClass, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalName, getLocalStringBindingAttribute, getLocation, getNamespace, getNamespaceUri, getParent_, getParentHelper, getPrefix, getPrefixToNamespaceMapping, getQName, getSchema, getSchemaDocument, getSchemaElement, getStringBindingAttribute, getSubElement, getTargetNamespace, iterChildrenByClass, setLocation, setParent_, toString
 
Methods inherited from class org.jbind.xml.schema.element.Parent
addChild, hasChildren, iterChildren, iterXmlNodes, visitChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.schema.element.IDerivation
collectRefsForCreation, getBaseAttribute, getSimpleTypeDef, setBaseAttribute
 
Methods inherited from interface org.jbind.xml.schema.element.IAnnotated
getAnnotationElement, getId
 
Methods inherited from interface org.jbind.xml.schema.element.IOpenAttributes
getAttributeString
 
Methods inherited from interface org.jbind.xml.schema.element.IElement
addAttribute, createChild, getQName, getSchema, getSchemaDocument, getSubElement, iterChildrenByClass, validateElement
 
Methods inherited from interface org.jbind.xml.schema.element.IParent
addChild, hasChildren, iterChildren
 
Methods inherited from interface org.jbind.xml.schema.element.INode
getParent_, setLocation, setParent_
 
Methods inherited from interface org.jbind.xml.base.IHasLocation
getLocation
 
Methods inherited from interface org.jbind.xml.core.cmp.IXmlNode
acceptAppInfoVisitor
 
Methods inherited from interface org.jbind.xml.base.IHasBindingAttributes
getBindingAttribute, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalStringBindingAttribute, getStringBindingAttribute
 
Methods inherited from interface org.jbind.xml.core.cmp.ISourceInfo
getAnnotation, getPrefixToNamespaceMapping
 
Methods inherited from interface org.jbind.xml.core.cmp.IXmlElement
getAttributes, iterXmlNodes
 
Methods inherited from interface org.jbind.xml.schema.instantiation.IComponentJobHelper
collectRefsForCompletion, collectRefsForCreation, collectRefsForValidation
 
Methods inherited from interface org.jbind.xml.core.cmp.ISchemaDataAdder
addSchemaData
 

Constructor Detail

SimpleRestrictionDerivation

public SimpleRestrictionDerivation(CreationParams aCreationParams,
                                   java.lang.String aRole)
Method Detail

doCreateChild

protected IElement doCreateChild(CreationParams aCreationParams)
                          throws XmlException
Description copied from class: Element
Hook method to create a child element.

Overrides:
doCreateChild in class SimpleRestriction
Throws:
XmlException

getInlinedBaseAttribute

public IRef getInlinedBaseAttribute()
Description copied from interface: IDerivation
Gets the inlined base attribute. In case of simple type restrictions (either as a simple type derivation or as a complex type derivation with simple content) there may be an inlined simple type. The type referenced by the inlined base attribute must be a subtype of the type referenced by the base attribute.

Specified by:
getInlinedBaseAttribute in interface IDerivation
Returns:
(optional).

getEffectiveBaseAttribute

public IRef getEffectiveBaseAttribute()
Description copied from interface: IDerivation
Gets the effective base attribute. If there is a base attribute and an inlined base attribute then the inlined base attribute is returned.

Specified by:
getEffectiveBaseAttribute in interface IDerivation
Returns:
(required).

getIsExtension

public boolean getIsExtension()
Specified by:
getIsExtension in interface IDerivation

getModelGroup

public IModelGroup getModelGroup()
Description copied from interface: IDerivation
Gets the model group.

Specified by:
getModelGroup in interface IDerivation
Returns:
Returns the model group iff this is a complex content model or null otherwise. (optional)

getModelGroupRef

public IModelGroupRef getModelGroupRef()
Specified by:
getModelGroupRef in interface IDerivation

getAttributeInfos

public IAttributeInfos getAttributeInfos()
Description copied from interface: IDerivation
Gets the attribute infos enclosed in the derivation. If it is an abbreviated derivation then null is returned.

Specified by:
getAttributeInfos in interface IDerivation
Returns:
Attribute infos. (optional)

referencedBaseTypeMustNotBeComplex

protected boolean referencedBaseTypeMustNotBeComplex()
Specified by:
referencedBaseTypeMustNotBeComplex in class SimpleRestriction

createComponent

public IComponent createComponent(IElementHelper aHelper,
                                  IConstraintViolations aViolations)
Creates the simple content type.

Specified by:
createComponent in interface IComponentJobHelper

completeComponent

public void completeComponent(IElementHelper aHelper,
                              IComponent aComponent,
                              IConstraintViolations aViolations)
Specified by:
completeComponent in interface IComponentJobHelper

getName

public java.lang.String getName()
Specified by:
getName in interface IComponentJobHelper

getSymbolSpace

public ISymbolspace getSymbolSpace()
Specified by:
getSymbolSpace in interface IComponentJobHelper

isTopLevelComponent

public boolean isTopLevelComponent()
Specified by:
isTopLevelComponent in interface IElement
Overrides:
isTopLevelComponent in class Element

createAndAddJob

public void createAndAddJob(IHasTopLevelJobs aSchemaJob)
Description copied from interface: ITopLevelJobHelper
Creates a job for this helper and adds it to the schema job. This method is used by a schema element when it creates the sub jobs of a schema job.

Specified by:
createAndAddJob in interface ITopLevelJobHelper
Returns:
(required).