]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraph2.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.graph / src / org / simantics / graph / representation / TransferableGraph2.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.graph.representation;\r
13 \r
14 import java.util.TreeMap;\r
15 \r
16 import org.simantics.databoard.Bindings;\r
17 import org.simantics.databoard.binding.Binding;\r
18 import org.simantics.databoard.binding.mutable.Variant;\r
19 import org.simantics.databoard.serialization.Serializer;\r
20 \r
21 \r
22 /**\r
23  * Transferable graph datatype. \r
24  * See <a href="https://www.simantics.org/wiki/index.php/Graph_exchange_format">specification</a>. \r
25  * @author Hannu Niemist�\r
26  */\r
27 public class TransferableGraph2 extends TransferableGraph1 {\r
28         \r
29         public static Binding BINDING;\r
30         public static Serializer SERIALIZER;\r
31 \r
32         public TransferableGraph2(int resourceCount, Identity[] identities,\r
33                         int[] statements, Value[] values, TreeMap<String, Variant> extensions) {\r
34                 super(resourceCount, identities, statements, values, extensions);       \r
35         }\r
36 \r
37         public TransferableGraph2(int resourceCount, Identity[] identities,\r
38                         int[] statements, Value[] values) {\r
39                 super(resourceCount, identities, statements, values);   \r
40         }       \r
41         \r
42         public static Binding getBinding() {\r
43                 return BINDING;\r
44         }\r
45         \r
46         static {\r
47                 BINDING = Bindings.getBindingUnchecked( TransferableGraph2.class );\r
48                 SERIALIZER = TransferableGraph1Serializer.INSTANCE;\r
49                 Bindings.serializerRepository.put(BINDING, SERIALIZER);\r
50         }\r
51         \r
52 }\r