X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Frepresentation%2FTransferableGraph1.java;h=4eb46885d5c8ea15a3b094de768a7cdceb536877;hb=acb2ceac4ac946941beae7547783ec76edceb733;hp=549e1e223ad6666449d326ddb447f2f9b13ce44d;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git
diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraph1.java b/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraph1.java
index 549e1e223..4eb46885d 100644
--- a/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraph1.java
+++ b/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraph1.java
@@ -1,81 +1,81 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
- * in Industry THTH ry.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VTT Technical Research Centre of Finland - initial API and implementation
- *******************************************************************************/
-package org.simantics.graph.representation;
-
-import java.util.TreeMap;
-
-import org.simantics.databoard.Bindings;
-import org.simantics.databoard.binding.Binding;
-import org.simantics.databoard.binding.mutable.Variant;
-import org.simantics.databoard.serialization.Serializer;
-
-
-/**
- * Transferable graph datatype.
- * See specification.
- * @author Hannu Niemistö
- */
-public class TransferableGraph1 {
- public static Binding BINDING = Bindings.getBindingUnchecked(TransferableGraph1.class);
- public static Serializer SERIALIZER = Bindings.getSerializerUnchecked(BINDING);
-
- public int resourceCount;
- public TreeMap extensions;
- public Identity[] identities;
- public int[] statements;
- public Value[] values;
-
- public TransferableGraph1() {
- }
-
- public TransferableGraph1(int resourceCount, Identity[] identities,
- int[] statements, Value[] values) {
- this(resourceCount, identities, statements, values,
- new TreeMap());
- }
-
- public TransferableGraph1(int resourceCount, Identity[] identities,
- int[] statements, Value[] values, TreeMap extensions) {
- this.resourceCount = resourceCount;
- this.identities = identities;
- this.statements = statements;
- this.values = values;
- this.extensions = extensions;
- }
-
- public void print() {
- System.out.println("Identities");
- for(Identity id : identities) {
- System.out.print(" " + id.resource + " = ");
- if(id.definition instanceof Root) {
- Root def = (Root)id.definition;
- System.out.println("ROOT(" + def.name + ")");
- }
- else if(id.definition instanceof External) {
- External def = (External)id.definition;
- System.out.println("EXTERNAL(" + def.parent + ", " + def.name + ")");
- }
- else if(id.definition instanceof Internal) {
- Internal def = (Internal)id.definition;
- System.out.println("INTERNAL(" + def.parent + ", " + def.name + ")");
- }
- }
- System.out.println("Statements:");
- for(int i=0;ispecification.
+ * @author Hannu Niemistö
+ */
+public class TransferableGraph1 {
+ public static Binding BINDING = Bindings.getBindingUnchecked(TransferableGraph1.class);
+ public static Serializer SERIALIZER = Bindings.getSerializerUnchecked(BINDING);
+
+ public int resourceCount;
+ public TreeMap extensions;
+ public Identity[] identities;
+ public int[] statements;
+ public Value[] values;
+
+ public TransferableGraph1() {
+ }
+
+ public TransferableGraph1(int resourceCount, Identity[] identities,
+ int[] statements, Value[] values) {
+ this(resourceCount, identities, statements, values,
+ new TreeMap());
+ }
+
+ public TransferableGraph1(int resourceCount, Identity[] identities,
+ int[] statements, Value[] values, TreeMap extensions) {
+ this.resourceCount = resourceCount;
+ this.identities = identities;
+ this.statements = statements;
+ this.values = values;
+ this.extensions = extensions;
+ }
+
+ public void print() {
+ System.out.println("Identities");
+ for(Identity id : identities) {
+ System.out.print(" " + id.resource + " = ");
+ if(id.definition instanceof Root) {
+ Root def = (Root)id.definition;
+ System.out.println("ROOT(" + def.name + ")");
+ }
+ else if(id.definition instanceof External) {
+ External def = (External)id.definition;
+ System.out.println("EXTERNAL(" + def.parent + ", " + def.name + ")");
+ }
+ else if(id.definition instanceof Internal) {
+ Internal def = (Internal)id.definition;
+ System.out.println("INTERNAL(" + def.parent + ", " + def.name + ")");
+ }
+ }
+ System.out.println("Statements:");
+ for(int i=0;i