You are viewing a plain text version of this content. The canonical link for it is here.
Posted to imperius-commits@incubator.apache.org by ke...@apache.org on 2008/01/11 18:57:14 UTC

svn commit: r611261 [28/43] - in /incubator/imperius/trunk: ./ imperius-javaspl/ imperius-javaspl/src/main/java/org/apache/imperius/javaspl/ imperius-splcore/ imperius-splcore/src/main/antlr/org/apache/imperius/spl/parser/compiler/ imperius-splcore/src...

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToSINT8.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToSINT8.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToSINT8.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToSINT8.java Fri Jan 11 10:56:30 2008
@@ -1,124 +1,124 @@
-/*
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <pr...@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.NumericExpression;
-import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.spl.parser.util.TypeResolver;
-import org.apache.imperius.util.SPLLogger;
-
-
-public class ToSINT8 extends SingleArgumentExpression implements
-        NumericExpression
-{
-    
-    public static final String className = ToSINT8.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="ToSINT8";
-    
-    
-    
-    public ToSINT8(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "ToSINT8");
-
-        if (validateExpression)
-        {
-            if (!validate())
-            {
-                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
-                        + " has wrong data type passed in.");
-                
-                throw new SPLException("validation error: " + className
-                        + " has wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ToSINT8");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        try
-        {
-            Object obj = _exp.evaluate();
-            Byte result = null;
-            if (obj instanceof Number)
-            {
-            	result = new Byte(((Number) obj).byteValue()); 
-                
-            }
-            else
-            {
-            	result = new Byte((String) obj);
-                
-            }
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
-            return result;
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
-            
-            throw new SPLException("evaluation error: " + e.toString());
-        }
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo eType = _exp.getType();
-        
-        // dataType = TypeConstants.numericType;
-        if (TypeResolver.isNumeric(eType) || TypeResolver.isString(eType))
-        {
-            _dataType.setType(TypeConstants.byteType);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-     
-        return false;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-        String retStr= "toSINT8("+this._exp.toString() + ")";
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return retStr;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <pr...@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.NumericExpression;
+import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.SPLLogger;
+
+
+public class ToSINT8 extends SingleArgumentExpression implements
+        NumericExpression
+{
+    
+    public static final String className = ToSINT8.class.getName();
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="ToSINT8";
+    
+    
+    
+    public ToSINT8(List exprList, boolean validateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "ToSINT8");
+
+        if (validateExpression)
+        {
+            if (!validate())
+            {
+                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
+                        + " has wrong data type passed in.");
+                
+                throw new SPLException("validation error: " + className
+                        + " has wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ToSINT8");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        try
+        {
+            Object obj = _exp.evaluate();
+            Byte result = null;
+            if (obj instanceof Number)
+            {
+            	result = new Byte(((Number) obj).byteValue()); 
+                
+            }
+            else
+            {
+            	result = new Byte((String) obj);
+                
+            }
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
+            return result;
+        }
+        catch (Exception e)
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
+            
+            throw new SPLException("evaluation error: " + e.toString());
+        }
+    }
+    
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        TypeInfo eType = _exp.getType();
+        
+        // dataType = TypeConstants.numericType;
+        if (TypeResolver.isNumeric(eType) || TypeResolver.isString(eType))
+        {
+            _dataType.setType(TypeConstants.byteType);
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+     
+        return false;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+        String retStr= "toSINT8("+this._exp.toString() + ")";
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return retStr;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToSINT8.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToString.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToString.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToString.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToString.java Fri Jan 11 10:56:30 2008
@@ -1,120 +1,120 @@
-/*
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <pr...@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
-import org.apache.imperius.spl.parser.expressions.StringExpression;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.spl.parser.util.TypeResolver;
-import org.apache.imperius.util.SPLLogger;
-
-
-public class ToString extends SingleArgumentExpression implements
-        StringExpression
-{
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="ToString";
-    
-    
-    
-    public ToString(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "ToString");
-
-        if (validateExpression)
-        {
-            if (!validate())
-            {
-                logger.severe(
-                "validation error: has wrong data type passed in.");
-                
-                throw new SPLException(
-                        "validation error: has wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ToString");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        try
-        {
-        	String result = null;
-            Object obj = _exp.evaluate();
-            if (obj instanceof Number)
-            {
-            	result = (((Number) obj).toString()); 
-                 
-            }
-            else
-            {
-            	result = (((Boolean) obj).toString()); 
-                 
-            }
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
-            
-            return result;
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
-            
-            throw new SPLException("evaluation error: " + e.toString());
-        }
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo eType = _exp.getType();
-        
-        if (TypeResolver.isNumeric(eType) || TypeResolver.isBoolean(eType))
-        {
-            _dataType.setType(TypeConstants.stringType);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-     
-        return false;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-        String retStr= "toString("+this._exp.toString() + ")";
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return retStr;
-    }
-}
+/*
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <pr...@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
+import org.apache.imperius.spl.parser.expressions.StringExpression;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.SPLLogger;
+
+
+public class ToString extends SingleArgumentExpression implements
+        StringExpression
+{
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="ToString";
+    
+    
+    
+    public ToString(List exprList, boolean validateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "ToString");
+
+        if (validateExpression)
+        {
+            if (!validate())
+            {
+                logger.severe(
+                "validation error: has wrong data type passed in.");
+                
+                throw new SPLException(
+                        "validation error: has wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ToString");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        try
+        {
+        	String result = null;
+            Object obj = _exp.evaluate();
+            if (obj instanceof Number)
+            {
+            	result = (((Number) obj).toString()); 
+                 
+            }
+            else
+            {
+            	result = (((Boolean) obj).toString()); 
+                 
+            }
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
+            
+            return result;
+        }
+        catch (Exception e)
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
+            
+            throw new SPLException("evaluation error: " + e.toString());
+        }
+    }
+    
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        TypeInfo eType = _exp.getType();
+        
+        if (TypeResolver.isNumeric(eType) || TypeResolver.isBoolean(eType))
+        {
+            _dataType.setType(TypeConstants.stringType);
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+     
+        return false;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+        String retStr= "toString("+this._exp.toString() + ")";
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return retStr;
+    }
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToString.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToUpper.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToUpper.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToUpper.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToUpper.java Fri Jan 11 10:56:30 2008
@@ -1,113 +1,113 @@
-/*
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <pr...@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
-import org.apache.imperius.spl.parser.expressions.StringExpression;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.spl.parser.util.TypeResolver;
-import org.apache.imperius.util.SPLLogger;
-
-
-public class ToUpper extends SingleArgumentExpression implements
-        StringExpression
-{
-    
-    public static final String className = ToUpper.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="ToUpper";
-    
-    
-    
-    public ToUpper(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "ToUpper");
-
-        if (validateExpression)
-        {
-            if (!validate())
-            {
-                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
-                        + " has wrong data type passed in.");
-                
-                throw new SPLException("validation error: " + className
-                        + " has wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ToUpper");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-   
-        try
-        {
-            Object obj = _exp.evaluate();
-            String result = (((String) obj).toUpperCase()); 
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
-            
-            return result;
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
-            
-            throw new SPLException("evaluation error: " + e.toString());
-        }
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo eType = _exp.getType();
-        
-        if (TypeResolver.isString(eType))
-        {
-            _dataType.setType(TypeConstants.stringType);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-        
-        
-        return false;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-        String retStr= "toUpper("+this._exp.toString() + ")";
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return retStr;
-    }
-}
+/*
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <pr...@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
+import org.apache.imperius.spl.parser.expressions.StringExpression;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.SPLLogger;
+
+
+public class ToUpper extends SingleArgumentExpression implements
+        StringExpression
+{
+    
+    public static final String className = ToUpper.class.getName();
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="ToUpper";
+    
+    
+    
+    public ToUpper(List exprList, boolean validateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "ToUpper");
+
+        if (validateExpression)
+        {
+            if (!validate())
+            {
+                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
+                        + " has wrong data type passed in.");
+                
+                throw new SPLException("validation error: " + className
+                        + " has wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ToUpper");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+   
+        try
+        {
+            Object obj = _exp.evaluate();
+            String result = (((String) obj).toUpperCase()); 
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
+            
+            return result;
+        }
+        catch (Exception e)
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
+            
+            throw new SPLException("evaluation error: " + e.toString());
+        }
+    }
+    
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        TypeInfo eType = _exp.getType();
+        
+        if (TypeResolver.isString(eType))
+        {
+            _dataType.setType(TypeConstants.stringType);
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+        
+        
+        return false;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+        String retStr= "toUpper("+this._exp.toString() + ")";
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return retStr;
+    }
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ToUpper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryMinusExpression.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryMinusExpression.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryMinusExpression.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryMinusExpression.java Fri Jan 11 10:56:30 2008
@@ -1,130 +1,130 @@
-/*
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Neeraj Joshi <jn...@us.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.NumericExpression;
-import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
-import org.apache.imperius.spl.parser.util.TypeResolver;
-import org.apache.imperius.util.SPLLogger;
-
-
-public class UnaryMinusExpression extends SingleArgumentExpression implements
-        NumericExpression
-{
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="UnaryMinusExpression";
-    
-    
-    
-    public UnaryMinusExpression(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "UnaryMinusExpression");
-
-        if (validateExpression)
-        {
-            if (!validate())
-            {
-                logger.severe(
-                "validation error: wrong data type passed in.");
-                
-                throw new SPLException(
-                        "validation error: wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "UnaryMinusExpression");
-        
-    }
-    
-    // @Override
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        // TODO Auto-generated method stub
-        Object n = _exp.evaluate();
-        Number result = null;
-        if (_dataType.getType() == TypeConstants.longType)
-        {
-            long s = ((Long) n).shortValue();
-            result = new Long(-s);
-
-           
-        }
-        else if (_dataType.getType() == TypeConstants.floatType)
-        {
-            float f = ((Float) n).floatValue();
-            result = new Float(-f);
-            
-        }
-        else if (_dataType.getType() == TypeConstants.doubleType)
-        {
-            double f = ((Double) n).doubleValue();
-            result = new Double(-f);
-          
-        }
-        else
-        {
-            int i = ((Integer) n).intValue();
-            result = new Integer(-i);
-          
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
-        
-        return result;
-        
-        // n = 0 - n;
-        // return null;
-    }
-    
-    // @Override
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        if (TypeResolver.isNumeric(_exp.getType()))
-        {
-            _dataType.copy(_exp.getType());
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-        // TODO Auto-generated method stub
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-        
-        return false;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-        String retStr= this._exp.toString() + "(...--...)";
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return retStr;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Neeraj Joshi <jn...@us.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.NumericExpression;
+import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
+import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.SPLLogger;
+
+
+public class UnaryMinusExpression extends SingleArgumentExpression implements
+        NumericExpression
+{
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="UnaryMinusExpression";
+    
+    
+    
+    public UnaryMinusExpression(List exprList, boolean validateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "UnaryMinusExpression");
+
+        if (validateExpression)
+        {
+            if (!validate())
+            {
+                logger.severe(
+                "validation error: wrong data type passed in.");
+                
+                throw new SPLException(
+                        "validation error: wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "UnaryMinusExpression");
+        
+    }
+    
+    // @Override
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        // TODO Auto-generated method stub
+        Object n = _exp.evaluate();
+        Number result = null;
+        if (_dataType.getType() == TypeConstants.longType)
+        {
+            long s = ((Long) n).shortValue();
+            result = new Long(-s);
+
+           
+        }
+        else if (_dataType.getType() == TypeConstants.floatType)
+        {
+            float f = ((Float) n).floatValue();
+            result = new Float(-f);
+            
+        }
+        else if (_dataType.getType() == TypeConstants.doubleType)
+        {
+            double f = ((Double) n).doubleValue();
+            result = new Double(-f);
+          
+        }
+        else
+        {
+            int i = ((Integer) n).intValue();
+            result = new Integer(-i);
+          
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
+        
+        return result;
+        
+        // n = 0 - n;
+        // return null;
+    }
+    
+    // @Override
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        if (TypeResolver.isNumeric(_exp.getType()))
+        {
+            _dataType.copy(_exp.getType());
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+        // TODO Auto-generated method stub
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+        
+        return false;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+        String retStr= this._exp.toString() + "(...--...)";
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return retStr;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryMinusExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryNotExpression.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryNotExpression.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryNotExpression.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryNotExpression.java Fri Jan 11 10:56:30 2008
@@ -1,103 +1,103 @@
-/*
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <pr...@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.Expression;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.spl.parser.util.TypeResolver;
-import org.apache.imperius.util.SPLLogger;
-
-
-public class UnaryNotExpression extends SingleArgumentExpression implements
-        Expression
-{
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="UnaryNotExpression";
-    
-    
-    
-    public UnaryNotExpression(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "UnaryNotExpression");
-
-        if (validateExpression)
-        {
-            if (!validate())
-            {
-                logger.severe(
-                "validation error:   wrong data type passed in.");
-                
-                throw new SPLException(
-                        "validation error:   wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "UnaryNotExpression");
-        
-    }
-    
-    // @Override
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        
-        Boolean result = (Boolean) _exp.evaluate();
-        Boolean result1 = new Boolean(!result.booleanValue());
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate "+result1);
-        
-        return result1;
-    }
-    
-    // @Override
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo tp = _exp.getType();
-        if (TypeResolver.isBoolean(tp))
-        {
-            _dataType.copy(tp);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-     
-        return false;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-        String retStr= this._exp.toString() + "(...!...)";
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return retStr;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <pr...@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.Expression;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.SPLLogger;
+
+
+public class UnaryNotExpression extends SingleArgumentExpression implements
+        Expression
+{
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="UnaryNotExpression";
+    
+    
+    
+    public UnaryNotExpression(List exprList, boolean validateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "UnaryNotExpression");
+
+        if (validateExpression)
+        {
+            if (!validate())
+            {
+                logger.severe(
+                "validation error:   wrong data type passed in.");
+                
+                throw new SPLException(
+                        "validation error:   wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "UnaryNotExpression");
+        
+    }
+    
+    // @Override
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        
+        Boolean result = (Boolean) _exp.evaluate();
+        Boolean result1 = new Boolean(!result.booleanValue());
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate "+result1);
+        
+        return result1;
+    }
+    
+    // @Override
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        TypeInfo tp = _exp.getType();
+        if (TypeResolver.isBoolean(tp))
+        {
+            _dataType.copy(tp);
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+     
+        return false;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+        String retStr= this._exp.toString() + "(...!...)";
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return retStr;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryNotExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryPlusExpression.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryPlusExpression.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryPlusExpression.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryPlusExpression.java Fri Jan 11 10:56:30 2008
@@ -1,101 +1,101 @@
-/*
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <pr...@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.NumericExpression;
-import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
-import org.apache.imperius.spl.parser.util.*;
-import org.apache.imperius.util.SPLLogger;
-
-
-
-public class UnaryPlusExpression extends SingleArgumentExpression implements
-        NumericExpression
-{
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="UnaryPlusExpression";
-    
-    
-    
-    public UnaryPlusExpression(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "UnaryPlusExpression");
-
-        if (validateExpression)
-        {
-            if (!validate())
-            {
-                logger.severe(
-                "validation error:   wrong data type passed in.");
-                
-                throw new SPLException(
-                        "validation error:   wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "UnaryPlusExpression");
-        
-    }
-    
-    // @Override
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-        Object result = _exp.evaluate(); 
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
-     
-        // TODO Auto-generated method stub
-        return result;
-    }
-    
-    // @Override
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        if (TypeResolver.isNumeric(_exp.getType()))
-        {
-            _dataType.copy(_exp.getType());
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-        // TODO Auto-generated method stub
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-        
-        return false;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-        String retStr= this._exp.toString() + "(...++...)";
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return retStr;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <pr...@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.NumericExpression;
+import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
+import org.apache.imperius.spl.parser.util.*;
+import org.apache.imperius.util.SPLLogger;
+
+
+
+public class UnaryPlusExpression extends SingleArgumentExpression implements
+        NumericExpression
+{
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="UnaryPlusExpression";
+    
+    
+    
+    public UnaryPlusExpression(List exprList, boolean validateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "UnaryPlusExpression");
+
+        if (validateExpression)
+        {
+            if (!validate())
+            {
+                logger.severe(
+                "validation error:   wrong data type passed in.");
+                
+                throw new SPLException(
+                        "validation error:   wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "UnaryPlusExpression");
+        
+    }
+    
+    // @Override
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+        Object result = _exp.evaluate(); 
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
+     
+        // TODO Auto-generated method stub
+        return result;
+    }
+    
+    // @Override
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        if (TypeResolver.isNumeric(_exp.getType()))
+        {
+            _dataType.copy(_exp.getType());
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+        // TODO Auto-generated method stub
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+        
+        return false;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+        String retStr= this._exp.toString() + "(...++...)";
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return retStr;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/UnaryPlusExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Union.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Union.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Union.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Union.java Fri Jan 11 10:56:30 2008
@@ -1,194 +1,194 @@
-/*
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <pr...@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.Expression;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
-import org.apache.imperius.util.SPLLogger;
-
-
-public class Union extends DoubleArgumentExpression implements Expression
-{
-    
-    // private BasicCollectionExpression basicCollection=null;
-    public String className = Union.class.toString();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="Union";
-    
-    
-    
-    public Union(List exprList, boolean evaluateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Union");
-
-       //System.out.println("Union");
-        // this.basicCollection=new BasicCollectionExpression(exprList,new
-        // SPLSymbolTable());
-        
-        if (evaluateExpression)
-        {
-           //System.out.println("evaluateExpression " + evaluateExpression);
-            if (!validate())
-            {
-
-                logger.severe(
-                        "validation error: wrong data type passed in "
-                        + this._dataType);
-             
-                throw new SPLException(
-                        "validation error: wrong data type passed in "
-                                + this._dataType);
-            }
-            
-        }
-       
-       // this._isArray = true;
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Union");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-       //System.out.println("Union:evaluate");
-        Object lhsResult = this._lhsExp.evaluate();
-        Object rhsResult = this._rhsExp.evaluate();
-        
-        if (!(lhsResult instanceof java.util.List))
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"lhsResult is not of type List");
-            throw new SPLException("lhsResult is not of type List");
-        }
-        else
-        {
-           //System.out.println("lhsResult is of type List");
-        }
-        if (!(rhsResult instanceof java.util.List))
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"rhsResult is not of type List");
-            throw new SPLException("rhsResult is not of type List");
-        }
-        else
-        {
-           //System.out.println("rhsResult is of type List");
-        }
-        
-        List lhsResultarray = (List) lhsResult;
-        List rhsResultarray = (List) rhsResult;
-        List unionResult = new ArrayList();
-       //System.out.println("lhsResultarray " + lhsResultarray.toString());
-       //System.out.println("rhsResultarray " + rhsResultarray.toString());
-        // List resultList=rhsResultarray;
-        Iterator lhsResultarrayIt = lhsResultarray.iterator();
-        while (lhsResultarrayIt.hasNext())
-        {
-            Object lhsResultarrayElement = lhsResultarrayIt.next();
-           //System.out.println("element from Lhs ResultArray "+ lhsResultarrayElement + "  "+ lhsResultarrayElement.getClass());
-           //System.out.println("element added to result List");
-            unionResult.add(lhsResultarrayElement);
-            
-        }
-        Iterator rhsResultarrayIt = rhsResultarray.iterator();
-        while (rhsResultarrayIt.hasNext())
-        {
-            Object rhsResultarrayElement = rhsResultarrayIt.next();
-           //System.out.println("element from Lhs ResultArray "+ lhsResultarrayElement + "  "+ lhsResultarrayElement.getClass());
-           //System.out.println("element added to result List");
-            unionResult.add(rhsResultarrayElement);
-           
-        }
-       //System.out.println("resultList " + rhsResultarray.toString());
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate "+unionResult.toString());
-        
-        return unionResult;
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-       //System.out.println("Union : validate ");
-        Expression lhsExpression = (Expression) this._lhsExp;
-        Expression rhsExpression = (Expression) this._rhsExp;
-        _dataType.copy(_lhsExp.getType());
-        
-        if ((lhsExpression == null) || (rhsExpression == null))
-        {
-           //System.out.println("Union : One or more expressions are null ");
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return false;
-        }
-        if (lhsExpression.getType().getType() != rhsExpression.getType().getType())
-        {
-           //System.out.println("Union : lhs Type !=rhs Type "+ lhsExpression.getType() + ":" + rhsExpression.getType());
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return false;
-        }
-        if (lhsExpression.isArray())
-        {
-           //System.out.println("lhsExpression.getType() ==TypeConstants.basicCollectionType");
-            if (rhsExpression.isArray())
-            {
-               //System.out.println("rhsExpression.getType() ==TypeConstants.basicCollectionType");
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-                
-                return true;
-                
-            }
-            else
-            {
-               //System.out.println("rhsExpression.getType() !=TypeConstants.basicCollectionType");
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-                
-                return false;
-            }
-        }
-        else
-        {
-           //System.out.println("lhsExpression.getType() !=TypeConstants.basicCollectionType");
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return false;
-        }
-        
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-        String retStr= "( "+this._lhsExp.toString() + " Union " + this._rhsExp.toString()+" )";
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return retStr;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <pr...@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.Expression;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
+import org.apache.imperius.util.SPLLogger;
+
+
+public class Union extends DoubleArgumentExpression implements Expression
+{
+    
+    // private BasicCollectionExpression basicCollection=null;
+    public String className = Union.class.toString();
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="Union";
+    
+    
+    
+    public Union(List exprList, boolean evaluateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Union");
+
+       //System.out.println("Union");
+        // this.basicCollection=new BasicCollectionExpression(exprList,new
+        // SPLSymbolTable());
+        
+        if (evaluateExpression)
+        {
+           //System.out.println("evaluateExpression " + evaluateExpression);
+            if (!validate())
+            {
+
+                logger.severe(
+                        "validation error: wrong data type passed in "
+                        + this._dataType);
+             
+                throw new SPLException(
+                        "validation error: wrong data type passed in "
+                                + this._dataType);
+            }
+            
+        }
+       
+       // this._isArray = true;
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Union");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+       //System.out.println("Union:evaluate");
+        Object lhsResult = this._lhsExp.evaluate();
+        Object rhsResult = this._rhsExp.evaluate();
+        
+        if (!(lhsResult instanceof java.util.List))
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"lhsResult is not of type List");
+            throw new SPLException("lhsResult is not of type List");
+        }
+        else
+        {
+           //System.out.println("lhsResult is of type List");
+        }
+        if (!(rhsResult instanceof java.util.List))
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"rhsResult is not of type List");
+            throw new SPLException("rhsResult is not of type List");
+        }
+        else
+        {
+           //System.out.println("rhsResult is of type List");
+        }
+        
+        List lhsResultarray = (List) lhsResult;
+        List rhsResultarray = (List) rhsResult;
+        List unionResult = new ArrayList();
+       //System.out.println("lhsResultarray " + lhsResultarray.toString());
+       //System.out.println("rhsResultarray " + rhsResultarray.toString());
+        // List resultList=rhsResultarray;
+        Iterator lhsResultarrayIt = lhsResultarray.iterator();
+        while (lhsResultarrayIt.hasNext())
+        {
+            Object lhsResultarrayElement = lhsResultarrayIt.next();
+           //System.out.println("element from Lhs ResultArray "+ lhsResultarrayElement + "  "+ lhsResultarrayElement.getClass());
+           //System.out.println("element added to result List");
+            unionResult.add(lhsResultarrayElement);
+            
+        }
+        Iterator rhsResultarrayIt = rhsResultarray.iterator();
+        while (rhsResultarrayIt.hasNext())
+        {
+            Object rhsResultarrayElement = rhsResultarrayIt.next();
+           //System.out.println("element from Lhs ResultArray "+ lhsResultarrayElement + "  "+ lhsResultarrayElement.getClass());
+           //System.out.println("element added to result List");
+            unionResult.add(rhsResultarrayElement);
+           
+        }
+       //System.out.println("resultList " + rhsResultarray.toString());
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate "+unionResult.toString());
+        
+        return unionResult;
+    }
+    
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+       //System.out.println("Union : validate ");
+        Expression lhsExpression = (Expression) this._lhsExp;
+        Expression rhsExpression = (Expression) this._rhsExp;
+        _dataType.copy(_lhsExp.getType());
+        
+        if ((lhsExpression == null) || (rhsExpression == null))
+        {
+           //System.out.println("Union : One or more expressions are null ");
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return false;
+        }
+        if (lhsExpression.getType().getType() != rhsExpression.getType().getType())
+        {
+           //System.out.println("Union : lhs Type !=rhs Type "+ lhsExpression.getType() + ":" + rhsExpression.getType());
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return false;
+        }
+        if (lhsExpression.isArray())
+        {
+           //System.out.println("lhsExpression.getType() ==TypeConstants.basicCollectionType");
+            if (rhsExpression.isArray())
+            {
+               //System.out.println("rhsExpression.getType() ==TypeConstants.basicCollectionType");
+                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+                
+                return true;
+                
+            }
+            else
+            {
+               //System.out.println("rhsExpression.getType() !=TypeConstants.basicCollectionType");
+                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+                
+                return false;
+            }
+        }
+        else
+        {
+           //System.out.println("lhsExpression.getType() !=TypeConstants.basicCollectionType");
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return false;
+        }
+        
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+        String retStr= "( "+this._lhsExp.toString() + " Union " + this._rhsExp.toString()+" )";
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return retStr;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Union.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Word.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Word.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Word.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Word.java Fri Jan 11 10:56:30 2008
@@ -1,187 +1,187 @@
-/*
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <pr...@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.StringExpression;
-import org.apache.imperius.spl.parser.expressions.TripleArgumentExpression;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.spl.parser.util.TypeResolver;
-import org.apache.imperius.util.SPLLogger;
-
-
-public class Word extends TripleArgumentExpression implements StringExpression
-{
-    
-    public static final String className = Word.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="Word";
-    
-    
-    
-    public Word(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Word");
-
-        if (validateExpression)
-        {
-            if (!validate())
-            {
-                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
-                        + " has wrong data type passed in.");
-                
-                throw new SPLException("validation error: " + className
-                        + " has wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Word");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        try
-        {
-            String o1 = (String) _lhsExp.evaluate();
-            String o2 = (String) _midExp.evaluate();
-            Number o3 = (Number) _rhsExp.evaluate();
-            String result = _word(o1, o2, ((Integer) o3).intValue());
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
-            
-            return result;
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
-            
-            throw new SPLException("evaluation error: " + e.toString());
-        }
-    }
-    
-    /**
-     * Returns a substring from the <code>baseString</code> with
-     * <code>n</code> words where words are defined as 1 or more characters
-     * between <code>separatorStrings</code>.
-     * <p>
-     * 
-     * @param baseString
-     *            base string
-     * @param separatorString
-     *            string of character(s) that represent a word delimiter
-     * @param numberOfWords
-     *            number of words to return in the substring
-     * @return the substring with up to numberOfWords in the substring
-     */
-    private String _word(String baseString, String separatorString,
-            int numberOfWords)
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "word");
-
-        
-        if (numberOfWords < 0)
-        {
-            logger.severe(
-            "NumberOfWords must be non-negative.");
-            
-            throw new IllegalArgumentException(
-                    "NumberOfWords must be non-negative.");
-        }
-        if (numberOfWords == 0){
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "word");
-        
-            return "";
-            }
-        
-        int pos = baseString.indexOf(separatorString);
-        int foundWords = 0;
-        int lastpos = 0;
-        int substringEnd = 0;
-        int separatorLength = separatorString.length();
-        
-        while (foundWords < numberOfWords && pos >= 0)
-        {
-            if (pos > lastpos + separatorLength)
-            {
-                // found a word
-                foundWords++;
-                substringEnd = pos;
-            }
-            lastpos = pos;
-            pos = baseString.indexOf(separatorString, pos + separatorLength);
-        }
-        if (substringEnd > 0)
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "word");
-            
-            return baseString.substring(0, substringEnd);
-        }
-        else
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "word");
-            
-            return "";
-        }
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo lType = _lhsExp.getType();
-        TypeInfo mType = _midExp.getType();
-        TypeInfo rType = _rhsExp.getType();
-        
-        if (!lType.getIsArray() && !mType.getIsArray() && !rType.getIsArray() &&
-        		TypeResolver.isString(lType) && TypeResolver.isString(mType)
-                && TypeResolver.isNumeric(rType))
-        {
-            _dataType.setType(TypeConstants.stringType);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-     
-        return false;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-        String retStr= "Word( "+this._lhsExp.toString()+" , "+this._midExp.toString()+" , "+this._rhsExp.toString()+" )";
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return retStr;
-    }
-
-
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <pr...@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.StringExpression;
+import org.apache.imperius.spl.parser.expressions.TripleArgumentExpression;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.SPLLogger;
+
+
+public class Word extends TripleArgumentExpression implements StringExpression
+{
+    
+    public static final String className = Word.class.getName();
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="Word";
+    
+    
+    
+    public Word(List exprList, boolean validateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Word");
+
+        if (validateExpression)
+        {
+            if (!validate())
+            {
+                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
+                        + " has wrong data type passed in.");
+                
+                throw new SPLException("validation error: " + className
+                        + " has wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Word");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        try
+        {
+            String o1 = (String) _lhsExp.evaluate();
+            String o2 = (String) _midExp.evaluate();
+            Number o3 = (Number) _rhsExp.evaluate();
+            String result = _word(o1, o2, ((Integer) o3).intValue());
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + result);
+            
+            return result;
+        }
+        catch (Exception e)
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
+            
+            throw new SPLException("evaluation error: " + e.toString());
+        }
+    }
+    
+    /**
+     * Returns a substring from the <code>baseString</code> with
+     * <code>n</code> words where words are defined as 1 or more characters
+     * between <code>separatorStrings</code>.
+     * <p>
+     * 
+     * @param baseString
+     *            base string
+     * @param separatorString
+     *            string of character(s) that represent a word delimiter
+     * @param numberOfWords
+     *            number of words to return in the substring
+     * @return the substring with up to numberOfWords in the substring
+     */
+    private String _word(String baseString, String separatorString,
+            int numberOfWords)
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "word");
+
+        
+        if (numberOfWords < 0)
+        {
+            logger.severe(
+            "NumberOfWords must be non-negative.");
+            
+            throw new IllegalArgumentException(
+                    "NumberOfWords must be non-negative.");
+        }
+        if (numberOfWords == 0){
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "word");
+        
+            return "";
+            }
+        
+        int pos = baseString.indexOf(separatorString);
+        int foundWords = 0;
+        int lastpos = 0;
+        int substringEnd = 0;
+        int separatorLength = separatorString.length();
+        
+        while (foundWords < numberOfWords && pos >= 0)
+        {
+            if (pos > lastpos + separatorLength)
+            {
+                // found a word
+                foundWords++;
+                substringEnd = pos;
+            }
+            lastpos = pos;
+            pos = baseString.indexOf(separatorString, pos + separatorLength);
+        }
+        if (substringEnd > 0)
+        {
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "word");
+            
+            return baseString.substring(0, substringEnd);
+        }
+        else
+        {
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "word");
+            
+            return "";
+        }
+    }
+    
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        TypeInfo lType = _lhsExp.getType();
+        TypeInfo mType = _midExp.getType();
+        TypeInfo rType = _rhsExp.getType();
+        
+        if (!lType.getIsArray() && !mType.getIsArray() && !rType.getIsArray() &&
+        		TypeResolver.isString(lType) && TypeResolver.isString(mType)
+                && TypeResolver.isNumeric(rType))
+        {
+            _dataType.setType(TypeConstants.stringType);
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+     
+        return false;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+        String retStr= "Word( "+this._lhsExp.toString()+" , "+this._midExp.toString()+" , "+this._rhsExp.toString()+" )";
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return retStr;
+    }
+
+
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Word.java
------------------------------------------------------------------------------
    svn:eol-style = native