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