]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraph2.java
Fixing PrettyPrintTG to not concatenate strings in logging
[simantics/platform.git] / bundles / org.simantics.graph / src / org / simantics / graph / representation / TransferableGraph2.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.graph.representation;
13
14 import java.util.TreeMap;
15
16 import org.simantics.databoard.Bindings;
17 import org.simantics.databoard.binding.Binding;
18 import org.simantics.databoard.binding.mutable.Variant;
19 import org.simantics.databoard.serialization.Serializer;
20
21
22 /**
23  * Transferable graph datatype. 
24  * See <a href="https://www.simantics.org/wiki/index.php/Graph_exchange_format">specification</a>. 
25  * @author Hannu Niemist�
26  */
27 public class TransferableGraph2 extends TransferableGraph1 {
28         
29         public static Binding BINDING;
30         public static Serializer SERIALIZER;
31
32         public TransferableGraph2(int resourceCount, Identity[] identities,
33                         int[] statements, Value[] values, TreeMap<String, Variant> extensions) {
34                 super(resourceCount, identities, statements, values, extensions);       
35         }
36
37         public TransferableGraph2(int resourceCount, Identity[] identities,
38                         int[] statements, Value[] values) {
39                 super(resourceCount, identities, statements, values);   
40         }       
41         
42         public static Binding getBinding() {
43                 return BINDING;
44         }
45         
46         static {
47                 BINDING = Bindings.getBindingUnchecked( TransferableGraph2.class );
48                 SERIALIZER = TransferableGraph1Serializer.INSTANCE;
49                 Bindings.serializerRepository.put(BINDING, SERIALIZER);
50         }
51         
52 }