]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.structural2/src/org/simantics/structural2/scl/StructuralComponent.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.structural2 / src / org / simantics / structural2 / scl / StructuralComponent.java
diff --git a/bundles/org.simantics.structural2/src/org/simantics/structural2/scl/StructuralComponent.java b/bundles/org.simantics.structural2/src/org/simantics/structural2/scl/StructuralComponent.java
new file mode 100644 (file)
index 0000000..26cec5d
--- /dev/null
@@ -0,0 +1,25 @@
+package org.simantics.structural2.scl;\r
+\r
+import java.util.List;\r
+\r
+import org.simantics.databoard.adapter.AdaptException;\r
+import org.simantics.databoard.binding.Binding;\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.utils.datastructures.Pair;\r
+\r
+/**\r
+ * Represents a Component that is not a Composite.\r
+ * \r
+ * @author Hannu Niemistö\r
+ */\r
+public abstract class StructuralComponent<Connection> extends StructuralConfiguration<Connection> {\r
+    public abstract Resource      getType(ReadGraph g) throws DatabaseException;\r
+    //public abstract Set<Resource> getAttributes(ReadGraph g) throws DatabaseException;\r
+    //public abstract Variant       getValue(ReadGraph g, Resource attribute) throws DatabaseException;\r
+    public abstract Object        getValue(ReadGraph g, Resource attribute, Binding binding) throws DatabaseException, AdaptException;\r
+    public abstract boolean       isParametrized(ReadGraph g) throws DatabaseException;\r
+    public abstract Connection    getConnection(ReadGraph g, Resource connectionPoint) throws DatabaseException;\r
+    public abstract List<Pair<Resource,Connection>> getConnections(ReadGraph g, Resource connectionPoint) throws DatabaseException;\r
+}\r