[Mulgara-svn] r352 - branches/nw-interface/src/jar/itql/java/org/mulgara/query/ast

pag at mulgara.org pag at mulgara.org
Sun Aug 19 17:45:57 UTC 2007


Author: pag
Date: 2007-08-19 12:45:56 -0500 (Sun, 19 Aug 2007)
New Revision: 352

Added:
   branches/nw-interface/src/jar/itql/java/org/mulgara/query/ast/DataTx.java
Log:
Moved to being an abstract parent of Load and Backup

Copied: branches/nw-interface/src/jar/itql/java/org/mulgara/query/ast/DataTx.java (from rev 349, branches/nw-interface/src/jar/itql/java/org/mulgara/query/ast/Load.java)
===================================================================
--- branches/nw-interface/src/jar/itql/java/org/mulgara/query/ast/Load.java	2007-08-18 18:32:11 UTC (rev 349)
+++ branches/nw-interface/src/jar/itql/java/org/mulgara/query/ast/DataTx.java	2007-08-19 17:45:56 UTC (rev 352)
@@ -0,0 +1,79 @@
+/**
+ * The contents of this file are subject to the Open Software License
+ * Version 3.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.opensource.org/licenses/osl-3.0.txt
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ */
+package org.mulgara.query.ast;
+
+import java.net.URI;
+
+/**
+ * Represents a command to move data in or out of a model.
+ *
+ * @created Aug 13, 2007
+ * @author Paul Gearon
+ * @copyright &copy; 2007 <a href="mailto:pgearon at users.sourceforge.net">Paul Gearon</a>
+ * @licence <a href="{@docRoot}/../../LICENCE.txt">Open Software License v3.0</a>
+ */
+public abstract class DataTx implements CommandAst {
+
+  /** The source of data to insert. */
+  private URI source;
+  
+  /** The graph to load data into. */
+  private URI destination;
+  
+  /**
+   * Create a new load command.
+   * @param source The source of data to insert.
+   * @param destination The graph to load data into.
+   */
+  public DataTx(URI source, URI destination) {
+    this.source = source;
+    this.destination = destination;
+  }
+  
+  /**
+   * @return The URI of the destination graph.
+   */
+  public URI getServerURI() throws UnsupportedOperationException {
+    return destination;
+  }
+
+  /**
+   * Returns false to indicate that this is a server-side operation.
+   * @return Always <code>false</code>
+   */
+  public boolean isLocalOperation() {
+    return false;
+  }
+
+  /**
+   * Returns false to indicate that this operation is not tied to a UI.
+   * @return Always <code>false</code>
+   */
+  public boolean isUICommand() {
+    return false;
+  }
+
+  /**
+   * @return the URI of the source data.
+   */
+  public URI getSource() {
+    return source;
+  }
+
+  /**
+   * @return the destination URI for the data.
+   */
+  public URI getDestination() {
+    return destination;
+  }
+
+}




More information about the Mulgara-svn mailing list