org.eclipse.xsd.impl
Class XSDTypeDefinitionImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.EObjectImpl
              extended by org.eclipse.xsd.impl.XSDConcreteComponentImpl
                  extended by org.eclipse.xsd.impl.XSDComponentImpl
                      extended by org.eclipse.xsd.impl.XSDNamedComponentImpl
                          extended by org.eclipse.xsd.impl.XSDRedefinableComponentImpl
                              extended by org.eclipse.xsd.impl.XSDTypeDefinitionImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, XSDComponent, XSDConcreteComponent, XSDNamedComponent, XSDRedefinableComponent, XSDRedefineContent, XSDSchemaContent, XSDTypeDefinition
Direct Known Subclasses:
XSDComplexTypeDefinitionImpl, XSDSimpleTypeDefinitionImpl

public abstract class XSDTypeDefinitionImpl
extends XSDRedefinableComponentImpl
implements XSDTypeDefinition

An implementation of the model object 'Type Definition'.

The following features are implemented:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xsd.impl.XSDNamedComponentImpl
XSDNamedComponentImpl.Comparator, XSDNamedComponentImpl.StringPairComparator, XSDNamedComponentImpl.XSDNamedComponentList<E extends java.lang.Object & XSDNamedComponent>
 
Nested classes/interfaces inherited from class org.eclipse.xsd.impl.XSDConcreteComponentImpl
XSDConcreteComponentImpl.XSDContentsEList
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
protected  int analysisState
           
protected  XSDAnnotation annotation
          The cached value of the 'Annotation' containment reference
protected  org.eclipse.emf.common.util.EList<XSDAnnotation> annotations
          The cached value of the 'Annotations' reference list
protected  XSDAnnotation derivationAnnotation
          The cached value of the 'Derivation Annotation' containment reference
 
Fields inherited from class org.eclipse.xsd.impl.XSDRedefinableComponentImpl
CIRCULAR_EDEFAULT
 
Fields inherited from class org.eclipse.xsd.impl.XSDNamedComponentImpl
ALIAS_NAME_EDEFAULT, ALIAS_URI_EDEFAULT, name, NAME_EDEFAULT, QNAME_EDEFAULT, TARGET_NAMESPACE_EDEFAULT, targetNamespace, URI_EDEFAULT
 
Fields inherited from class org.eclipse.xsd.impl.XSDConcreteComponentImpl
ANALYZED, ANALYZING, CIRCULAR, diagnostics, element, ELEMENT_EDEFAULT, ERROR, FATAL, forceResolve, INFORMATION, isReconciling, UNANALYZED, updatingDOM, WARNING, xsdContents
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY
 
Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
protected XSDTypeDefinitionImpl()
           
 
Method Summary
protected  boolean analyze()
           
 org.eclipse.emf.common.notify.NotificationChain basicSetAnnotation(XSDAnnotation newAnnotation, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 org.eclipse.emf.common.notify.NotificationChain basicSetDerivationAnnotation(XSDAnnotation newDerivationAnnotation, org.eclipse.emf.common.notify.NotificationChain msgs)
           
static XSDTypeDefinition createTypeDefinition(org.w3c.dom.Node node)
           
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, java.lang.Object newValue)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 void eUnset(int featureID)
           
 XSDAnnotation getAnnotation()
           
 org.eclipse.emf.common.util.EList<XSDAnnotation> getAnnotations()
           
 XSDTypeDefinition getBadTypeDerivation(XSDTypeDefinition xsdTypeDefinition, boolean extension, boolean restriction)
          Returns the first type between this and the given one, that derives from it's base in a way not permitted as constrained by Type Derivation OK Complex and Simple.
 XSDTypeDefinition getBaseType()
          Returns the value of the 'Base Type' reference
 XSDParticle getComplexType()
           
 XSDAnnotation getDerivationAnnotation()
           
static XSDTypeDefinition getLowestCommonAncestor(java.util.Collection<? extends XSDTypeDefinition> xsdTypeDefinitions)
           
 XSDTypeDefinition getRootType()
          Returns the value of the 'Root Type' reference
 XSDSimpleTypeDefinition getSimpleType()
          Returns the value of the 'Simple Type' reference
protected  void handleAnalysis()
           
 boolean isCircular()
           
protected  void patch()
           
 void setAnnotation(XSDAnnotation newAnnotation)
           
 void setDerivationAnnotation(XSDAnnotation newDerivationAnnotation)
           
 
Methods inherited from class org.eclipse.xsd.impl.XSDRedefinableComponentImpl
getCircular
 
