--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.g2d.diagram.handler;\r
+\r
+import org.simantics.g2d.diagram.IDiagram;\r
+import org.simantics.g2d.element.IElement;\r
+\r
+/**\r
+ * Keeps a map between an element and its back-end object (KEY_OBJECT)\r
+ * \r
+ * @author Toni Kalajainen\r
+ */\r
+public interface DataElementMap extends DiagramHandler {\r
+\r
+ /**\r
+ * Get the element with given data (KEY_OBJECT)\r
+ * \r
+ * @param data the data object to find an element for\r
+ * @return element or null if no element has the data\r
+ * \r
+ * @throws NullPointerException if diagram or data is <code>null</code>\r
+ */\r
+ IElement getElement(IDiagram d, Object data);\r
+\r
+ /**\r
+ * Get data related to an element\r
+ * \r
+ * @param element the element to get a back-end data object for\r
+ * @return data or null\r
+ * \r
+ * @throws NullPointerException if diagram or element is <code>null</code>\r
+ */\r
+ Object getData(IDiagram d, IElement element);\r
+\r
+}\r