com.ibm.etools.xsd
Interface XSDNamedComponent

All Superinterfaces:
com.ibm.etools.emf.notify.Notifier, com.ibm.etools.emf.ref.RefBaseObject, com.ibm.etools.emf.ref.RefObject, com.ibm.etools.emf.resource.ResourceSetReference, XSDComponent, XSDConcreteComponent
All Known Subinterfaces:
XSDAttributeDeclaration, XSDAttributeGroupDefinition, XSDComplexTypeDefinition, XSDElementDeclaration, XSDFeature, XSDIdentityConstraintDefinition, XSDModelGroupDefinition, XSDNotationDeclaration, XSDRedefinableComponent, XSDSimpleTypeDefinition, XSDTypeDefinition
All Known Implementing Classes:
XSDNamedComponentImpl, XSDRedefinableComponentImpl, XSDIdentityConstraintDefinitionImpl, XSDFeatureImpl, XSDNotationDeclarationImpl

public interface XSDNamedComponent
extends XSDComponent

A representation of the model object 'Named Component'. It is used to represent aspects common to attribute declarations, attribute group definitions, complex type definitions, element declarations, identity constraint definitions, model groups definitions, notation declarations, and simple type definitions.

The following features are supported:

See Also:
XSDPackage.getXSDNamedComponent()

Field Summary
static java.lang.String copyright
           
 
Fields inherited from interface com.ibm.etools.emf.notify.Notifier
ADD, ADD_MANY, CREATE, MOVE, NO_INDEX, REMOVE, REMOVE_MANY, REMOVING_ADAPTER, SET, TOUCH, UNSET
 
Method Summary
 com.ibm.etools.emf.ecore.EClass eClassXSDNamedComponent()
          Returns the meta class of XSDNamedComponent.
 java.lang.String getAliasName()
          Returns the value of the 'Alias Name' attribute.
 java.lang.String getAliasURI()
          Returns the value of the 'Alias URI' attribute.
 java.lang.String getName()
          Returns the value of the 'Name' attribute.
 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.
 java.lang.String getTargetNamespace()
          Returns the value of the 'Target Namespace' attribute.
 java.lang.String getURI()
          Returns the value of the 'URI' attribute.
 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 xsdNamedComponet)
          Returns whether this named component and the given named component are named the same.
 boolean isSetName()
          Returns whether the value of the 'Name' attribute is set.
 boolean isSetTargetNamespace()
          Returns whether the value of the 'Target Namespace' attribute is set.
 void setName(java.lang.String value)
          Sets the value of the 'Name' attribute.
 void setTargetNamespace(java.lang.String value)
          Sets the value of the 'Target Namespace' attribute.
 void unsetName()
          Unsets the value of the 'Name' attribute.
 void unsetTargetNamespace()
          Unsets the value of the 'Target Namespace' attribute.
 
Methods inherited from interface com.ibm.etools.xsd.XSDComponent
eClassXSDComponent
 
Methods inherited from interface com.ibm.etools.xsd.XSDConcreteComponent
clearDiagnostics, cloneConcreteComponent, contains, eClassXSDConcreteComponent, elementAttributesChanged, elementChanged, elementContentsChanged, ePackageXSD, getComponentsWithApplicationInformation, getComponentsWithUserInformation, getContainer, getDiagnostics, getElement, getOwner, getRootContainer, getRootOwner, getSchema, getURIReferencePath, isSetElement, isSetOwner, isSetRootOwner, isSetSchema, 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, setOwner, setRootOwner, setSchema, unsetElement, unsetOwner, unsetRootOwner, unsetSchema, updateElement, updateElement, validate
 
Methods inherited from interface com.ibm.etools.emf.ref.RefObject
initInstance, refAddValue, refAddValueAt, refAddValueBefore, refCurrentValues, refDelegateOwner, refGetDefaultValues, refIsSet, refModifyValue, refModifyValueAt, refRemoveValue, refRemoveValueAt, refSetDelegateOwner, refSetValue, refUnsetValue, refValue
 
Methods inherited from interface com.ibm.etools.emf.ref.RefBaseObject
metaObject, refAttributes, refContainer, refContainerExtent, refContainerSF, refContainments, refContainments, refContains, refContains, refContainsExtent, refContainsNested, refDelete, refExtent, refID, refImmediatePackage, refIsContainer, refItself, refMetaObject, refMofId, refName, refOutermostPackage, refPackage, refReferences, refRemoveContent, refResource, refSetExtent, refSetID, refSetID, refSetIDContains, refSetMetaObject, refSetUUID, refSetUUID, refSetUUID
 
Methods inherited from interface com.ibm.etools.emf.notify.Notifier
addAdapter, getAdapter, getAdapters, getExistingAdapter, isDelivery, isDeliveryAll, notify, notify, removeAdapter, removeAllAdapters, setDelivery, setDeliveryAll
 
Methods inherited from interface com.ibm.etools.emf.resource.ResourceSetReference
getResourceSet
 

Field Detail

copyright

public static final java.lang.String copyright
Method Detail

