]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.structural2/src/org/simantics/structural2/scl/StructuralComponent.java
Merge "Remove unnecessary getComparableKey from HashMapBinding"
[simantics/platform.git] / bundles / org.simantics.structural2 / src / org / simantics / structural2 / scl / StructuralComponent.java
1 package org.simantics.structural2.scl;
2
3 import java.util.List;
4
5 import org.simantics.databoard.adapter.AdaptException;
6 import org.simantics.databoard.binding.Binding;
7 import org.simantics.db.ReadGraph;
8 import org.simantics.db.Resource;
9 import org.simantics.db.exception.DatabaseException;
10 import org.simantics.utils.datastructures.Pair;
11
12 /**
13  * Represents a Component that is not a Composite.
14  * 
15  * @author Hannu Niemistö
16  */
17 public abstract class StructuralComponent<Connection> extends StructuralConfiguration<Connection> {
18     public abstract Resource      getType(ReadGraph g) throws DatabaseException;
19     //public abstract Set<Resource> getAttributes(ReadGraph g) throws DatabaseException;
20     //public abstract Variant       getValue(ReadGraph g, Resource attribute) throws DatabaseException;
21     public abstract Object        getValue(ReadGraph g, Resource attribute, Binding binding) throws DatabaseException, AdaptException;
22     public abstract boolean       isParametrized(ReadGraph g) throws DatabaseException;
23     public abstract Connection    getConnection(ReadGraph g, Resource connectionPoint) throws DatabaseException;
24     public abstract List<Pair<Resource,Connection>> getConnections(ReadGraph g, Resource connectionPoint) throws DatabaseException;
25 }