org.eclipse.xsd.impl
Class XSDNamedComponentImpl
java.lang.Object
|
+--org.eclipse.emf.common.notify.impl.NotifierImpl
|
+--org.eclipse.emf.ecore.impl.EObjectImpl
|
+--org.eclipse.xsd.impl.XSDConcreteComponentImpl
|
+--org.eclipse.xsd.impl.XSDComponentImpl
|
+--org.eclipse.xsd.impl.XSDNamedComponentImpl
- All Implemented Interfaces:
- org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, org.eclipse.emf.common.notify.Notifier, XSDComponent, XSDConcreteComponent, XSDNamedComponent
- Direct Known Subclasses:
- XSDFeatureImpl, XSDIdentityConstraintDefinitionImpl, XSDNotationDeclarationImpl, XSDRedefinableComponentImpl
- public abstract class XSDNamedComponentImpl
- extends XSDComponentImpl
- implements XSDNamedComponent
An implementation of the model object 'Named Component'.
The following features are implemented:
Inner classes inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
org.eclipse.emf.ecore.impl.EObjectImpl.EPropertiesHolder |
Fields inherited from class org.eclipse.xsd.impl.XSDConcreteComponentImpl |
ANALYZED, ANALYZING, CIRCULAR, diagnostics, element, ELEMENT_EDEFAULT, ERROR, FATAL, INFORMATION, isReconciling, UNANALYZED, updatingDOM, WARNING, xsdContents |
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
eContainer, eContainerFeatureID, ELAST_EOBJECT_FLAG, eProperties |
Fields inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl |
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG |
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject |
EOPPOSITE_FEATURE_BASE |
Method Summary |
static void |
addToSortedList(java.util.List xsdNamedComponents,
XSDNamedComponent xsdNamedComponent)
|
protected void |
adoptBy(XSDSchema xsdSchema)
|
protected void |
changeAttribute(org.eclipse.emf.ecore.EAttribute eAttribute)
|
java.lang.Object |
eGet(org.eclipse.emf.ecore.EStructuralFeature eFeature,
boolean resolve)
|
org.eclipse.emf.common.notify.NotificationChain |
eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
int featureID,
java.lang.Class baseClass,
org.eclipse.emf.common.notify.NotificationChain msgs)
|
boolean |
eIsSet(org.eclipse.emf.ecore.EStructuralFeature eFeature)
|
void |
eSet(org.eclipse.emf.ecore.EStructuralFeature eFeature,
java.lang.Object newValue)
|
protected org.eclipse.emf.ecore.EClass |
eStaticClass()
|
void |
eUnset(org.eclipse.emf.ecore.EStructuralFeature eFeature)
|
static XSDNamedComponent |
findInSortedList(java.util.List xsdNamedComponents,
java.lang.String targetNamespace,
java.lang.String localName)
|
java.lang.String |
getAliasName()
Returns the value of the 'Alias Name' attribute. |
java.lang.String |
getAliasURI()
|
java.lang.String |
getName()
|
java.lang.String |
getQName()
Returns the value of the 'QName' attribute. |
java.lang.String |
getQName(XSDConcreteComponent relativeToComponent)
Returns this named component's
'QName '
in the context of the given component. |
XSDNamedComponent |
getResolvedNamedComponent()
|
java.lang.String |
getTargetNamespace()
|
java.lang.String |
getURI()
Returns the value of the 'URI' attribute. |
protected java.lang.String |
getURIReferenceLabel()
|
boolean |
hasNameAndTargetNamespace(java.lang.String name,
java.lang.String targetNamespace)
Returns whether this named component has the given name and target namespace. |
boolean |
hasSameNameAndTargetNamespace(XSDNamedComponent xsdNamedComponent)
Returns whether this named component and the given named component are named the same. |
boolean |
hasURI(java.lang.String uri)
Returns whether this named component has the given URI. |
boolean |
isNamedComponentReference()
|
static void |
mergeToSortedList(java.util.List xsdNamedComponentsTarget,
java.util.List xsdNamedComponentsSource)
|
protected void |
patch()
|
protected void |
patchTargetNamespaceAttribute()
|
protected void |
reconcileAttributes(org.w3c.dom.Element changedElement)
|
protected void |
reconcileNameAttribute()
|
void |
setName(java.lang.String newName)
|
void |
setTargetNamespace(java.lang.String newTargetNamespace)
|
static java.util.List |
sortNamedComponents(java.util.Collection xsdNamedComponents)
|
java.lang.String |
toString()
|
Methods inherited from class org.eclipse.xsd.impl.XSDConcreteComponentImpl |
adoptContent, adoptDiagnostic, analyze, changeReference, checkAttributes, checkAttributeTypeConstraint, checkAttributeTypeConstraint, checkBuiltInTypeConstraint, checkComplexContent, checkComplexContent, checkElementComplexContent, checkSimpleTypeConstraint, clearDiagnostics, cloneConcreteComponent, cloneConcreteComponents, considerAllContainsForBestConcreteComponent, contains, 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, getXSDContents, getXSDFactory, getXSDPackage, handleAnnotationReconciliation, handleElementForAdopt, handleReconciliation, handleUnreconciledElement, isUpdatingDOM, moveContent, niceCreateNamespaceAttribute, niceInsertBefore, niceRemoveChild, niceSetAttribute, niceSetAttributeURIValue, orphanBy, orphanContent, orphanDiagnostic, printDFA, reconcile, reconcileContents, reportConstraintViolation, 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 |
eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicSetContainer, eClass, eContainer, eContainerFeatureID, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicIsSet, eDynamicSet, eDynamicUnset, eGet, eInternalResource, eInverseAdd, eIsProxy, eProperties, eProxyURI, eResource, eSetClass, eSetProxyURI, eSetResource, eSetting, eSettingIndex, eSettings |
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl |
eAdapters, eDeliver, eSetDeliver |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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, eContainmentFeature, eContents, eCrossReferences, eGet, eIsProxy, eResource |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
NAME_EDEFAULT
protected static final java.lang.String NAME_EDEFAULT
- The default value of the '
Name
' attribute.
- See Also:
getName()
name
protected java.lang.String name
- The cached value of the '
Name
' attribute.
- See Also:
getName()
TARGET_NAMESPACE_EDEFAULT
protected static final java.lang.String TARGET_NAMESPACE_EDEFAULT
- The default value of the '
Target Namespace
' attribute.
- See Also:
getTargetNamespace()
targetNamespace
protected java.lang.String targetNamespace
- The cached value of the '
Target Namespace
' attribute.
- See Also:
getTargetNamespace()
XSDNamedComponentImpl
protected XSDNamedComponentImpl()
sortNamedComponents
public static java.util.List sortNamedComponents(java.util.Collection xsdNamedComponents)
addToSortedList
public static void addToSortedList(java.util.List xsdNamedComponents,
XSDNamedComponent xsdNamedComponent)
findInSortedList
public static XSDNamedComponent findInSortedList(java.util.List xsdNamedComponents,
java.lang.String targetNamespace,
java.lang.String localName)
mergeToSortedList
public static void mergeToSortedList(java.util.List xsdNamedComponentsTarget,
java.util.List xsdNamedComponentsSource)
eStaticClass
protected org.eclipse.emf.ecore.EClass eStaticClass()
-
- Overrides:
eStaticClass
in class XSDComponentImpl
getName
public java.lang.String getName()
-
- Specified by:
getName
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Returns:
- the value of the 'Name' attribute.
- See Also:
XSDNamedComponent.setName(String)
,
XSDPackage.getXSDNamedComponent_Name()
setName
public void setName(java.lang.String newName)
-
- Specified by:
setName
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Parameters:
value
- the new value of the 'Name' attribute.- See Also:
XSDNamedComponent.getName()
getTargetNamespace
public java.lang.String getTargetNamespace()
-
- Specified by:
getTargetNamespace
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Returns:
- the value of the 'Target Namespace' attribute.
- See Also:
XSDNamedComponent.setTargetNamespace(String)
,
XSDPackage.getXSDNamedComponent_TargetNamespace()
setTargetNamespace
public void setTargetNamespace(java.lang.String newTargetNamespace)
-
- Specified by:
setTargetNamespace
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Parameters:
value
- the new value of the 'Target Namespace' attribute.- See Also:
XSDNamedComponent.getTargetNamespace()
getURIReferenceLabel
protected java.lang.String getURIReferenceLabel()
- Overrides:
getURIReferenceLabel
in class XSDConcreteComponentImpl
getAliasName
public java.lang.String getAliasName()
- Description copied from interface:
XSDNamedComponent
- Returns the value of the 'Alias Name' attribute.
This attempts to construct a relatively meaningful name for an anonymous component
by using the name of the containing component and an indication of the relation to that component,
For example,
"E_._type
" would be the alias name of the anonymous type definition of the element "E
" and
"LT_._item
" would be the alias name of the anonymous item type definition of the list type defintion "LT
".
- Specified by:
getAliasName
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Returns:
- the value of the 'Alias Name' attribute.
- See Also:
XSDPackage.getXSDNamedComponent_AliasName()
getURI
public java.lang.String getURI()
- Description copied from interface:
XSDNamedComponent
- Returns the value of the 'URI' attribute.
This is equivalent to the string
<target namespace
>#<name
>
where a null
target namespace is taken to mean an empty string.
- Specified by:
getURI
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Returns:
- the value of the 'URI' attribute.
- See Also:
XSDConcreteComponent.resolveAttributeDeclarationURI(java.lang.String)
,
XSDConcreteComponent.resolveAttributeGroupDefinitionURI(java.lang.String)
,
XSDConcreteComponent.resolveComplexTypeDefinitionURI(java.lang.String)
,
XSDConcreteComponent.resolveElementDeclarationURI(java.lang.String)
,
XSDConcreteComponent.resolveIdentityConstraintDefinitionURI(java.lang.String)
,
XSDConcreteComponent.resolveModelGroupDefinitionURI(java.lang.String)
,
XSDConcreteComponent.resolveNotationDeclarationURI(java.lang.String)
,
XSDConcreteComponent.resolveSimpleTypeDefinitionURI(java.lang.String)
,
XSDPackage.getXSDNamedComponent_URI()
getAliasURI
public java.lang.String getAliasURI()
-
- Specified by:
getAliasURI
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Returns:
- the value of the 'Alias URI' attribute.
- See Also:
XSDPackage.getXSDNamedComponent_AliasURI()
getQName
public java.lang.String getQName(XSDConcreteComponent relativeToComponent)
- Description copied from interface:
XSDNamedComponent
- Returns this named component's
'
QName
'
in the context of the given component.
- Specified by:
getQName
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Parameters:
relativeToComponent
- the context at which to express the QName.- Returns:
- the '
QName
'. - See Also:
XSDNamedComponent.getQName()
getQName
public java.lang.String getQName()
- Description copied from interface:
XSDNamedComponent
- Returns the value of the 'QName' attribute.
This concrete attribute is equivalent to
xsdNamedComponent.getQName
(xsdNamedComponent)
- Specified by:
getQName
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Returns:
- the value of the 'QName' attribute.
- See Also:
XSDNamedComponent.getQName(org.eclipse.xsd.XSDConcreteComponent)
,
XSDPackage.getXSDNamedComponent_QName()
eInverseRemove
public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
int featureID,
java.lang.Class baseClass,
org.eclipse.emf.common.notify.NotificationChain msgs)
-
- Overrides:
eInverseRemove
in class XSDComponentImpl
eGet
public java.lang.Object eGet(org.eclipse.emf.ecore.EStructuralFeature eFeature,
boolean resolve)
-
- Specified by:
eGet
in interface org.eclipse.emf.ecore.EObject
- Overrides:
eGet
in class XSDComponentImpl
eSet
public void eSet(org.eclipse.emf.ecore.EStructuralFeature eFeature,
java.lang.Object newValue)
-
- Specified by:
eSet
in interface org.eclipse.emf.ecore.EObject
- Overrides:
eSet
in class XSDComponentImpl
eUnset
public void eUnset(org.eclipse.emf.ecore.EStructuralFeature eFeature)
-
- Specified by:
eUnset
in interface org.eclipse.emf.ecore.EObject
- Overrides:
eUnset
in class XSDComponentImpl
eIsSet
public boolean eIsSet(org.eclipse.emf.ecore.EStructuralFeature eFeature)
-
- Specified by:
eIsSet
in interface org.eclipse.emf.ecore.EObject
- Overrides:
eIsSet
in class XSDComponentImpl
toString
public java.lang.String toString()
-
- Overrides:
toString
in class XSDConcreteComponentImpl
patch
protected void patch()
- Overrides:
patch
in class XSDConcreteComponentImpl
patchTargetNamespaceAttribute
protected void patchTargetNamespaceAttribute()
adoptBy
protected void adoptBy(XSDSchema xsdSchema)
- Overrides:
adoptBy
in class XSDConcreteComponentImpl
reconcileAttributes
protected void reconcileAttributes(org.w3c.dom.Element changedElement)
- Overrides:
reconcileAttributes
in class XSDConcreteComponentImpl
reconcileNameAttribute
protected void reconcileNameAttribute()
changeAttribute
protected void changeAttribute(org.eclipse.emf.ecore.EAttribute eAttribute)
- Overrides:
changeAttribute
in class XSDConcreteComponentImpl
isNamedComponentReference
public boolean isNamedComponentReference()
getResolvedNamedComponent
public XSDNamedComponent getResolvedNamedComponent()
hasSameNameAndTargetNamespace
public boolean hasSameNameAndTargetNamespace(XSDNamedComponent xsdNamedComponent)
- Description copied from interface:
XSDNamedComponent
- Returns whether this named component and the given named component are named the same.
This is equivalent to
xsdNamedComponent.hasNameAndTargetNamespace
(xsdOtherNamedComponent.getName
(),
xsdOtherNamedComponent.getTargetNamespace
())
- Specified by:
hasSameNameAndTargetNamespace
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Parameters:
xsdNamedComponent
- another named component.- Returns:
- whether this named component and the given named component are named the same.
- See Also:
XSDNamedComponent.hasNameAndTargetNamespace(java.lang.String, java.lang.String)
,
XSDNamedComponent.getName()
,
XSDNamedComponent.getTargetNamespace()
hasNameAndTargetNamespace
public boolean hasNameAndTargetNamespace(java.lang.String name,
java.lang.String targetNamespace)
- Description copied from interface:
XSDNamedComponent
- Returns whether this named component has the given name and target namespace.
This is equivalent to
(targetNamespace == null ?
getTargetNamespace() == null :
targetNamespace.equals(getTargetNamespace())) &&
(name == null ?
getName() == null :
name.equals(getName()))
- Specified by:
hasNameAndTargetNamespace
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Parameters:
name
- the name.target
- namespace the target namespace.- Returns:
- whether this named component has the given name and target namespace.
- See Also:
XSDNamedComponent.hasSameNameAndTargetNamespace(org.eclipse.xsd.XSDNamedComponent)
,
XSDNamedComponent.hasURI(java.lang.String)
,
XSDNamedComponent.getName()
,
XSDNamedComponent.getTargetNamespace()
hasURI
public boolean hasURI(java.lang.String uri)
- Description copied from interface:
XSDNamedComponent
- Returns whether this named component has the given URI.
This is equivalent to
String theTargetNamespace = getTargetNamespace();
if (theTargetNamespace == null)
{
theTargetNamespace = "";
}
String theName = getName();
if (theName == null)
{
theName = "";
}
return
qName.startsWith(theTargetNamespace) &&
qName.endsWith(theName) &&
qName.length() == theName.length() + theTargetNamespace.length() + 1;
- Specified by:
hasURI
in interface XSDNamedComponent
- Following copied from interface:
org.eclipse.xsd.XSDNamedComponent
- Parameters:
uri
- the URI.- Returns:
- whether this named component has the given URI.
- See Also:
XSDNamedComponent.hasNameAndTargetNamespace(java.lang.String, java.lang.String)
,
XSDNamedComponent.hasSameNameAndTargetNamespace(org.eclipse.xsd.XSDNamedComponent)
,
XSDNamedComponent.getURI()