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

pag at mulgara.org pag at mulgara.org
Wed Nov 14 19:41:25 UTC 2007


Author: pag
Date: 2007-11-14 13:41:24 -0600 (Wed, 14 Nov 2007)
New Revision: 543

Modified:
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ApplyRules.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Backup.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/BooleanSetCommand.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/CreateGraph.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/DataTx.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/DropGraph.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ExecuteScript.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Help.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Load.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Modification.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ServerCommand.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/SetUser.java
Log:
Made all the immutable fields final, like they should have been all along

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ApplyRules.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ApplyRules.java	2007-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ApplyRules.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -31,13 +31,13 @@
 public class ApplyRules extends ServerCommand {
 
   /** The graph containing the rules to be run. */
-  private URI ruleGraph;
+  private final URI ruleGraph;
   
   /** The graph containing the data to apply the rules to. */
-  private URI baseGraph;
+  private final URI baseGraph;
   
   /** The graph to put the rule productions into. */
-  private URI destGraph;
+  private final URI destGraph;
   
   /**
    * Create a new rules command.

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-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Backup.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -93,7 +93,7 @@
       backup(conn, getSource(), fileOutputStream);
     }
   
-    return setResultMessage("Successfully backed up " + getSource());
+    return setResultMessage("Successfully backed up " + getSource() + " to " + getDestination());
   }
 
 

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/BooleanSetCommand.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/BooleanSetCommand.java	2007-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/BooleanSetCommand.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -24,7 +24,7 @@
   protected static final String OFF = "off";
 
   /** Indicates that option has been set on or off. */
-  private boolean on;
+  private final boolean on;
   
   /**
    * Create a command to set and option on or off.

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/CreateGraph.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/CreateGraph.java	2007-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/CreateGraph.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -29,10 +29,10 @@
   private static final Logger logger = Logger.getLogger(CreateGraph.class.getName());
 
   /** The URI for the graph. */
-  private URI graphUri;
+  private final URI graphUri;
   
   /** The URI for the type of the graph. */
-  private URI type;
+  private final URI type;
   
   public CreateGraph(URI graphUri, URI type) {
     super(graphUri);

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-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/DataTx.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -48,13 +48,13 @@
   private static final String ZIP_EXTENSION = ".zip";
 
   /** The source of data to insert. */
-  private URI source;
+  private final URI source;
   
   /** The graph to load data into. */
-  private URI destination;
+  private final URI destination;
 
   /** Indicates that data is to be loaded locally from the client. */
-  private boolean local;
+  private final boolean local;
   
   /** A stream to enable an API to load data directly. */
   private InputStream overrideStream;

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/DropGraph.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/DropGraph.java	2007-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/DropGraph.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -25,7 +25,7 @@
 public class DropGraph extends ServerCommand {
 
   /** The URI for the graph. */
-  private URI graphUri;
+  private final URI graphUri;
   
   public DropGraph(URI graphUri) {
     super(graphUri);

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ExecuteScript.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ExecuteScript.java	2007-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ExecuteScript.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -34,10 +34,10 @@
   static final Logger logger = Logger.getLogger(ExecuteScript.class.getName());
 
   /** The script to be executed. */
-  private URL script;
+  private final URL script;
   
   /** The interpreter for the script. */
-  Interpreter interpreter;
+  final Interpreter interpreter;
   
   
   /**

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Help.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Help.java	2007-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Help.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -25,7 +25,7 @@
  */
 public class Help extends LocalCommand {
 
-  private String helpText;
+  private final String helpText;
   
   public Help(String helpText) {
     this.helpText = helpText;

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Load.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Load.java	2007-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Load.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -34,7 +34,7 @@
   static final Logger logger = Logger.getLogger(Load.class.getName());
   
   /** Model resource form of the source URI */
-  private ModelResource srcRsc;
+  private final ModelResource srcRsc;
 
   /**
    * Build a load operation, loading data from one URI into a graph specified by another URI.

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Modification.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Modification.java	2007-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Modification.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -21,11 +21,11 @@
 public abstract class Modification extends ServerCommand {
 
   /** The graph to insert into. */
-  protected URI graph;
+  protected final URI graph;
   /** A SELECT query where the results are to be inserted into the graph. */
-  protected Query selectQuery;
+  protected final Query selectQuery;
   /** A set of statements to be inserted into the graph. */
-  protected Set<Triple> statements;
+  protected final Set<Triple> statements;
 
   /**
    * Create a modification command for modifying a set of statements in a graph.
@@ -36,6 +36,7 @@
     super(graph);
     this.graph = graph;
     this.statements = statements;
+    this.selectQuery = null;
   }
 
   /**
@@ -47,6 +48,7 @@
     super(graph);
     this.graph = graph;
     this.selectQuery = selectQuery;
+    this.statements = null;
   }
 
   /**

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ServerCommand.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ServerCommand.java	2007-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/ServerCommand.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -27,7 +27,7 @@
 public abstract class ServerCommand implements Command {
 
   /** The graph being referred to on the server. */
-  private ModelResource serverGraph;
+  private final ModelResource serverGraph;
   
   /** The message set by the result of this command. */
   private String resultMessage;

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/SetUser.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/SetUser.java	2007-11-14 18:18:59 UTC (rev 542)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/SetUser.java	2007-11-14 19:41:24 UTC (rev 543)
@@ -30,13 +30,13 @@
   private static final String MESSAGE = "Credential presented";
 
   /** The user logging in. */
-  private String user;
+  private final String user;
   
   /** The password for the user, as provided in the UI. */
-  private String password;
+  private final String password;
   
   /** The security domain to log in to. */
-  private URI securityDomain;
+  private final URI securityDomain;
 
   /**
    * Create a new SetUser command.




More information about the Mulgara-svn mailing list