X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FVariableProperties.java;h=da06034c4cb47b93cb609631fbc7bc21ed883d00;hb=85c1daf4b3d4a48613e0c61c359cb8aac2157f01;hp=5d5edc51d1dd7661045ac473819eee44fbc1361a;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/VariableProperties.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/VariableProperties.java index 5d5edc51d..da06034c4 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/VariableProperties.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/VariableProperties.java @@ -1,48 +1,48 @@ -package org.simantics.db.layer0.variable; - -import java.util.Collection; - -import org.simantics.databoard.binding.Binding; -import org.simantics.db.ReadGraph; -import org.simantics.db.WriteGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.layer0.exception.NonWritableVariableException; - -public interface VariableProperties { - - /* - * Gets a named property of this variable. A property corresponds to a '#' in URI notation - */ - Variable getProperty(ReadGraph graph, Key key) throws DatabaseException; - Variable getPossibleProperty(ReadGraph graph, Key key) throws DatabaseException; - - Collection getProperties(ReadGraph graph, Key key) throws DatabaseException; - - /* - * Convenience method for getting the value of a named property. - */ - T getPropertyValue(ReadGraph graph, Key key) throws DatabaseException; - T getPossiblePropertyValue(ReadGraph graph, Key key) throws DatabaseException; - /* - * Convenience method for getting the value of a named property. - */ - T getPropertyValue(ReadGraph graph, Key key, Binding binding) throws DatabaseException; - T getPossiblePropertyValue(ReadGraph graph, Key key, Binding binding) throws DatabaseException; - - /** - * Writes a value to the given property using the given binding. - * - * @throws NonWritableVariableException if the variable is not writable - * @throws DatabaseException in any other error conditions - */ - void setPropertyValue(WriteGraph graph, Key key, Object value, Binding binding) throws DatabaseException; - /** - * Writes a value to the given property using the default binding based on - * the value class. - * - * @throws NonWritableVariableException if the variable is not writable - * @throws DatabaseException in any other error conditions - */ - void setPropertyValue(WriteGraph graph, Key key, Object value) throws DatabaseException; - -} +package org.simantics.db.layer0.variable; + +import java.util.Collection; + +import org.simantics.databoard.binding.Binding; +import org.simantics.db.ReadGraph; +import org.simantics.db.WriteGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.exception.NonWritableVariableException; + +public interface VariableProperties { + + /* + * Gets a named property of this variable. A property corresponds to a '#' in URI notation + */ + Variable getProperty(ReadGraph graph, Key key) throws DatabaseException; + Variable getPossibleProperty(ReadGraph graph, Key key) throws DatabaseException; + + Collection getProperties(ReadGraph graph, Key key) throws DatabaseException; + + /* + * Convenience method for getting the value of a named property. + */ + T getPropertyValue(ReadGraph graph, Key key) throws DatabaseException; + T getPossiblePropertyValue(ReadGraph graph, Key key) throws DatabaseException; + /* + * Convenience method for getting the value of a named property. + */ + T getPropertyValue(ReadGraph graph, Key key, Binding binding) throws DatabaseException; + T getPossiblePropertyValue(ReadGraph graph, Key key, Binding binding) throws DatabaseException; + + /** + * Writes a value to the given property using the given binding. + * + * @throws NonWritableVariableException if the variable is not writable + * @throws DatabaseException in any other error conditions + */ + void setPropertyValue(WriteGraph graph, Key key, Object value, Binding binding) throws DatabaseException; + /** + * Writes a value to the given property using the default binding based on + * the value class. + * + * @throws NonWritableVariableException if the variable is not writable + * @throws DatabaseException in any other error conditions + */ + void setPropertyValue(WriteGraph graph, Key key, Object value) throws DatabaseException; + +}