Methods inherited from class org.eclipse.xsd.impl.XSDNamedComponentImpl
addToSortedList, adoptBy, changeAttribute, findInSortedList, getAliasName, getAliasURI, getName, getQName, getQName, getResolvedNamedComponent, getTargetNamespace, getURI, getURIReferenceLabel, hasNameAndTargetNamespace, hasSameNameAndTargetNamespace, hasURI, isNamedComponentReference, mergeToSortedList, patchTargetNamespaceAttribute, patchTargetNamespaceAttribute, reconcileAttributes, reconcileNameAttribute, setName, setTargetNamespace, sortNamedComponents, toString
 
Methods inherited from class org.eclipse.xsd.impl.XSDConcreteComponentImpl
adoptContent, adoptDiagnostic, changeReference, checkAttributes, checkAttributeTypeConstraint, checkAttributeTypeConstraint, checkBuiltInTypeConstraint, checkComplexContent, checkComplexContent, checkElementComplexContent, checkSimpleTypeConstraint, clearDiagnostics, cloneConcreteComponent, cloneConcreteComponents, considerAllContainsForBestConcreteComponent, contains, convertToBoolean, createDiagnostic, createDiagnostic, createDiagnostic, createDiagnostic, createElement, createElement, createRequiredAttributeDiagnostic, createUnresolvedAttributeDeclaration, createUnresolvedAttributeGroupDefinition, createUnresolvedComplexTypeDefinition, createUnresolvedElementDeclaration, createUnresolvedIdentityConstraintDefinition, createUnresolvedModelGroupDefinition, createUnresolvedNotationDeclaration, createUnresolvedSimpleTypeDefinition, createUnresolvedTypeDefinition, elementAttributesChanged, elementChanged, elementContentsChanged, eNotificationRequired, eNotify, eObjectForURIFragmentSegment, eURIFragmentSegment, forceEngulf, forceEngulf, forceNiceInsertBefore, forceNiceRemoveChild, forceReplace, getAdoptionParentNode, getBestConcreteComponent, getComponentsWithApplicationInformation, getComponentsWithInformation, getComponentsWithUserInformation, getContainer, getContentNodes, getDiagnostics, getDiagnosticTarget, getElement, getRootContainer, getSchema, getXSDConcreteComponentImpls, getXSDContents, getXSDFactory, getXSDPackage, handleAnnotationReconciliation, handleElementForAdopt, handleReconciliation, handleUnreconciledElement, isUpdatingDOM, moveContent, niceCreateNamespaceAttribute, niceInsertBefore, niceRemoveChild, niceSetAttribute, niceSetAttributeURIValue, orphanBy, orphanContent, orphanDiagnostic, populateDiagnostic, printDFA, reconcile, reconcileContents, reportConstraintViolation, reset, resolveAttributeDeclaration, resolveAttributeDeclaration, resolveAttributeDeclarationURI, resolveAttributeGroupDefinition, resolveAttributeGroupDefinition, resolveAttributeGroupDefinitionURI, resolveComplexTypeDefinition, resolveComplexTypeDefinition, resolveComplexTypeDefinitionURI, resolveElementDeclaration, resolveElementDeclaration, resolveElementDeclarationURI, resolveIdentityConstraintDefinition, resolveIdentityConstraintDefinition, resolveIdentityConstraintDefinitionURI, resolveModelGroupDefinition, resolveModelGroupDefinition, resolveModelGroupDefinitionURI, resolveNotationDeclaration, resolveNotationDeclaration, resolveNotationDeclarationURI, resolveSimpleTypeDefinition, resolveSimpleTypeDefinition, resolveSimpleTypeDefinitionURI, resolveTypeDefinition, resolveTypeDefinition, resolveTypeDefinitionURI, setElement, setElementGen, setListContentAndOrder, traverseToRootForAnalysis, traverseToRootForPatching, updateElement, updateElement, updatePrefix, validate
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInvocationDelegate, eInvoke, eIsSet, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eBasicAdapterArray, eBasicHasAdapters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.xsd.XSDNamedComponent
getAliasName, getAliasURI, getName, getQName, getQName, getTargetNamespace, getURI, hasNameAndTargetNamespace, hasSameNameAndTargetNamespace, hasURI, setName, setTargetNamespace
 
