X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fadapter%2FValuations.java;h=a127daf1e37cb84fd48f47e24979ac070ec0ff58;hb=refs%2Fchanges%2F38%2F238%2F2;hp=5f59ff1728e312eb986fa35c893c4436a462ef59;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/Valuations.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/Valuations.java index 5f59ff172..a127daf1e 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/Valuations.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/Valuations.java @@ -1,69 +1,69 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.db.layer0.adapter; - -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.exception.DatabaseException; - - -/* - * A value address in Simantics e.g. - * - * http://www.mycompany.com/My_Project/My_Model/My_Experiment/Composite1/Component1/Property1 - * - * can be divided into 3 distinct parts. - * - * The model part : http://www.mycompany.com/My_Project/My_Model/ - * The experiment part : My_Experiment/ - * The variable part : Composite1/Component1/Property1 - * - * A resource which is part of the flattened structure of a model - * - * - Can specify uniquely its model part but does not always - * - Does not specify the experiment part - * - Can uniquely specify some part of the variable part - * - * A variable identity is specified by the model part and the structure part - * - * -http://www.mycompany.com/My_Project/My_Model/Composite1/Component1/Property1 - * - * Use cases: - * - * -Browse valid variable identities for selected components (e.g. for selected element in diagram) - * -Retrieve values for stored variable suffices (e.g. in monitors or expressions) - * - * - * - */ - -public interface Valuations { - - /* - * Produces a resource in the value space specified by the given identity prefix and the given experiment. - * - * @param variableIdentityPrefix a prefix which is sufficient to uniquely identify the VariableSpace - * @param experiment a valid experiment in the model specified by the variable identity - * @return a resource in a value space - */ - Resource getValue(ReadGraph graph, String variableIdentityPrefix, String valuation) throws DatabaseException; - - /* - * Produces a resource in the value space specified by the given identity prefix and and suffix and the given experiment. - * - * @param variableIdentityPrefix a prefix which is sufficient to uniquely identify the VariableSpace - * @param experiment a valid experiment in the model specified by the variable identity - * @return a resource in a value space - */ - Resource getValue(ReadGraph graph, String variableIdentityPrefix, String valuation, String suffix) throws DatabaseException; - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.db.layer0.adapter; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; + + +/* + * A value address in Simantics e.g. + * + * http://www.mycompany.com/My_Project/My_Model/My_Experiment/Composite1/Component1/Property1 + * + * can be divided into 3 distinct parts. + * + * The model part : http://www.mycompany.com/My_Project/My_Model/ + * The experiment part : My_Experiment/ + * The variable part : Composite1/Component1/Property1 + * + * A resource which is part of the flattened structure of a model + * + * - Can specify uniquely its model part but does not always + * - Does not specify the experiment part + * - Can uniquely specify some part of the variable part + * + * A variable identity is specified by the model part and the structure part + * + * -http://www.mycompany.com/My_Project/My_Model/Composite1/Component1/Property1 + * + * Use cases: + * + * -Browse valid variable identities for selected components (e.g. for selected element in diagram) + * -Retrieve values for stored variable suffices (e.g. in monitors or expressions) + * + * + * + */ + +public interface Valuations { + + /* + * Produces a resource in the value space specified by the given identity prefix and the given experiment. + * + * @param variableIdentityPrefix a prefix which is sufficient to uniquely identify the VariableSpace + * @param experiment a valid experiment in the model specified by the variable identity + * @return a resource in a value space + */ + Resource getValue(ReadGraph graph, String variableIdentityPrefix, String valuation) throws DatabaseException; + + /* + * Produces a resource in the value space specified by the given identity prefix and and suffix and the given experiment. + * + * @param variableIdentityPrefix a prefix which is sufficient to uniquely identify the VariableSpace + * @param experiment a valid experiment in the model specified by the variable identity + * @return a resource in a value space + */ + Resource getValue(ReadGraph graph, String variableIdentityPrefix, String valuation, String suffix) throws DatabaseException; + +}