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.util;
14 import java.util.Collection;
16 import org.simantics.databoard.container.DataContainer;
17 import org.simantics.db.Resource;
18 import org.simantics.db.layer0.internal.SimanticsInternal;
19 import org.simantics.db.layer0.util.SimanticsClipboard.Representation;
20 import org.simantics.db.layer0.variable.Variable;
21 import org.simantics.graph.representation.TransferableGraph1;
22 import org.simantics.utils.datastructures.hints.IHintContext.Key;
23 import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;
26 * For dealing with clipboard-related keys listed in this class, see the
27 * utility methods listed as <code>see</code> in this class.
29 * @see SimanticsInternal#getClipboard()
30 * @see SimanticsClipboard#getContents()
31 * @see ClipboardUtils#accept(java.util.Set, Key)
32 * @see ClipboardUtils#accept(org.simantics.db.ReadGraph, java.util.Set, Key)
34 public interface SimanticsKeys {
37 * A key for storing the resource of the current project in an IHintContext.
38 * This is used with ISessionContext.
40 Key KEY_PROJECT = new KeyOf(Resource.class, "PROJECT_RESOURCE");
43 * A key for storing the cut/copied transferable graph in a
44 * {@link SimanticsClipboard} instance as an available
45 * {@link Representation} for the clipboard data.
47 Key KEY_TRANSFERABLE_GRAPH = new KeyOf(TransferableGraph1.class, "TRANSFERABLE_GRAPH");
50 * A key for storing the cut/copied transferable graph source in a
51 * {@link SimanticsClipboard} instance as an available
52 * {@link Representation} for the clipboard data.
54 Key KEY_TRANSFERABLE_GRAPH_SOURCE = new KeyOf(TransferableGraph1.class, "TRANSFERABLE_GRAPH_SOURCE");
57 * A key for storing the cut/copied DataContainer in a
58 * {@link SimanticsClipboard} instance as an available
59 * {@link Representation} for the clipboard data.
61 Key KEY_DATA_CONTAINER = new KeyOf(DataContainer.class, "DATA_CONTAINER");
64 * A key for storing the original source {@link Resource} of a copy
65 * operation in a {@link SimanticsClipboard} instance as an available
66 * {@link Representation} for the clipboard data.
68 Key KEY_COPY_RESOURCES = new KeyOf(Collection.class, "COPY_RESOURCE");
71 * A key for storing the original source {@link Resource} of a cut operation
72 * in a {@link SimanticsClipboard} instance as an available
73 * {@link Representation} for the clipboard data.
75 Key KEY_CUT_RESOURCES = new KeyOf(Collection.class, "CUT_RESOURCE");
78 * A key for storing the original copied {@link Variable} in a
79 * {@link SimanticsClipboard} instance as an available
80 * {@link Representation} for the clipboard data.
82 Key KEY_VARIABLE = new KeyOf(Variable.class, "VARIABLE");