[Mulgara-svn] r373 - in branches/nw-interface/src/jar/query/java/org/mulgara/query: . ast
pag at mulgara.org
pag at mulgara.org
Thu Aug 23 17:23:08 UTC 2007
Author: pag
Date: 2007-08-23 12:23:07 -0500 (Thu, 23 Aug 2007)
New Revision: 373
Modified:
branches/nw-interface/src/jar/query/java/org/mulgara/query/Query.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/ApplyRules.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Backup.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Command.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Commit.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/CreateGraph.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Deletion.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/DropGraph.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/ExecuteScript.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Help.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Insertion.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Load.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/LocalCommand.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/NullOp.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Quit.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Restore.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Rollback.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetAutoCommit.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetTime.java
branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetUser.java
Log:
Added Connection field to the execute operation of all AST elements
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/Query.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/Query.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/Query.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -34,6 +34,7 @@
// Third party packages
import org.apache.log4j.*;
+import org.mulgara.connection.Connection;
import org.mulgara.query.ast.Command;
/**
@@ -544,7 +545,7 @@
return dbURIs.isEmpty() ? null : dbURIs.iterator().next();
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/ApplyRules.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/ApplyRules.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/ApplyRules.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -13,6 +13,8 @@
import java.net.URI;
+import org.mulgara.connection.Connection;
+
/**
* Represents a command to apply rules to a set of data.
*
@@ -66,7 +68,7 @@
return destGraph;
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Backup.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Backup.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Backup.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -13,6 +13,8 @@
import java.net.URI;
+import org.mulgara.connection.Connection;
+
/**
* Represents a command to back data up from a model.
*
@@ -27,7 +29,7 @@
super(source, destination);
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Command.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Command.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Command.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -14,6 +14,8 @@
import java.net.URI;
+import org.mulgara.connection.Connection;
+
/**
* A general Abstract Syntax Tree for TQL commands.
*
@@ -49,5 +51,5 @@
* @return Data specific to the operation.
* @throws Exception specific to the operation.
*/
- Object execute() throws Exception;
+ Object execute(Connection conn) throws Exception;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Commit.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Commit.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Commit.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -14,7 +14,9 @@
import java.net.URI;
+import org.mulgara.connection.Connection;
+
/**
* An AST element for the COMMIT command.
*
@@ -53,7 +55,7 @@
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/CreateGraph.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/CreateGraph.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/CreateGraph.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -13,6 +13,8 @@
import java.net.URI;
+import org.mulgara.connection.Connection;
+
/**
* Represents a command to create a new graph.
* @created Aug 10, 2007
@@ -50,7 +52,7 @@
return type;
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Deletion.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Deletion.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Deletion.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -15,6 +15,7 @@
import java.util.Set;
import org.jrdf.graph.Triple;
+import org.mulgara.connection.Connection;
import org.mulgara.query.Query;
/**
@@ -44,7 +45,7 @@
super(graph, selectQuery);
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/DropGraph.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/DropGraph.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/DropGraph.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -13,6 +13,8 @@
import java.net.URI;
+import org.mulgara.connection.Connection;
+
/**
* Represents a command to drop a graph.
* @created Aug 10, 2007
@@ -38,7 +40,7 @@
return graphUri;
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/ExecuteScript.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/ExecuteScript.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/ExecuteScript.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -13,6 +13,8 @@
import java.net.URL;
+import org.mulgara.connection.Connection;
+
/**
* An AST element for running an external script.
* @created Aug 14, 2007
@@ -48,7 +50,7 @@
return script;
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Help.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Help.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Help.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -12,7 +12,9 @@
package org.mulgara.query.ast;
+import org.mulgara.connection.Connection;
+
/**
* An AST element for the HELP command.
*
@@ -42,7 +44,7 @@
return helpText;
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Insertion.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Insertion.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Insertion.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -15,6 +15,7 @@
import java.util.Set;
import org.jrdf.graph.Triple;
+import org.mulgara.connection.Connection;
import org.mulgara.query.Query;
/**
@@ -44,7 +45,7 @@
super(graph, selectQuery);
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Load.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Load.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Load.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -13,6 +13,8 @@
import java.net.URI;
+import org.mulgara.connection.Connection;
+
/**
* Represents a command to load data into a model.
*
@@ -27,7 +29,7 @@
super(source, destination);
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/LocalCommand.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/LocalCommand.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/LocalCommand.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -39,4 +39,13 @@
public URI getServerURI() throws UnsupportedOperationException {
throw new UnsupportedOperationException("Server URI not available for local commands.");
}
+
+ /**
+ * Executes the operation. This is highly specific to each operation.
+ * @return Data specific to the operation.
+ * @throws Exception specific to the operation.
+ */
+ public Object execute() throws Exception {
+ return execute(null);
+ }
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/NullOp.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/NullOp.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/NullOp.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -11,6 +11,8 @@
*/
package org.mulgara.query.ast;
+import org.mulgara.connection.Connection;
+
/**
* An AST element for commands that do not require processing.
*
@@ -31,7 +33,7 @@
/**
* Do nothing.
*/
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Quit.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Quit.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Quit.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -12,7 +12,9 @@
package org.mulgara.query.ast;
+import org.mulgara.connection.Connection;
+
/**
* An AST element for the QUIT command.
*
@@ -31,7 +33,7 @@
return true;
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Restore.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Restore.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Restore.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -13,6 +13,8 @@
import java.net.URI;
+import org.mulgara.connection.Connection;
+
/**
* Represents a command to reload backup data.
*
@@ -27,7 +29,7 @@
super(source, destination);
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Rollback.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Rollback.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/Rollback.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -14,7 +14,9 @@
import java.net.URI;
+import org.mulgara.connection.Connection;
+
/**
* An AST element for the ROLLBACK command.
*
@@ -50,7 +52,7 @@
return null;
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetAutoCommit.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetAutoCommit.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetAutoCommit.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -11,6 +11,8 @@
*/
package org.mulgara.query.ast;
+import org.mulgara.connection.Connection;
+
/**
* Indicates a UI request to automatically commit after executing a write operation.
* @created Aug 17, 2007
@@ -28,7 +30,7 @@
super(option);
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetTime.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetTime.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetTime.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -11,6 +11,8 @@
*/
package org.mulgara.query.ast;
+import org.mulgara.connection.Connection;
+
/**
* Indicates a UI request to record timing information for executing an operation.
* @created Aug 17, 2007
@@ -28,7 +30,7 @@
super(option);
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetUser.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetUser.java 2007-08-23 12:12:37 UTC (rev 372)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/ast/SetUser.java 2007-08-23 17:23:07 UTC (rev 373)
@@ -14,7 +14,9 @@
import java.net.URI;
+import org.mulgara.connection.Connection;
+
/**
* An AST element for the COMMIT command.
*
@@ -83,7 +85,7 @@
}
- public Object execute() throws Exception {
+ public Object execute(Connection conn) throws Exception {
// TODO Auto-generated method stub
return null;
}
More information about the Mulgara-svn
mailing list