Methods inherited from interface org.eclipse.xsd.XSDConcreteComponent
clearDiagnostics, cloneConcreteComponent, contains, elementAttributesChanged, elementChanged, elementContentsChanged, getComponentsWithApplicationInformation, getComponentsWithUserInformation, getContainer, getDiagnostics, getElement, getRootContainer, getSchema, resolveAttributeDeclaration, resolveAttributeDeclaration, resolveAttributeDeclarationURI, resolveAttributeGroupDefinition, resolveAttributeGroupDefinition, resolveAttributeGroupDefinitionURI, resolveComplexTypeDefinition, resolveComplexTypeDefinition, resolveComplexTypeDefinitionURI, resolveElementDeclaration, resolveElementDeclaration, resolveElementDeclarationURI, resolveIdentityConstraintDefinition, resolveIdentityConstraintDefinition, resolveIdentityConstraintDefinitionURI, resolveModelGroupDefinition, resolveModelGroupDefinition, resolveModelGroupDefinitionURI, resolveNotationDeclaration, resolveNotationDeclaration, resolveNotationDeclarationURI, resolveSimpleTypeDefinition, resolveSimpleTypeDefinition, resolveSimpleTypeDefinitionURI, resolveTypeDefinition, resolveTypeDefinition, resolveTypeDefinitionURI, setElement, updateElement, updateElement, validate
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.xsd.XSDConcreteComponent
clearDiagnostics, cloneConcreteComponent, contains, elementAttributesChanged, elementChanged, elementContentsChanged, getComponentsWithApplicationInformation, getComponentsWithUserInformation, getContainer, getDiagnostics, getElement, getRootContainer, getSchema, resolveAttributeDeclaration, resolveAttributeDeclaration, resolveAttributeDeclarationURI, resolveAttributeGroupDefinition, resolveAttributeGroupDefinition, resolveAttributeGroupDefinitionURI, resolveComplexTypeDefinition, resolveComplexTypeDefinition, resolveComplexTypeDefinitionURI, resolveElementDeclaration, resolveElementDeclaration, resolveElementDeclarationURI, resolveIdentityConstraintDefinition, resolveIdentityConstraintDefinition, resolveIdentityConstraintDefinitionURI, resolveModelGroupDefinition, resolveModelGroupDefinition, resolveModelGroupDefinitionURI, resolveNotationDeclaration, resolveNotationDeclaration, resolveNotationDeclarationURI, resolveSimpleTypeDefinition, resolveSimpleTypeDefinition, resolveSimpleTypeDefinitionURI, resolveTypeDefinition, resolveTypeDefinition, resolveTypeDefinitionURI, setElement, updateElement, updateElement, validate
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Field Detail

annotation

protected XSDAnnotation annotation
The cached value of the 'Annotation' containment reference.

See Also:
getAnnotation()

derivationAnnotation

protected XSDAnnotation derivationAnnotation
The cached value of the 'Derivation Annotation' containment reference.

See Also:
getDerivationAnnotation()

annotations

protected org.eclipse.emf.common.util.EList<XSDAnnotation> annotations
The cached value of the 'Annotations' reference list.

See Also:
getAnnotations()

analysisState

protected int analysisState
Constructor Detail

XSDTypeDefinitionImpl

protected XSDTypeDefinitionImpl()

Method Detail

createTypeDefinition

public static XSDTypeDefinition createTypeDefinition(org.w3c.dom.Node node)

eStaticClass

protected org.eclipse.emf.ecore.EClass eStaticClass()

Overrides:
eStaticClass in class XSDRedefinableComponentImpl

getAnnotation

public XSDAnnotation getAnnotation()

Specified by:
getAnnotation in interface XSDTypeDefinition
Returns:
the value of the 'Annotation' containment reference.
See Also:
XSDTypeDefinition.setAnnotation(XSDAnnotation), XSDPackage.getXSDTypeDefinition_Annotation()

setAnnotation

public void setAnnotation(XSDAnnotation newAnnotation)

Specified by:
setAnnotation in interface XSDTypeDefinition
Parameters:
newAnnotation - the new value of the 'Annotation' containment reference.
See Also:
XSDTypeDefinition.getAnnotation()

basicSetAnnotation

public org.eclipse.emf.common.notify.NotificationChain basicSetAnnotation(XSDAnnotation newAnnotation,
                                                                          org.eclipse.emf.common.notify.NotificationChain msgs)


getDerivationAnnotation

public XSDAnnotation getDerivationAnnotation()

Specified by:
getDerivationAnnotation in interface XSDTypeDefinition
Returns:
the value of the 'Derivation Annotation' containment reference.
See Also:
XSDTypeDefinition.setDerivationAnnotation(XSDAnnotation), XSDPackage.getXSDTypeDefinition_DerivationAnnotation()

