]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graph.db/src/org/simantics/graph/db/old/OldTransferableGraphs.java
(refs #7216) Removed OldTransferableGraph1 and all referring code
[simantics/platform.git] / bundles / org.simantics.graph.db / src / org / simantics / graph / db / old / OldTransferableGraphs.java
diff --git a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/old/OldTransferableGraphs.java b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/old/OldTransferableGraphs.java
deleted file mode 100644 (file)
index 4786abd..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.db.old;
-
-import java.util.function.BiFunction;
-
-import org.simantics.db.ReadGraph;
-import org.simantics.db.Session;
-import org.simantics.db.WriteGraph;
-import org.simantics.db.WriteOnlyGraph;
-import org.simantics.db.common.request.ReadRequest;
-import org.simantics.db.common.request.WriteOnlyRequest;
-import org.simantics.db.exception.DatabaseException;
-import org.simantics.graph.db.IImportAdvisor;
-import org.simantics.graph.db.ImportAdvisor;
-import org.simantics.graph.db.TransferableGraphException;
-import org.simantics.graph.representation.old.OldTransferableGraph1;
-
-public class OldTransferableGraphs {
-
-    public static void importGraph1(Session session, final OldTransferableGraph1 tg, IImportAdvisor advisor, final BiFunction<WriteOnlyGraph, OldTransferableGraphImportProcess1, Boolean> callback) throws DatabaseException, TransferableGraphException {
-        final OldTransferableGraphImportProcess1 process = new OldTransferableGraphImportProcess1(tg, 
-                advisor == null ? new ImportAdvisor() : advisor);
-        session.syncRequest(new ReadRequest() {
-            @Override
-            public void run(ReadGraph graph) throws DatabaseException {
-                process.prepare(graph);
-            }
-        });
-        session.syncRequest(new WriteOnlyRequest() {
-            @Override
-            public void perform(WriteOnlyGraph graph) throws DatabaseException {
-                process.write(graph);
-                if(callback != null)
-                    callback.apply(graph, process);
-            }
-        });
-    }
-    
-    public static void importGraph1(WriteGraph graph, final OldTransferableGraph1 tg, IImportAdvisor advisor) throws DatabaseException {
-        final OldTransferableGraphImportProcess1 process = new OldTransferableGraphImportProcess1(tg, 
-                advisor == null ? new ImportAdvisor() : advisor);
-        process.prepare(graph);
-        process.write2(graph);
-       
-    }
-    
-}