]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/rules/IMapping.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / rules / IMapping.java
diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/rules/IMapping.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/rules/IMapping.java
new file mode 100644 (file)
index 0000000..7ef45ae
--- /dev/null
@@ -0,0 +1,43 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2014 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
+ *     Semantum Oy - #5290\r
+ *******************************************************************************/\r
+package org.simantics.modeling.rules;\r
+\r
+import java.util.Collection;\r
+\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.structural2.modelingRules.IConnectionPoint;\r
+\r
+/**\r
+ * Abstraction of diagram to configuration mapping. \r
+ * @author Hannu Niemistö\r
+ */\r
+public interface IMapping {\r
+       IConnectionPoint mapConnectionPoint(ReadGraph g, IConnectionPoint cp) throws DatabaseException; \r
+       /**\r
+        * @param g database access handle\r
+        * @param cp diagram connection point to map to configuration\r
+        * @param result the collection to add the discovered connection points to\r
+        * @return the amount of connection points added to the result\r
+        * @throws DatabaseException\r
+        * @since 1.16, 1.13.3\r
+        */\r
+       int mapToConnectionPoints(ReadGraph g, IConnectionPoint cp, Collection<IConnectionPoint> result) throws DatabaseException;      \r
+       Resource mapComponentType(ReadGraph g, Resource componentType) throws DatabaseException;        \r
+       Resource mapConnection(ReadGraph g, Resource connection) throws DatabaseException;\r
+       Resource invMapConnection(WriteGraph g, Resource connection) throws DatabaseException;\r
+       Resource mapConnectionRelation(ReadGraph g, Resource relation) throws DatabaseException;\r
+       Resource mapComponent(ReadGraph g, Resource component) throws DatabaseException;        \r
+}\r