1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.db.layer0.adapter;
\r
14 import org.simantics.db.ReadGraph;
\r
15 import org.simantics.db.Resource;
\r
16 import org.simantics.db.exception.DatabaseException;
\r
20 * A value address in Simantics e.g.
\r
22 * http://www.mycompany.com/My_Project/My_Model/My_Experiment/Composite1/Component1/Property1
\r
24 * can be divided into 3 distinct parts.
\r
26 * The model part : http://www.mycompany.com/My_Project/My_Model/
\r
27 * The experiment part : My_Experiment/
\r
28 * The variable part : Composite1/Component1/Property1
\r
30 * A resource which is part of the flattened structure of a model
\r
32 * - Can specify uniquely its model part but does not always
\r
33 * - Does not specify the experiment part
\r
34 * - Can uniquely specify some part of the variable part
\r
36 * A variable identity is specified by the model part and the structure part
\r
38 * -http://www.mycompany.com/My_Project/My_Model/Composite1/Component1/Property1
\r
42 * -Browse valid variable identities for selected components (e.g. for selected element in diagram)
\r
43 * -Retrieve values for stored variable suffices (e.g. in monitors or expressions)
\r
49 public interface Valuations {
\r
52 * Produces a resource in the value space specified by the given identity prefix and the given experiment.
\r
54 * @param variableIdentityPrefix a prefix which is sufficient to uniquely identify the VariableSpace
\r
55 * @param experiment a valid experiment in the model specified by the variable identity
\r
56 * @return a resource in a value space
\r
58 Resource getValue(ReadGraph graph, String variableIdentityPrefix, String valuation) throws DatabaseException;
\r
61 * Produces a resource in the value space specified by the given identity prefix and and suffix and the given experiment.
\r
63 * @param variableIdentityPrefix a prefix which is sufficient to uniquely identify the VariableSpace
\r
64 * @param experiment a valid experiment in the model specified by the variable identity
\r
65 * @return a resource in a value space
\r
67 Resource getValue(ReadGraph graph, String variableIdentityPrefix, String valuation, String suffix) throws DatabaseException;
\r