org.eclipse.emf.ecore.xmi.impl
Class DefaultDOMHandlerImpl

java.lang.Object
  extended byorg.eclipse.emf.ecore.xmi.impl.DefaultDOMHandlerImpl
All Implemented Interfaces:
DOMHandler, DOMHelper

public class DefaultDOMHandlerImpl
extends Object
implements DOMHandler, DOMHelper

Implementation of the default DOMHandler and DOMHelper

Since:
2.1.0

Field Summary
protected  ExtendedMetaData extendedMetaData
           
protected  HashMap nodeToContainer
          store node to container. used only to record some text/cdata nodes
protected  HashMap nodeToFeature
          store node to containment feature mapping
protected  HashMap nodeToObject
          store node to actual value mapping
 
Constructor Summary
DefaultDOMHandlerImpl()
           
 
Method Summary
 EObject getContainer(Node node)
           
 DOMHelper getDOMHelper()
           
 EStructuralFeature getEStructuralFeature(Node node)
           
 Object getValue(Node node)
           
 void recordValues(Node node, EObject container, EStructuralFeature feature, Object value)
          Record the DOM node and its corresponding EMF values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeToObject

protected final HashMap nodeToObject
store node to actual value mapping


nodeToFeature

protected final HashMap nodeToFeature
store node to containment feature mapping


nodeToContainer

protected final HashMap nodeToContainer
store node to container. used only to record some text/cdata nodes


extendedMetaData

protected ExtendedMetaData extendedMetaData
Constructor Detail

DefaultDOMHandlerImpl

public DefaultDOMHandlerImpl()
Method Detail

getContainer

public EObject getContainer(Node node)
Specified by:
getContainer in interface DOMHelper
Parameters:
node - the DOM node
Returns:
the EObject container that holds the DOM node.

getValue

public Object getValue(Node node)
Specified by:
getValue in interface DOMHelper
Parameters:
node - the attribute Attr or element Element node
Returns:
the corresponding EMF value, one of: EObject FeatureMap.Entry List or Java type (e.g. String

getEStructuralFeature

public EStructuralFeature getEStructuralFeature(Node node)
Specified by:
getEStructuralFeature in interface DOMHelper
Parameters:
node - the DOM node
Returns:
the feature for the DOM node value.

recordValues

public void recordValues(Node node,
                         EObject container,
                         EStructuralFeature feature,
                         Object value)
Description copied from interface: DOMHandler
Record the DOM node and its corresponding EMF values.

Specified by:
recordValues in interface DOMHandler
Parameters:
node - the DOM node
container - the EObject which is the node's container
feature - the feature for DOM node value

getDOMHelper

public DOMHelper getDOMHelper()
Specified by:
getDOMHelper in interface DOMHandler

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