org.eclipse.emf.ecore.xmi
Interface XMLResource.XMLMap

All Known Subinterfaces:
XMLMap
All Known Implementing Classes:
XMLMapImpl, XMLMapImpl
Enclosing interface:
XMLResource

public static interface XMLResource.XMLMap

This interface 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.


Method Summary
 void add(ENamedElement element, XMLResource.XMLInfo info)
          Add an XMLInfo object for an Ecore construct to the map.
 EClassifier getClassifier(String namespaceURI, String name)
          Returns the EClassifier with the given namespace URI and name.
 EStructuralFeature getFeature(EClass eClass, String namespaceURI, String name)
          Returns the feature for the given class with the given namespace URI and name.
 List getFeatures(EClass eClass)
          Returns the list of features for the given class in the order in which they should be saved.
 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.
 void setIDAttributeName(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.
 

Method Detail

add

public void add(ENamedElement element,
                XMLResource.XMLInfo info)
Add an XMLInfo object for an Ecore construct to the map.


getInfo

public XMLResource.XMLInfo getInfo(ENamedElement element)
Returns the XMLInfo object for the given Ecore construct, if there is one.


setNoNamespacePackage

public void setNoNamespacePackage(EPackage pkg)
Sets the package to use when namespaces are not used in an XML file; this affects loading only.


getNoNamespacePackage

public EPackage getNoNamespacePackage()
Gets the package to use when namespaces are not used.


setIDAttributeName

public void setIDAttributeName(String name)
Sets the name of the XML attribute that holds IDs.


getIDAttributeName

public String getIDAttributeName()
Gets the name of the XML attribute that holds IDs.


getClassifier

public EClassifier getClassifier(String namespaceURI,
                                 String name)
Returns the EClassifier with the given namespace URI and name.


getFeature

public EStructuralFeature getFeature(EClass eClass,
                                     String namespaceURI,
                                     String name)
Returns the feature for the given class with the given namespace URI and name.


getFeatures

public List getFeatures(EClass eClass)
Returns the list of features for the given class in the order in which they should be saved.


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