[Mulgara-svn] r1896 - trunk/src/jar/resolver-spi/java/org/mulgara/resolver/spi

pag at mulgara.org pag at mulgara.org
Wed Jan 27 19:23:40 UTC 2010


Author: pag
Date: 2010-01-27 11:23:39 -0800 (Wed, 27 Jan 2010)
New Revision: 1896

Modified:
   trunk/src/jar/resolver-spi/java/org/mulgara/resolver/spi/TuplesContext.java
Log:
Made TuplesContext immutable, and also provided a way to read the value returned for unbound variables

Modified: trunk/src/jar/resolver-spi/java/org/mulgara/resolver/spi/TuplesContext.java
===================================================================
--- trunk/src/jar/resolver-spi/java/org/mulgara/resolver/spi/TuplesContext.java	2010-01-27 19:22:08 UTC (rev 1895)
+++ trunk/src/jar/resolver-spi/java/org/mulgara/resolver/spi/TuplesContext.java	2010-01-27 19:23:39 UTC (rev 1896)
@@ -38,10 +38,10 @@
   final static Logger logger = Logger.getLogger(TuplesContext.class.getName());
 
   /** The tuples containing variables and bindings. */
-  private Tuples tuples;
+  private final Tuples tuples;
 
   /** The session used for globalizing info. */
-  private ResolverSession session;
+  private final ResolverSession session;
 
   /**
    * Creates a new context for processing a filter.
@@ -66,16 +66,6 @@
 
 
   /**
-   * Updates the Tuples that this context applies to. Usually done when a clone of the original
-   * tuples is about to be used.
-   * @param tuples The tuples to set
-   */
-  public void setTuples(Tuples tuples) {
-    this.tuples = tuples;
-  }
-
-
-  /**
    * Gets the current binding to a local value (a long) for a given internal column number.
    * @return the value in the column number specified in the current context.
    */
@@ -143,5 +133,13 @@
       throw new QueryException("Unable to localize: " + node, te);
     }
   }
+
+
+  /**
+   * @see org.mulgara.query.filter.Context#getUnboundVal()
+   */
+  public long getUnboundVal() {
+    return Tuples.UNBOUND;
+  }
   
 }




More information about the Mulgara-svn mailing list