public class DefaultDOMHandlerImpl extends java.lang.Object implements DOMHandler, DOMHelper
DOMHandler
and DOMHelper
Modifier and Type | Field and Description |
---|---|
protected ExtendedMetaData |
extendedMetaData |
protected java.util.HashMap<org.w3c.dom.Node,EObject> |
nodeToContainer
store node to container. used only to record some text/cdata nodes
|
protected java.util.HashMap<org.w3c.dom.Node,EStructuralFeature> |
nodeToFeature
store node to containment feature mapping
|
protected java.util.HashMap<org.w3c.dom.Node,java.lang.Object> |
nodeToObject
store node to actual value mapping
|
Constructor and Description |
---|
DefaultDOMHandlerImpl() |
Modifier and Type | Method and Description |
---|---|
EObject |
getContainer(org.w3c.dom.Node node) |
DOMHelper |
getDOMHelper() |
EStructuralFeature |
getEStructuralFeature(org.w3c.dom.Node node) |
java.lang.Object |
getValue(org.w3c.dom.Node node) |
void |
recordValues(org.w3c.dom.Node node,
EObject container,
EStructuralFeature feature,
java.lang.Object value)
Record the DOM node and its corresponding EMF values.
|
protected final java.util.HashMap<org.w3c.dom.Node,java.lang.Object> nodeToObject
protected final java.util.HashMap<org.w3c.dom.Node,EStructuralFeature> nodeToFeature
protected final java.util.HashMap<org.w3c.dom.Node,EObject> nodeToContainer
protected ExtendedMetaData extendedMetaData
public EObject getContainer(org.w3c.dom.Node node)
getContainer
in interface DOMHelper
node
- the DOM nodeEObject
container that holds the DOM node.public java.lang.Object getValue(org.w3c.dom.Node node)
getValue
in interface DOMHelper
node
- the attribute Attr
or element Element
nodeEObject
FeatureMap.Entry
List
or Java type (e.g. String
public EStructuralFeature getEStructuralFeature(org.w3c.dom.Node node)
getEStructuralFeature
in interface DOMHelper
node
- the DOM nodepublic void recordValues(org.w3c.dom.Node node, EObject container, EStructuralFeature feature, java.lang.Object value)
DOMHandler
recordValues
in interface DOMHandler
node
- the DOM nodecontainer
- the EObject
which is the node's containerfeature
- the feature for DOM node valuevalue
- the EMF value which is obtained by querying the value of the specified feature on the container
EObject.eGet(EStructuralFeature)
;
this value is used to create the public DOMHelper getDOMHelper()
getDOMHelper
in interface DOMHandler