eClassXSDNamedComponent

public com.ibm.etools.emf.ecore.EClass eClassXSDNamedComponent()
Returns the meta class of XSDNamedComponent.
Returns:
the meta class.
See Also:
XSDPackage.getXSDNamedComponent(), XSDConcreteComponent.ePackageXSD()

getName

public java.lang.String getName()
Returns the value of the 'Name' attribute.

This represents the value of the attribute declaration name, attribute group definition name, complex type definition name, element declaration name, identity constraint definition name, model group definition name, notation declaration name, or simple type definition name (*) infoset property.

Returns:
the value of the 'Name' attribute.
See Also:
isSetName(), unsetName(), setName(String), XSDPackage.getXSDNamedComponent_Name()

setName

public void setName(java.lang.String value)
Sets the value of the 'Name' attribute.
Parameters:
value - the new value of the 'Name' attribute.
See Also:
isSetName(), unsetName(), getName()

unsetName

public void unsetName()
Unsets the value of the 'Name' attribute.
See Also:
isSetName(), getName(), setName(String)

isSetName

public boolean isSetName()
Returns whether the value of the 'Name' attribute is set.
Returns:
whether the value of the 'Name' attribute is set.
See Also:
unsetName(), getName(), setName(String)

getTargetNamespace

public java.lang.String getTargetNamespace()
Returns the value of the 'Target Namespace' attribute.

This represents the value of the attribute declaration target namespace, attribute group definition target namespace, complex type definition target namespace, element declaration target namespace, identity constraint definition target namespace, model group definition target namespace, notation declaration target namespace, or simple type definition target namespace (*) infoset property. It is computed from the target namespace of the schema and should typically not be set directly; in the case of locally scoped features, the value is also affected by the form.

Returns:
the value of the 'Target Namespace' attribute.
See Also:
isSetTargetNamespace(), unsetTargetNamespace(), setTargetNamespace(String), XSDPackage.getXSDNamedComponent_TargetNamespace()

setTargetNamespace

public void setTargetNamespace(java.lang.String value)
Sets the value of the 'Target Namespace' attribute.
Parameters:
value - the new value of the 'Target Namespace' attribute.
See Also:
isSetTargetNamespace(), unsetTargetNamespace(), getTargetNamespace()

unsetTargetNamespace

public void unsetTargetNamespace()
Unsets the value of the 'Target Namespace' attribute.
See Also:
isSetTargetNamespace(), getTargetNamespace(), setTargetNamespace(String)

isSetTargetNamespace

public boolean isSetTargetNamespace()
Returns whether the value of the 'Target Namespace' attribute is set.
Returns:
whether the value of the 'Target Namespace' attribute is set.
See Also:
unsetTargetNamespace(), getTargetNamespace(), setTargetNamespace(String)

getAliasName

public java.lang.String getAliasName()
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".

Returns:
the value of the 'Alias Name' attribute.
See Also:
XSDPackage.getXSDNamedComponent_AliasName()

getURI

public java.lang.String getURI()
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.

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()
Returns the value of the 'Alias URI' attribute.

This is equivalent to the string

  <target namespace>#<alias name>
where a null target namespace is taken to mean an empty string. There is no support yet for resolving this URI; only globally scoped names can be resolved.

Returns:
the value of the 'Alias URI' attribute.
See Also:
XSDPackage.getXSDNamedComponent_AliasURI()

getQName

public java.lang.String getQName()
Returns the value of the 'QName' attribute.

This concrete attribute is equivalent to

  xsdNamedComponent.getQName(xsdNamedComponent}

Returns:
the value of the 'QName' attribute.
See Also:
getQName(com.ibm.etools.xsd.XSDConcreteComponent), XSDPackage.getXSDNamedComponent_QName()

getQName

public java.lang.String getQName(XSDConcreteComponent relativeToComponent)
Returns this named component's 'QName' in the context of the given component.
Parameters:
relativeToComponent - the context at which to express the QName.
Returns:
the 'QName'.
See Also:
getQName()

hasSameNameAndTargetNamespace

public boolean hasSameNameAndTargetNamespace(XSDNamedComponent xsdNamedComponet)
Returns whether this named component and the given named component are named the same.

This is equivalent to

  xsdNamedComponent.hasNameAndTargetNamespace
    (xsdOtherNamedComponent.getName(), 
     xsdOtherNamedComponent.getTargetNamespace())

Parameters:
xsdNamedComponent - another named component.
Returns:
whether this named component and the given named component are named the same.
See Also:
hasNameAndTargetNamespace(java.lang.String, java.lang.String), getName(), getTargetNamespace()

hasNameAndTargetNamespace

public boolean hasNameAndTargetNamespace(java.lang.String name,
                                         java.lang.String targetNamespace)
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()))

Parameters:
name - the name.
target - namespace the target namespace.
Returns:
whether this named component has the given name and target namespace.
See Also:
hasSameNameAndTargetNamespace(com.ibm.etools.xsd.XSDNamedComponent), getName(), getTargetNamespace()