]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/SimanticsKeys.java
Sync git svn branch with SVN repository r33158.
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / SimanticsKeys.java
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
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.db.layer0.util;\r
13 \r
14 import java.util.Collection;\r
15 \r
16 import org.simantics.databoard.container.DataContainer;\r
17 import org.simantics.db.Resource;\r
18 import org.simantics.db.layer0.internal.SimanticsInternal;\r
19 import org.simantics.db.layer0.util.SimanticsClipboard.Representation;\r
20 import org.simantics.db.layer0.variable.Variable;\r
21 import org.simantics.graph.representation.TransferableGraph1;\r
22 import org.simantics.utils.datastructures.hints.IHintContext.Key;\r
23 import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;\r
24 \r
25 /**\r
26  * For dealing with clipboard-related keys listed in this class, see the \r
27  * utility methods listed as <code>see</code> in this class.\r
28  * \r
29  * @see SimanticsInternal#getClipboard()\r
30  * @see SimanticsClipboard#getContents()\r
31  * @see ClipboardUtils#accept(java.util.Set, Key)\r
32  * @see ClipboardUtils#accept(org.simantics.db.ReadGraph, java.util.Set, Key)\r
33  */\r
34 public interface SimanticsKeys {\r
35 \r
36     /**\r
37      * A key for storing the resource of the current project in an IHintContext.\r
38      * This is used with ISessionContext.\r
39      */\r
40     Key KEY_PROJECT            = new KeyOf(Resource.class, "PROJECT_RESOURCE");\r
41 \r
42     /**\r
43      * A key for storing the cut/copied transferable graph in a\r
44      * {@link SimanticsClipboard} instance as an available\r
45      * {@link Representation} for the clipboard data.\r
46      */\r
47     Key KEY_TRANSFERABLE_GRAPH = new KeyOf(TransferableGraph1.class, "TRANSFERABLE_GRAPH");\r
48 \r
49     /**\r
50      * A key for storing the cut/copied transferable graph source in a\r
51      * {@link SimanticsClipboard} instance as an available\r
52      * {@link Representation} for the clipboard data.\r
53      */\r
54     Key KEY_TRANSFERABLE_GRAPH_SOURCE = new KeyOf(TransferableGraph1.class, "TRANSFERABLE_GRAPH_SOURCE");\r
55 \r
56     /**\r
57      * A key for storing the cut/copied DataContainer in a\r
58      * {@link SimanticsClipboard} instance as an available\r
59      * {@link Representation} for the clipboard data.\r
60      */\r
61     Key KEY_DATA_CONTAINER = new KeyOf(DataContainer.class, "DATA_CONTAINER");\r
62 \r
63     /**\r
64      * A key for storing the original source {@link Resource} of a copy\r
65      * operation in a {@link SimanticsClipboard} instance as an available\r
66      * {@link Representation} for the clipboard data.\r
67      */\r
68     Key KEY_COPY_RESOURCES      = new KeyOf(Collection.class, "COPY_RESOURCE");\r
69 \r
70     /**\r
71      * A key for storing the original source {@link Resource} of a cut operation\r
72      * in a {@link SimanticsClipboard} instance as an available\r
73      * {@link Representation} for the clipboard data.\r
74      */\r
75     Key KEY_CUT_RESOURCES       = new KeyOf(Collection.class, "CUT_RESOURCE");\r
76 \r
77     /**\r
78      * A key for storing the original copied {@link Variable} in a\r
79      * {@link SimanticsClipboard} instance as an available\r
80      * {@link Representation} for the clipboard data.\r
81      */\r
82     Key KEY_VARIABLE           = new KeyOf(Variable.class, "VARIABLE");\r
83 \r
84 }\r