-package org.simantics.g3d.scenegraph;\r
-\r
-import java.util.Collection;\r
-\r
-import org.simantics.g3d.scenegraph.base.INode;\r
-import org.simantics.g3d.scenegraph.base.NodeListener;\r
-import org.simantics.g3d.scenegraph.base.ParentNode;\r
-\r
-public interface NodeMap<T> {\r
-\r
- public Collection<T> getRenderObjects(INode node);\r
- \r
- public void updateRenderObjectsFor(INode node);\r
- \r
- public INode getNode(T t);\r
- \r
- public ParentNode<IG3DNode> getRootNode();\r
- \r
- /**\r
- * Commit changes to the database.\r
- */\r
- public void commit();\r
- \r
- \r
- /**\r
- * Deletes (Disposes) the map. \r
- */\r
- public void delete();\r
- \r
- \r
- /**\r
- * Track changes that are going to be committed into the database.\r
- * \r
- * Disabling change tracking causes commit() to do nothing. \r
- * @param enabled\r
- */\r
- public void setChangeTracking(boolean enabled);\r
- public boolean isChangeTracking();\r
- \r
- \r
- /**\r
- * Add listener for all scene-graph events.\r
- * @param listener\r
- */\r
- public void addListener(NodeListener listener);\r
- \r
- public void removeListener(NodeListener listener);\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * 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:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.g3d.scenegraph;
+
+import java.util.Collection;
+
+import org.simantics.g3d.scenegraph.base.INode;
+import org.simantics.g3d.scenegraph.base.NodeListener;
+import org.simantics.g3d.scenegraph.base.ParentNode;
+import org.simantics.objmap.graph.IMapping;
+
+public interface NodeMap<T,E extends INode> {
+
+ public Collection<T> getRenderObjects(E node);
+
+ public void updateRenderObjectsFor(E node);
+
+ public E getNode(T t);
+
+ public ParentNode<E> getRootNode();
+
+ /**
+ * Commit changes to the database.
+ */
+ public void commit(String message);
+
+
+ /**
+ * Deletes (Disposes) the map.
+ */
+ public void delete();
+
+
+ /**
+ * Track changes that are going to be committed into the database.
+ *
+ * Disabling change tracking causes commit() to do nothing.
+ * @param enabled
+ */
+ public void setChangeTracking(boolean enabled);
+ public boolean isChangeTracking();
+
+
+ /**
+ * Add listener for all scene-graph events.
+ * @param listener
+ */
+ public void addListener(NodeListener listener);
+
+ public void removeListener(NodeListener listener);
+
+ public IMapping<Object, E> getMapping();
+}