public class XMLMapImpl extends java.lang.Object implements XMLResource.XMLMap
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
XMLMapImpl()
Constructor for XMLMap.
|
Modifier and Type | Method and Description |
---|---|
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) |
protected static final java.lang.String XSD2ECORE
protected java.util.Map<ENamedElement,XMLResource.XMLInfo> ecoreToXMLInfo
protected EPackage noNamespacePkg
protected java.lang.String idAttributeName
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,EClassifier>> urisToNamesToClassifiers
protected java.util.Map<EClass,EList<EStructuralFeature>> eClassToFeatures
protected java.util.Set<EPackage> processedEPackages
protected EPackage.Registry packageRegistry
public void add(ENamedElement element, XMLResource.XMLInfo info)
add
in interface XMLResource.XMLMap
public XMLResource.XMLInfo getInfo(ENamedElement element)
getInfo
in interface XMLResource.XMLMap
public void setNoNamespacePackage(EPackage pkg)
XMLResource.XMLMap
setNoNamespacePackage
in interface XMLResource.XMLMap
public EPackage getNoNamespacePackage()
XMLResource.XMLMap
getNoNamespacePackage
in interface XMLResource.XMLMap
public void setIDAttributeName(java.lang.String name)
XMLResource.XMLMap
setIDAttributeName
in interface XMLResource.XMLMap
public java.lang.String getIDAttributeName()
XMLResource.XMLMap
getIDAttributeName
in interface XMLResource.XMLMap
public void setPackageRegistry(EPackage.Registry packageRegistry)
public EPackage.Registry getPackageRegistry()
public EClassifier getClassifier(java.lang.String namespaceURI, java.lang.String name)
XMLResource.XMLMap
getClassifier
in interface XMLResource.XMLMap
public EStructuralFeature getFeature(EClass eClass, java.lang.String namespaceURI, java.lang.String name)
XMLResource.XMLMap
getFeature
in interface XMLResource.XMLMap
public java.util.List<EStructuralFeature> getFeatures(EClass eClass)
XMLResource.XMLMap
getFeatures
in interface XMLResource.XMLMap