## org.eclipse.emf.ecore.xmi.impl
Class XMLMapImpl

    java.lang.Object
      org.eclipse.emf.ecore.xmi.impl.XMLMapImpl

All Implemented Interfaces:
  XMLResource.XMLMap

Direct Known Subclasses:
  XMLMapImpl.DelegateXMLMapImpl

    public class XMLMapImpl

extends java.lang.Object
implements XMLResource.XMLMap

This class represents a mapping from Ecore constructs to the XML representation of those constructs. It is used by the XML serializer and deserializer to load and save XML files.

Field Summary
`protected java.util.Map<EClass,EList<EStructuralFeature>>` `eClassToFeatures`
`protected java.util.Map<ENamedElement,XMLResource.XMLInfo>` `ecoreToXMLInfo`
`protected java.lang.String` `idAttributeName`
`protected EPackage` `noNamespacePkg`
`protected EPackage.Registry` `packageRegistry`
`protected java.util.Set<EPackage>` `processedEPackages`
`protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,EClassifier>>` `urisToNamesToClassifiers`
`protected static java.lang.String` `XSD2ECORE`

Constructor Summary
`XMLMapImpl()` Constructor for XMLMap.

Method Summary
`void` `add(ENamedElement element, XMLResource.XMLInfo info)` Add an XMLInfo object for an Ecore construct to the map.
`EClassifier` `getClassifier(java.lang.String namespaceURI, java.lang.String name)` Returns the EClassifier with the given namespace URI and name.
`EStructuralFeature` `getFeature(EClass eClass, java.lang.String namespaceURI, java.lang.String name)` Returns the feature for the given class with the given namespace URI and name.
`java.util.List<EStructuralFeature>` `getFeatures(EClass eClass)` Returns the list of features for the given class in the order in which they should be saved.
`java.lang.String` `getIDAttributeName()` Gets the name of the XML attribute that holds IDs.
`XMLResource.XMLInfo` `getInfo(ENamedElement element)` Returns the XMLInfo object for the given Ecore construct, if there is one.
`EPackage` `getNoNamespacePackage()` Gets the package to use when namespaces are not used.
`EPackage.Registry` `getPackageRegistry()`
`void` `setIDAttributeName(java.lang.String name)` Sets the name of the XML attribute that holds IDs.
`void` `setNoNamespacePackage(EPackage pkg)` Sets the package to use when namespaces are not used in an XML file; this affects loading only.
`void` `setPackageRegistry(EPackage.Registry packageRegistry)`

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

Field Detail

### XSD2ECORE

    protected static final java.lang.String XSD2ECORE

See Also:
  Constant Field Values

### ecoreToXMLInfo

    protected java.util.Map<ENamedElement,XMLResource.XMLInfo> ecoreToXMLInfo

### noNamespacePkg

    protected EPackage noNamespacePkg

### idAttributeName

    protected java.lang.String idAttributeName

### urisToNamesToClassifiers

    protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,EClassifier>> urisToNamesToClassifiers

### eClassToFeatures

    protected java.util.Map<EClass,EList<EStructuralFeature>> eClassToFeatures

### processedEPackages

    protected java.util.Set<EPackage> processedEPackages

### packageRegistry

    protected EPackage.Registry packageRegistry

Constructor Detail

### XMLMapImpl

    public XMLMapImpl()

  Constructor for XMLMap.

Method Detail

### add

    public void add(ENamedElement element,
                    XMLResource.XMLInfo info)

  Add an XMLInfo object for an Ecore construct to the map.

  Specified by:
    `add` in interface `XMLResource.XMLMap`

### getInfo

    public XMLResource.XMLInfo getInfo(ENamedElement element)

  Returns the XMLInfo object for the given Ecore construct, if there is one.

  Specified by:
    `getInfo` in interface `XMLResource.XMLMap`

### setNoNamespacePackage

    public void setNoNamespacePackage(EPackage pkg)

  Description copied from interface: `XMLResource.XMLMap`
  Sets the package to use when namespaces are not used in an XML file; this affects loading only.

  Specified by:
    `setNoNamespacePackage` in interface `XMLResource.XMLMap`

### getNoNamespacePackage

    public EPackage getNoNamespacePackage()

  Description copied from interface: `XMLResource.XMLMap`
  Gets the package to use when namespaces are not used.

  Specified by:
    `getNoNamespacePackage` in interface `XMLResource.XMLMap`

### setIDAttributeName

    public void setIDAttributeName(java.lang.String name)

  Description copied from interface: `XMLResource.XMLMap`
  Sets the name of the XML attribute that holds IDs.

  Specified by:
    `setIDAttributeName` in interface `XMLResource.XMLMap`

### getIDAttributeName

    public java.lang.String getIDAttributeName()

  Description copied from interface: `XMLResource.XMLMap`
  Gets the name of the XML attribute that holds IDs.

  Specified by:
    `getIDAttributeName` in interface `XMLResource.XMLMap`

### setPackageRegistry

    public void setPackageRegistry(EPackage.Registry packageRegistry)

### getPackageRegistry

    public EPackage.Registry getPackageRegistry()

### getClassifier

    public EClassifier getClassifier(java.lang.String namespaceURI,
                                     java.lang.String name)

  Description copied from interface: `XMLResource.XMLMap`
  Returns the EClassifier with the given namespace URI and name.

  Specified by:
    `getClassifier` in interface `XMLResource.XMLMap`

### getFeature

    public EStructuralFeature getFeature(EClass eClass,
                                         java.lang.String namespaceURI,
                                         java.lang.String name)

  Description copied from interface: `XMLResource.XMLMap`
  Returns the feature for the given class with the given namespace URI and name.

  Specified by:
    `getFeature` in interface `XMLResource.XMLMap`

### getFeatures

    public java.util.List<EStructuralFeature> getFeatures(EClass eClass)

  Description copied from interface: `XMLResource.XMLMap`
  Returns the list of features for the given class in the order in which they should be saved.

  Specified by:
    `getFeatures` in interface `XMLResource.XMLMap`

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