[Mulgara-svn] r491 - branches/nw-interface/src/jar/query/java/org/mulgara/query/operation

pag at mulgara.org pag at mulgara.org
Mon Oct 22 21:22:32 UTC 2007


Author: pag
Date: 2007-10-22 16:22:32 -0500 (Mon, 22 Oct 2007)
New Revision: 491

Modified:
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Backup.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/DataTx.java
Log:
Fixed problem with the wrong server URI being returned for Backup operations (return the file URL instead)

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Backup.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Backup.java	2007-10-22 21:21:39 UTC (rev 490)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Backup.java	2007-10-22 21:22:32 UTC (rev 491)
@@ -54,7 +54,7 @@
    *        Only file URLs supported at the moment.
    */
   public Backup(URI source, URI destination) {
-    super(source, destination, false);
+    super(source, destination);
     if (!destination.getScheme().equals(FILE)) throw new IllegalArgumentException("Backups must be sent to a file");
     updateServerUri(source);
   }

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/DataTx.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/DataTx.java	2007-10-22 21:21:39 UTC (rev 490)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/DataTx.java	2007-10-22 21:22:32 UTC (rev 491)
@@ -60,12 +60,33 @@
   private InputStream overrideStream;
 
   /**
-   * Create a new load command.
+   * Create a new data transfer command for loads and restores.
    * @param source The source of data to insert.
-   * @param destination The graph to load data into.
+   * @param destination The graph or server to load data into.
    */
   public DataTx(URI source, URI destination, boolean local) {
     super(destination);
+    init(source, destination, local);
+  }
+
+
+  /**
+   * Create a new data transfer command for backup only.
+   * @param source The source model or server for the data.
+   * @param destination The destination for the data, currently file URLs only.
+   */
+  public DataTx(URI source, URI destination) {
+    super(source);
+    init(source, destination, false);
+  }
+
+  /**
+   * Initializes the data structures for the constructor methods.
+   * @param source The source of the data transfer.
+   * @param destination The destination of the data transfer.
+   * @param local Indicates if the data is local to the server, and not the client.
+   */
+  private void init(URI source, URI destination, boolean local) {
     if (source == null) throw new IllegalArgumentException("Need a valid source of data");
     if (destination == null) throw new IllegalArgumentException("Need a valid destination for data");
     this.source = source;




More information about the Mulgara-svn mailing list