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.ui.workbench;
\r
14 import org.eclipse.ui.IEditorInput;
\r
15 import org.simantics.db.ReadGraph;
\r
16 import org.simantics.db.Resource;
\r
17 import org.simantics.db.exception.DatabaseException;
\r
18 import org.simantics.db.layer0.variable.Variable;
\r
21 * @author Tuukka Lehtonen
\r
23 * @see ResourceEditorInput2
\r
25 public interface IResourceEditorInput2 extends IEditorInput, IResourceEditorInput {
\r
28 * This is a base URI, not a model URI but the name of the method cannot be
\r
29 * changed now. If {@link #getRVI()} returns <code>null</code>, this URI
\r
30 * should be used as such to get a {@link Variable} view of the input.
\r
32 * @return URI of the model the input is related to or <code>null</code> if
\r
33 * no model is available
\r
35 // String getModelURI();
\r
37 Resource getModel(ReadGraph graph);
\r
40 * @return a {@link Variable} Relative Variable Identifier (RVI). May be an
\r
41 * empty string or <code>null</code> if {@link #getModelURI()}
\r
42 * should be interpreted as the absolute {@link Variable} URI of the
\r
48 * Adapt this editor input into a {@link Variable} outside of a database
\r
52 * @throws DatabaseException if variable adaption fails
\r
55 Variable getVariable() throws DatabaseException;
\r
58 * Adapt this editor input into a {@link Variable} within a database
\r
63 * @throws DatabaseException if variable adaption fails
\r
66 Variable getVariable(ReadGraph graph) throws DatabaseException;
\r