org.eclipse.emf.mapping.ecore2xml.util
Class Ecore2XMLExtendedMetaData

java.lang.Object
  extended by org.eclipse.emf.ecore.util.BasicExtendedMetaData
      extended by org.eclipse.emf.mapping.ecore2xml.util.Ecore2XMLExtendedMetaData
All Implemented Interfaces:
ExtendedMetaData

public class Ecore2XMLExtendedMetaData
extends BasicExtendedMetaData

Maps XML elements to Ecore named elements based on registered Ecore2XML mappings.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.util.BasicExtendedMetaData
BasicExtendedMetaData.EClassExtendedMetaDataImpl, BasicExtendedMetaData.EClassifierExtendedMetaData, BasicExtendedMetaData.EDataTypeExtendedMetaDataImpl, BasicExtendedMetaData.EPackageExtendedMetaData, BasicExtendedMetaData.EPackageExtendedMetaDataImpl, BasicExtendedMetaData.EStructuralFeatureExtendedMetaData, BasicExtendedMetaData.EStructuralFeatureExtendedMetaDataImpl
 
Field Summary
protected  Ecore2XMLRegistry ecore2xmlRegistry
           
protected  java.util.Map<java.lang.String,XMLResource.XMLMap> xmlMaps
           
 
Fields inherited from class org.eclipse.emf.ecore.util.BasicExtendedMetaData
annotationMap, annotationURI, demandRegistry, extendedMetaDataHolderCache, registry, UNINITIALIZED_EDATA_TYPE, UNINITIALIZED_ESTRUCTURAL_FEATURE, UNINITIALIZED_INT, UNINITIALIZED_STRING
 
Fields inherited from interface org.eclipse.emf.ecore.util.ExtendedMetaData
ANNOTATION_URI, ATTRIBUTE_FEATURE, ATTRIBUTE_WILDCARD_FEATURE, COLLAPSE_WHITE_SPACE, CONTENT_KINDS, DERIVATION_KINDS, ELEMENT_FEATURE, ELEMENT_ONLY_CONTENT, ELEMENT_WILDCARD_FEATURE, EMPTY_CONTENT, FEATURE_KINDS, GROUP_FEATURE, INSTANCE, LAX_PROCESSING, LIST_DERIVATION, MIXED_CONTENT, PRESERVE_WHITE_SPACE, PROCESSING_KINDS, REPLACE_WHITE_SPACE, RESTRICTION_DERIVATION, SIMPLE_CONTENT, SIMPLE_FEATURE, SKIP_PROCESSING, STRICT_PROCESSING, UNION_DERIVATION, UNSPECIFIED_CONTENT, UNSPECIFIED_DERIVATION, UNSPECIFIED_FEATURE, UNSPECIFIED_PROCESSING, UNSPECIFIED_WHITE_SPACE, WHITE_SPACE_KINDS, XMI_URI, XML_SCHEMA_URI, XML_URI, XMLNS_PREFIX, XMLNS_URI, XSI_PREFIX, XSI_URI
 
Constructor Summary
Ecore2XMLExtendedMetaData()
           
Ecore2XMLExtendedMetaData(Ecore2XMLRegistry ecore2xmlRegistry)
           
Ecore2XMLExtendedMetaData(EPackage.Registry ePackageRegistry, Ecore2XMLRegistry ecore2xmlRegistry)
           
Ecore2XMLExtendedMetaData(java.lang.String annotationURI, EPackage.Registry ePackageRegistry, Ecore2XMLRegistry ecore2xmlRegistry)
           
 
Method Summary
protected  EClassifier getClassifier(java.lang.String namespaceURI, java.lang.String name)
           
 int getFeatureKind(EStructuralFeature eStructuralFeature)
          Returns the kind of XML structure that should be used to represent the given structural feature.
protected  XMLResource.XMLInfo getInfo(ENamedElement element)
           
 java.lang.String getName(EClassifier eClassifier)
          Returns the XML name for a classifier.
 java.lang.String getName(EStructuralFeature eStructuralFeature)
          Returns the XML name for a structural feature.
 java.lang.String getNamespace(EPackage ePackage)
          Returns the namespace to use for model instance serializations of the specified package.
 EPackage getPackage(java.lang.String namespace)
          Retrieves the package with the specified namespace URI from the package registry associated with this instance.
 EClassifier getType(EPackage ePackage, java.lang.String name)
          Returns the classifier with the given XML name within the given package.
