]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/IStructuralObject.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.objmap2 / src / org / simantics / objmap / structural / IStructuralObject.java
diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/IStructuralObject.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/IStructuralObject.java
new file mode 100644 (file)
index 0000000..44340bf
--- /dev/null
@@ -0,0 +1,49 @@
+/*******************************************************************************\r
+ * Copyright (c) 2012, 2013 Association for Decentralized Information Management in\r
+ * 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.objmap.structural;\r
+\r
+import java.util.List;\r
+\r
+import org.simantics.db.Resource;\r
+\r
+/**\r
+ * Interface for structurally mapped Java objects.\r
+ * \r
+ * @author Marko Luukkainen <marko.luukkainen@vtt.fi>\r
+ *\r
+ */\r
+public interface IStructuralObject {\r
+       \r
+       /**\r
+        * Context of an object. \r
+        * @return\r
+        */\r
+       public List<IStructuralObject> getContext();\r
+\r
+       /**\r
+        * Sets object's context. Used by ObjMap, don't touch. \r
+        * @param object\r
+        */\r
+       public void setContext(List<IStructuralObject> object);\r
+       \r
+       /**\r
+        * Return type resource for Structural instances. For other objects returns null.\r
+        * @return\r
+        */\r
+       public Resource getType();\r
+       \r
+       /**\r
+        * Sets object's type. Used by ObjMap, don't touch.\r
+        * @param object\r
+        */\r
+       public void setType(Resource type);\r
+}\r