setDerivationAnnotation

public void setDerivationAnnotation(XSDAnnotation newDerivationAnnotation)

Specified by:
setDerivationAnnotation in interface XSDTypeDefinition
Parameters:
newDerivationAnnotation - the new value of the 'Derivation Annotation' containment reference.
See Also:
XSDTypeDefinition.getDerivationAnnotation()

basicSetDerivationAnnotation

public org.eclipse.emf.common.notify.NotificationChain basicSetDerivationAnnotation(XSDAnnotation newDerivationAnnotation,
                                                                                    org.eclipse.emf.common.notify.NotificationChain msgs)


getAnnotations

public org.eclipse.emf.common.util.EList<XSDAnnotation> getAnnotations()

Specified by:
getAnnotations in interface XSDTypeDefinition
Returns:
the value of the 'Annotations' reference list.
See Also:
XSDPackage.getXSDTypeDefinition_Annotations()

patch

protected void patch()
Overrides:
patch in class XSDNamedComponentImpl

analyze

protected boolean analyze()
Overrides:
analyze in class XSDConcreteComponentImpl

handleAnalysis

protected void handleAnalysis()

getLowestCommonAncestor

public static XSDTypeDefinition getLowestCommonAncestor(java.util.Collection<? extends XSDTypeDefinition> xsdTypeDefinitions)

getBaseType

public XSDTypeDefinition getBaseType()
Description copied from interface: XSDTypeDefinition
Returns the value of the 'Base Type' reference.

This represents the same result as either the simple 'Base Type Definition' reference or the complex 'Base Type Definition' reference.

Specified by:
getBaseType in interface XSDTypeDefinition
Returns:
the value of the 'Base Type' reference.
See Also:
XSDPackage.getXSDTypeDefinition_BaseType()

getRootType

public XSDTypeDefinition getRootType()
Description copied from interface: XSDTypeDefinition
Returns the value of the 'Root Type' reference.

This walks the base types until it hits that one that has the ur-type definition as it's base type.

Specified by:
getRootType in interface XSDTypeDefinition
Returns:
the value of the 'Root Type' reference.
See Also:
XSDPackage.getXSDTypeDefinition_RootType()

getSimpleType

public XSDSimpleTypeDefinition getSimpleType()
Description copied from interface: XSDTypeDefinition
Returns the value of the 'Simple Type' reference.

This represents either the 'Simple Type Definition' itself or the complex 'Content Type' reference, if it is simple.

Specified by:
getSimpleType in interface XSDTypeDefinition
Returns:
the value of the 'Simple Type' reference.
See Also:
XSDPackage.getXSDTypeDefinition_SimpleType()

getComplexType

public XSDParticle getComplexType()

Specified by:
getComplexType in interface XSDTypeDefinition
Returns:
the value of the 'Complex Type' reference.
See Also:
XSDPackage.getXSDTypeDefinition_ComplexType()

eInverseRemove

public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                      int featureID,
                                                                      org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
eInverseRemove in class XSDConcreteComponentImpl

eGet

public java.lang.Object eGet(int featureID,
                             boolean resolve,
                             boolean coreType)

Specified by:
eGet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eGet in class XSDRedefinableComponentImpl

eSet

public void eSet(int featureID,
                 java.lang.Object newValue)

Specified by:
eSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eSet in class XSDNamedComponentImpl

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class XSDNamedComponentImpl

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class XSDRedefinableComponentImpl

isCircular

public boolean isCircular()
Description copied from class: XSDRedefinableComponentImpl

Specified by:
isCircular in interface XSDRedefinableComponent
Overrides:
isCircular in class XSDRedefinableComponentImpl
Returns:
the value of the 'Circular' attribute.
See Also:
XSDPackage.getXSDRedefinableComponent_Circular()

getBadTypeDerivation

public XSDTypeDefinition getBadTypeDerivation(XSDTypeDefinition xsdTypeDefinition,
                                              boolean extension,
                                              boolean restriction)
Description copied from interface: XSDTypeDefinition
Returns the first type between this and the given one, that derives from it's base in a way not permitted as constrained by Type Derivation OK Complex and Simple. The result is null if the derivation is valid; the result is the UR-type, if this type is not related to the given type; otherwise, the result is the base with the blocked derivation method.

Specified by:
getBadTypeDerivation in interface XSDTypeDefinition
Returns:
the first type between this and the given one, that derives from it's base in a way not permitted.

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.