## org.eclipse.xsd.provider
Class XSDSimpleTypeDefinitionItemProvider

    java.lang.Object
      org.eclipse.emf.common.notify.impl.AdapterImpl
          org.eclipse.emf.edit.provider.ItemProviderAdapter
              org.eclipse.xsd.provider.XSDItemProviderAdapter
                  org.eclipse.xsd.provider.XSDConcreteComponentItemProvider
                      org.eclipse.xsd.provider.XSDComponentItemProvider
                          org.eclipse.xsd.provider.XSDNamedComponentItemProvider
                              org.eclipse.xsd.provider.XSDRedefinableComponentItemProvider
                                  org.eclipse.xsd.provider.XSDTypeDefinitionItemProvider
                                      org.eclipse.xsd.provider.XSDSimpleTypeDefinitionItemProvider

All Implemented Interfaces:
  Adapter, Adapter.Internal, ResourceLocator, CreateChildCommand.Helper, IChangeNotifier, IDisposable, IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider

    public class XSDSimpleTypeDefinitionItemProvider

extends XSDTypeDefinitionItemProvider

This is the item provider adpater for a `XSDSimpleTypeDefinition` object.

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.xsd.provider.XSDItemProviderAdapter
`XSDItemProviderAdapter.ItemPropertyDescriptorWithDefault`

Nested classes/interfaces inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter
`ItemProviderAdapter.ChildrenStore, ItemProviderAdapter.ModifiableSingletonEList<E>, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommandActionDelegate`

Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
`Adapter.Internal`

Field Summary

Fields inherited from class org.eclipse.xsd.provider.XSDItemProviderAdapter
`itemDelegator, xsdFactory, xsdPackage`

Fields inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter
`adapterFactory, changeNotifier, childrenFeatures, childrenReferences, childrenStoreMap, itemPropertyDescriptors, targets, wrappers, wrappingNeeded`

Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
`target`

Constructor Summary
`XSDSimpleTypeDefinitionItemProvider(AdapterFactory adapterFactory)` This constructs an instance from a factory and a notifier.

Method Summary
`protected boolean` `canAccomodateFacet(XSDSimpleTypeDefinition s, XSDConstrainingFacet f)` This tests whether the specified simple type definition, `s`, can accomodate the given constraining facet, `f`, based on its existing facet children.
`protected void` `collectNewChildDescriptors(java.util.Collection<java.lang.Object> newChildDescriptors, java.lang.Object object)` This adds `CommandParameter`s describing the children that can be created under this object.
`protected void` `createFinalPropertyDescriptor(java.lang.Object object)`
`protected void` `createLexicalFinalPropertyDescriptor(java.lang.Object object)`
`protected java.lang.String` `formFacetTypeName(java.lang.Object facetName)` This forms the name for a facet MOF type, from the string (with `Object` static type) obtained from the collection returned by `XSDSimpleTypeDefinition.getValidFacets()`.

`java.util.Collection<? extends EStructuralFeature>`

`getChildrenFeatures(java.lang.Object object)`
This specifies how to implement `ItemProviderAdapter.getChildren(java.lang.Object)` and is used to deduce an appropriate feature for an `AddCommand`, `RemoveCommand` or `MoveCommand` in `ItemProviderAdapter.createCommand(java.lang.Object, org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class<? extends org.eclipse.emf.common.command.Command>, org.eclipse.emf.edit.command.CommandParameter)`.

`java.lang.Object` `getImage(java.lang.Object object)` This returns XSDSimpleTypeDefinition.gif.
`java.util.List<IItemPropertyDescriptor>` `getPropertyDescriptors(java.lang.Object object)` This returns the property descriptors for the adapted class.
`java.lang.String` `getText(java.lang.Object object)`
`java.lang.String` `getText(java.lang.Object object, boolean showType)`
`void` `notifyChanged(Notification msg)` This handles notification by calling `fireNotifyChanged`.

Methods inherited from class org.eclipse.xsd.provider.XSDNamedComponentItemProvider
`createNamePropertyDescriptor, createTargetNamespacePropertyDescriptor`

Methods inherited from class org.eclipse.xsd.provider.XSDConcreteComponentItemProvider
`createElementPropertyDescriptor, createInitializeCopyCommand`

Methods inherited from class org.eclipse.xsd.provider.XSDItemProviderAdapter

`addModelGroupChildParameters, addSimpleTypeDefinitionChildParameters, createAttributeDeclaration, createAttributeGroupDefinition, createAttributeGroupDefinitionReference, createAttributeUse, createChildParameter, createComplexTypeDefinition, createElementDeclaration, createIdentityConstraintDefinition, createModelGroupDefinition, createNotationDeclaration, createParticle, createSimpleTypeDefinition, getAttributeSiblings, getCreateChildDescription, getCreateChildImage, getCreateChildResult, getCreateChildText, getCreateChildToolTipText, getImageNameQualifier, getNewObjectName, getParent, getParticleOrAttributeUseContent, getTopModelGroup, getTypeText, getTypeTextQualifier, isGlobal, isUniqueAttributeDeclarationName, isUniqueElementDeclarationName`

Methods inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter

