X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fquery%2FIGraph.java;h=24859ce011de015b022acf0787be3ed4b684f7de;hb=fa806341cc06b72051d5e8d709674eb9d5c2bf00;hp=e9022705ea7139eb3c73bb5e4e1192785f242f1a;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/query/IGraph.java b/bundles/org.simantics.graph/src/org/simantics/graph/query/IGraph.java index e9022705e..24859ce01 100644 --- a/bundles/org.simantics.graph/src/org/simantics/graph/query/IGraph.java +++ b/bundles/org.simantics.graph/src/org/simantics/graph/query/IGraph.java @@ -1,70 +1,70 @@ -package org.simantics.graph.query; - -import java.io.IOException; -import java.util.Collection; - -import org.simantics.databoard.binding.Binding; -import org.simantics.databoard.binding.error.BindingException; -import org.simantics.databoard.binding.mutable.Variant; -import org.simantics.databoard.serialization.RuntimeSerializerConstructionException; -import org.simantics.databoard.serialization.SerializationException; -import org.simantics.databoard.type.Datatype; - -/** - * Graph browsing interface for transferable graphs. - * @author Hannu Niemist� - */ -public interface IGraph { - - /** - * Get value of the resource as variant. Returns null, if there is no value. - */ - Variant getValue(Res resource); - - /** - * Sets value of the resource. - */ - void setValue(Res resource, Object value, Binding binding); - - /** - * Gets the value of the resource using the given binding. - */ - Object getValue(Res resource, Binding binding) throws RuntimeSerializerConstructionException, SerializationException, IOException, BindingException, NoValueException; - - /** - * Gets the data type of the resource or null if it doesn't have a data type. - */ - Datatype getDatatype(Res resource); - - /** - * Gets raw objects without assertions - */ - Collection rawGetObjects(Res subject, Res predicate); - - /** - * Gets single raw object or throws NoUniqueObjectException if that is not possible - */ - Res singleRawObject(Res subject, Res predicate) throws NoUniqueObjectException; - - /** - * Gets raw and asserted objects. - */ - Collection getObjects(Res subject, Res predicate); - - /** - * Gets all types of the given resource - */ - Collection getTypes(Res resource); - - /** - * Gets all instances of the given type - */ - Collection getInstances(Res type); - - Datatype getAssertedDatatype(Res type); - - Collection getChildren(Res res); - - Paths getPaths(); - -} +package org.simantics.graph.query; + +import java.io.IOException; +import java.util.Collection; + +import org.simantics.databoard.binding.Binding; +import org.simantics.databoard.binding.error.BindingException; +import org.simantics.databoard.binding.mutable.Variant; +import org.simantics.databoard.serialization.RuntimeSerializerConstructionException; +import org.simantics.databoard.serialization.SerializationException; +import org.simantics.databoard.type.Datatype; + +/** + * Graph browsing interface for transferable graphs. + * @author Hannu Niemist� + */ +public interface IGraph { + + /** + * Get value of the resource as variant. Returns null, if there is no value. + */ + Variant getValue(Res resource); + + /** + * Sets value of the resource. + */ + void setValue(Res resource, Object value, Binding binding); + + /** + * Gets the value of the resource using the given binding. + */ + Object getValue(Res resource, Binding binding) throws RuntimeSerializerConstructionException, SerializationException, IOException, BindingException, NoValueException; + + /** + * Gets the data type of the resource or null if it doesn't have a data type. + */ + Datatype getDatatype(Res resource); + + /** + * Gets raw objects without assertions + */ + Collection rawGetObjects(Res subject, Res predicate); + + /** + * Gets single raw object or throws NoUniqueObjectException if that is not possible + */ + Res singleRawObject(Res subject, Res predicate) throws NoUniqueObjectException; + + /** + * Gets raw and asserted objects. + */ + Collection getObjects(Res subject, Res predicate); + + /** + * Gets all types of the given resource + */ + Collection getTypes(Res resource); + + /** + * Gets all instances of the given type + */ + Collection getInstances(Res type); + + Datatype getAssertedDatatype(Res type); + + Collection getChildren(Res res); + + Paths getPaths(); + +}