protected  boolean isFeatureKindSpecific()
           
 
Methods inherited from class org.eclipse.emf.ecore.util.BasicExtendedMetaData
basicGetAffiliation, basicGetBaseType, basicGetContentKind, basicGetDerivationKind, basicGetEnumerationFacet, basicGetFeatureKind, basicGetFractionDigitsFacet, basicGetGroup, basicGetItemType, basicGetLengthFacet, basicGetMaxExclusiveFacet, basicGetMaxInclusiveFacet, basicGetMaxLengthFacet, basicGetMemberTypes, basicGetMinExclusiveFacet, basicGetMinInclusiveFacet, basicGetMinLengthFacet, basicGetName, basicGetName, basicGetNamespace, basicGetPatternFacet, basicGetProcessingKind, basicGetTotalDigitsFacet, basicGetWhiteSpaceFacet, basicGetWildcards, basicIsQualified, computePrefix, createEClassifierExtendedMetaData, createEPackageExtendedMetaData, createEStructuralFeatureExtendedMetaData, demandedPackages, demandFeature, demandFeature, demandPackage, demandType, getAffiliation, getAffiliation, getAllAttributes, getAllElements, getAnnotation, getAttribute, getAttribute, getAttributes, getAttributeWildcardAffiliation, getBaseType, getContentKind, getDerivationKind, getDocumentRoot, getElement, getElement, getElements, getElementWildcardAffiliation, getEncodedWildcards, getEnumerationFacet, getExtendedMetaData, getExtendedMetaData, getExtendedMetaData, getFractionDigitsFacet, getGroup, getItemType, getLengthFacet, getLocalAttribute, getLocalElement, getMaxExclusiveFacet, getMaxInclusiveFacet, getMaxLengthFacet, getMemberTypes, getMinExclusiveFacet, getMinInclusiveFacet, getMinLengthFacet, getMixedFeature, getNamespace, getNamespace, getPatternFacet, getProcessingKind, getQualifiedName, getQualifiedName, getSimpleFeature, getTotalDigitsFacet, getType, getWhiteSpaceFacet, getWildcards, getXMLNSPrefixMapFeature, getXSISchemaLocationMapFeature, isAnonymous, isDocumentRoot, isFeatureNamespaceMatchingLax, isQualified, matches, matches, putPackage, setAffiliation, setBaseType, setContentKind, setDocumentRoot, setEnumerationFacet, setFeatureKind, setFractionDigitsFacet, setGroup, setItemType, setLengthFacet, setMaxExclusiveFacet, setMaxInclusiveFacet, setMaxLengthFacet, setMemberTypes, setMinExclusiveFacet, setMinInclusiveFacet, setMinLengthFacet, setName, setName, setNamespace, setPatternFacet, setProcessingKind, setQualified, setTotalDigitsFacet, setWhiteSpaceFacet, setWildcards
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ecore2xmlRegistry

protected final Ecore2XMLRegistry ecore2xmlRegistry

xmlMaps

protected final java.util.Map<java.lang.String,XMLResource.XMLMap> xmlMaps
Constructor Detail

Ecore2XMLExtendedMetaData

public Ecore2XMLExtendedMetaData()

Ecore2XMLExtendedMetaData

public Ecore2XMLExtendedMetaData(Ecore2XMLRegistry ecore2xmlRegistry)

Ecore2XMLExtendedMetaData

public Ecore2XMLExtendedMetaData(EPackage.Registry ePackageRegistry,
                                 Ecore2XMLRegistry ecore2xmlRegistry)

Ecore2XMLExtendedMetaData

public Ecore2XMLExtendedMetaData(java.lang.String annotationURI,
                                 EPackage.Registry ePackageRegistry,
                                 Ecore2XMLRegistry ecore2xmlRegistry)
Method Detail

getInfo

protected XMLResource.XMLInfo getInfo(ENamedElement element)

getClassifier

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

getPackage

public EPackage getPackage(java.lang.String namespace)
Description copied from interface: ExtendedMetaData
Retrieves the package with the specified namespace URI from the package registry associated with this instance.

Specified by:
getPackage in interface ExtendedMetaData
Overrides:
getPackage in class BasicExtendedMetaData

getName

public java.lang.String getName(EClassifier eClassifier)
Description copied from interface: ExtendedMetaData
Returns the XML name for a classifier. This is the original name specified for the type in the schema, which may be mapped into a valid and conventional Java class name for the Ecore class.

details key: "name"

Specified by:
getName in interface ExtendedMetaData
Overrides:
getName in class BasicExtendedMetaData

getName

public java.lang.String getName(EStructuralFeature eStructuralFeature)
Description copied from interface: ExtendedMetaData
Returns the XML name for a structural feature. This is the original name specified for the element or attribute in the schema, which may be mapped into a valid and conventional Java field name for the Ecore structural feature. This is also the name which should be used for the element or attribute in instance documents.

details key: "name"

Specified by:
getName in interface ExtendedMetaData
Overrides:
getName in class BasicExtendedMetaData

getNamespace

public java.lang.String getNamespace(EPackage ePackage)
Description copied from interface: ExtendedMetaData
Returns the namespace to use for model instance serializations of the specified package. If namespace qualification is being used, this is the package's namespace URI; if not, it is simply null.

details key: "namespace"

Specified by:
getNamespace in interface ExtendedMetaData
Overrides:
getNamespace in class BasicExtendedMetaData

getType

public EClassifier getType(EPackage ePackage,
                           java.lang.String name)
Description copied from interface: ExtendedMetaData
Returns the classifier with the given XML name within the given package.

Specified by:
getType in interface ExtendedMetaData
Overrides:
getType in class BasicExtendedMetaData

getFeatureKind

public int getFeatureKind(EStructuralFeature eStructuralFeature)
Description copied from interface: ExtendedMetaData
Returns the kind of XML structure that should be used to represent the given structural feature.

details key: "kind"

Specified by:
getFeatureKind in interface ExtendedMetaData
Overrides:
getFeatureKind in class BasicExtendedMetaData
See Also:
ExtendedMetaData.UNSPECIFIED_FEATURE, ExtendedMetaData.SIMPLE_FEATURE, ExtendedMetaData.ATTRIBUTE_FEATURE, ExtendedMetaData.ATTRIBUTE_WILDCARD_FEATURE, ExtendedMetaData.ELEMENT_FEATURE, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE, ExtendedMetaData.GROUP_FEATURE

isFeatureKindSpecific

protected boolean isFeatureKindSpecific()
Overrides:
isFeatureKindSpecific in class BasicExtendedMetaData

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