`addListener, adjustWrapperIndex, adjustWrapperIndices, adjustWrapperIndices, createAddCommand, createAddCommand, createChildParameter, createChildrenStore, createCommand, createCopyCommand, createCreateChildCommand, createCreateChildCommand, createCreateCopyCommand, createDragAndDropCommand, createItemPropertyDescriptor, createItemPropertyDescriptor, createMoveCommand, createMoveCommand, createRemoveCommand, createRemoveCommand, createReplaceCommand, createReplaceCommand, createSetCommand, createSetCommand, createWrapper, crop, dispose, disposeWrapper, disposeWrappers, factorAddCommand, factorMoveCommand, factorRemoveCommand, fireNotifyChanged, getAdapterFactory, getBackground, getBackground, getBaseURL, getChildFeature, getChildReference, getChildren, getChildrenReferences, getChildrenStore, getColumnImage, getColumnText, getEditableValue, getElements, getFeatureText, getFeatureValue, getFont, getFont, getForeground, getForeground, getImage, getNewChildDescriptors, getPropertyDescriptor, getPropertyValue, getReferenceValue, getResourceLocator, getResourceLocator, getRootAdapterFactory, getSetFeature, getSetFeatures, getString, getString, getString, getString, getString, getString, getString, getString, getTypeText, getTypeText, getUpdateableText, getWrappedValues, hasChildren, hasChildren, isAdapterForType, isEquivalentValue, isPropertySet, isValidValue, isWrappingNeeded, overlayImage, removeListener, resetPropertyValue, setPropertyValue, setTarget, shouldComposeCreationImage, shouldTranslate, unsetTarget, unwrap, unwrapCommandValues, updateChildren, wrap, wrapCommand`

Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
`getTarget`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.emf.edit.provider.IEditingDomainItemProvider
`createCommand, getChildren, getNewChildDescriptors, getParent`

Methods inherited from interface org.eclipse.emf.edit.provider.ITreeItemContentProvider
`getChildren, getParent, hasChildren`

Methods inherited from interface org.eclipse.emf.edit.provider.IItemPropertySource
`getEditableValue, getPropertyDescriptor`

Constructor Detail

### XSDSimpleTypeDefinitionItemProvider

    public XSDSimpleTypeDefinitionItemProvider(AdapterFactory adapterFactory)

  This constructs an instance from a factory and a notifier.

Method Detail

### getPropertyDescriptors

    public java.util.List<IItemPropertyDescriptor> getPropertyDescriptors(java.lang.Object object)

  This returns the property descriptors for the adapted class.

  Specified by:
    `getPropertyDescriptors` in interface `IItemPropertySource`
  Overrides:
    `getPropertyDescriptors` in class `XSDNamedComponentItemProvider`

### createLexicalFinalPropertyDescriptor

    protected void createLexicalFinalPropertyDescriptor(java.lang.Object object)

### createFinalPropertyDescriptor

    protected void createFinalPropertyDescriptor(java.lang.Object object)

### getChildrenFeatures

    public java.util.Collection<? extends EStructuralFeature> getChildrenFeatures(java.lang.Object object)

  This specifies how to implement `ItemProviderAdapter.getChildren(java.lang.Object)` and is used to deduce an appropriate feature for an `AddCommand`, `RemoveCommand` or `MoveCommand` in `ItemProviderAdapter.createCommand(java.lang.Object, org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class<? extends org.eclipse.emf.common.command.Command>, org.eclipse.emf.edit.command.CommandParameter)`.

  Overrides:
    `getChildrenFeatures` in class `ItemProviderAdapter`

### getImage

    public java.lang.Object getImage(java.lang.Object object)

  This returns XSDSimpleTypeDefinition.gif.

  Specified by:
    `getImage` in interface `IItemLabelProvider`
  Overrides:
    `getImage` in class `ItemProviderAdapter`

### getText

    public java.lang.String getText(java.lang.Object object)

  Specified by:
    `getText` in interface `IItemLabelProvider`
  Overrides:
    `getText` in class `ItemProviderAdapter`

### getText

    public java.lang.String getText(java.lang.Object object,
                                    boolean showType)

### notifyChanged

    public void notifyChanged(Notification msg)

  This handles notification by calling `fireNotifyChanged`.

  Specified by:
    `notifyChanged` in interface `Adapter`
  Overrides:
    `notifyChanged` in class `XSDNamedComponentItemProvider`

### collectNewChildDescriptors

    protected void collectNewChildDescriptors(java.util.Collection<java.lang.Object> newChildDescriptors,
                                              java.lang.Object object)

  This adds `CommandParameter`s describing the children that can be created under this object. The allowable simple type definition and facet children depend upon the variety and (if atomic) the primitive type of this simple type definition, as well as upon its existing children. For an option to be displayed, but disabled, `CommandParameter.feature` is `null`.

  Overrides:
    `collectNewChildDescriptors` in class `ItemProviderAdapter`

### formFacetTypeName

    protected java.lang.String formFacetTypeName(java.lang.Object facetName)

  This forms the name for a facet MOF type, from the string (with `Object` static type) obtained from the collection returned by `XSDSimpleTypeDefinition.getValidFacets()`. The object is cast to a `String`, the first character is capitalized, "XSD" is prepended, and "Facet" appended.

### canAccomodateFacet

    protected boolean canAccomodateFacet(XSDSimpleTypeDefinition s,
                                         XSDConstrainingFacet f)

  This tests whether the specified simple type definition, `s`, can accomodate the given constraining facet, `f`, based on its existing facet children.

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