Skip to main content
summaryrefslogtreecommitdiffstats
blob: 9782ea143cbf89563afaa7ebbb00bc2dda356cbf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/***************************************************************************************************
 * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
 * accompanying materials are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors: IBM Corporation - initial API and implementation
 **************************************************************************************************/
package org.eclipse.wst.common.internal.emf.resource;


import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.ecore.EObject;
import org.w3c.dom.Node;

public interface EMF2DOMAdapter extends Adapter {


	Class ADAPTER_CLASS = EMF2DOMAdapter.class;

	/**
	 * Return the DOM node that the target of this adapter maps to. If the target MOF object maps to
	 * more than one DOM node, this node is the top-most node.
	 */
	Node getNode();

	void setNode(Node aNode);

	/**
	 * Set to false and notification of changes from both the DOM node and the MOF object will be
	 * ignored.
	 */
	boolean isNotificationEnabled();

	/**
	 * Set to false and notification of changes from both the DOM node and the MOF object will be
	 * ignored.
	 */
	void setNotificationEnabled(boolean isEnabled);

	/**
	 * Updates the DOM tree for this adapter from the current values of the MOF Object. This method
	 * updates ALL the DOM nodes from all the MOF attributes.
	 */
	void updateDOM();

	/**
	 * Updates the MOF Object from the DOM tree. All the children of the DOM tree are updated into
	 * the MOF object.
	 */
	void updateMOF();

	public void updateDOMFeature(Translator map, Node node, EObject mofObject);

	public void updateMOFFeature(Translator map, Node node, EObject mofObject);

	EObject getEObject();

	/**
	 * Return true if MOF object is a proxy.
	 */
	boolean isMOFProxy();

	/**
	 * Remove the DOM adapters from the node AND all its child nodes, recursively.
	 */
	void removeAdapters(Node node);
}

Back to the top