summaryrefslogtreecommitdiffstats
path: root/petascope/src/petascope/wcps/server/core/VariableReference.java
diff options
context:
space:
mode:
Diffstat (limited to 'petascope/src/petascope/wcps/server/core/VariableReference.java')
-rw-r--r--petascope/src/petascope/wcps/server/core/VariableReference.java73
1 files changed, 36 insertions, 37 deletions
diff --git a/petascope/src/petascope/wcps/server/core/VariableReference.java b/petascope/src/petascope/wcps/server/core/VariableReference.java
index 9c211c1..f6de89b 100644
--- a/petascope/src/petascope/wcps/server/core/VariableReference.java
+++ b/petascope/src/petascope/wcps/server/core/VariableReference.java
@@ -14,44 +14,43 @@
* You should have received a copy of the GNU General Public License
* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
*
- * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
- rasdaman GmbH.
+ * Copyright 2003 - 2010 Peter Baumann / rasdaman GmbH.
*
* For more information please see <http://www.rasdaman.org>
* or contact Peter Baumann via <baumann@rasdaman.com>.
*/
-package petascope.wcps.server.core;
-
-import petascope.wcps.server.exceptions.WCPSException;
-import org.w3c.dom.*;
-
-public class VariableReference implements IRasNode {
-
- private String name;
- private String translatedName;
-
- public VariableReference(Node node, XmlQuery xq) throws WCPSException {
- System.err.println("Parsing variable reference: " + node.getNodeName());
-
- while ((node != null) && node.getNodeName().equals("#text")) {
- node = node.getNextSibling();
- }
-
- if (node != null && node.getNodeName().equals("variableRef")) {
- name = node.getTextContent();
- translatedName = xq.getReferenceVariableName(name);
- System.err.println("Variable " + name + " has been renamed into "
- + translatedName);
- } else {
- throw new WCPSException("Could not find any variable reference !");
- }
- }
-
- public String getName() {
- return name;
- }
-
- public String toRasQL() {
- return translatedName;
- }
-}
+package petascope.wcps.server.core;
+
+import petascope.exceptions.WCPSException;
+import org.w3c.dom.*;
+
+public class VariableReference implements IRasNode {
+
+ private String name;
+ private String translatedName;
+
+ public VariableReference(Node node, XmlQuery xq) throws WCPSException {
+ System.err.println("Parsing variable reference: " + node.getNodeName());
+
+ while ((node != null) && node.getNodeName().equals("#text")) {
+ node = node.getNextSibling();
+ }
+
+ if (node != null && node.getNodeName().equals("variableRef")) {
+ name = node.getTextContent();
+ translatedName = xq.getReferenceVariableName(name);
+ System.err.println("Variable " + name + " has been renamed into "
+ + translatedName);
+ } else {
+ throw new WCPSException("Could not find any variable reference !");
+ }
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String toRasQL() {
+ return translatedName;
+ }
+}