incubator-imperius-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jnee...@apache.org
Subject svn commit: r686743 [6/10] - in /incubator/imperius/trunk: imperius-javaspl/src/main/java/org/apache/imperius/javaspl/ imperius-splcore/src/main/antlr/org/apache/imperius/spl/parser/compiler/ imperius-splcore/src/main/java/org/apache/imperius/spl/datas...
Date Mon, 18 Aug 2008 12:50:42 GMT
Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Abs.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Abs.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Abs.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Abs.java Mon Aug 18 05:50:36 2008
@@ -17,7 +17,6 @@
  * under the License.  
  */
 //
-
 /**
  * 
  * @author Xiping Change Log: 3/9/07: Neeraj Joshi: Changed signature to take a
@@ -36,134 +35,146 @@
 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.Messages;
 import org.apache.imperius.util.SPLLogger;
 
+public class Abs extends SingleArgumentExpression implements NumericExpression 
+{
 
+	public static final String className = Abs.class.getName();
 
-public class Abs extends SingleArgumentExpression implements NumericExpression
-{
-    
-    public static final String className = Abs.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    
-
-    private static final String sourceClass="Abs";
-    
-    
-    
-    public Abs(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Abs");
-
-        
-        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()+" "+ "Abs");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-        Object returnVal = abs((Number) _exp.evaluate());
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate" + returnVal);
-     
-        return returnVal;
-    }
-    
-    public static Number abs(Number o1) throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Number");
-
-        try
-        {
-            Number[] o = new Number[1];
-            o[0] = o1;
-            
-            int resolvedType = TypeResolver.resolveType(o);
-            
-            if (resolvedType == TypeConstants.doubleType)
-            {
-            	Double dVal = new Double(Math.abs(o1.doubleValue())); 
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Number" + dVal);
-                
-                return dVal;
-            }
-            else if (resolvedType == TypeConstants.floatType)
-            {
-            	Float fVal = new Float(Math.abs(o1.floatValue())); 
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Number" + fVal);
-                
-                return fVal;
-            }
-            else if (resolvedType == TypeConstants.longType)
-            {
-            	Long lVal = new Long(Math.abs(o1.longValue())); 
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Number" + lVal);
-                
-                return lVal;
-            }
-            else
-            {
-            	Integer iVal = new Integer(Math.abs(o1.intValue())); 
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Number" + iVal);
-                
-                return iVal;
-            }
-        }
-        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) && !eType.getIsArray())
-        {
-            _dataType.copy(eType);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-     
-        return false;
-    }
+	private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+
+	private static final String sourceClass = "Abs";
+
+	public Abs(List exprList, boolean validateExpression) throws SPLException 
+	{
+		super(exprList);
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "Abs");
+
+		if (validateExpression) 
+		{
+			if (!validate()) 
+			{
+				logger.severe(Thread.currentThread().getName() + " "
+						+ "validation error: " + className
+						+ " has wrong data type passed in.");
+				throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
+			}
+		}
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "Abs");
+
+	}
+
+	public Object evaluate() throws SPLException 
+	{
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "evaluate");
+		Object returnVal = abs((Number) _exp.evaluate());
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "evaluate" + returnVal);
+
+		return returnVal;
+	}
+
+	public static Number abs(Number o1) throws SPLException 
+	{
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "Number");
+
+		try 
+		{
+			Number[] o = new Number[1];
+			o[0] = o1;
+
+			int resolvedType = TypeResolver.resolveType(o);
+
+			if (resolvedType == TypeConstants.doubleType) 
+			{
+				Double dVal = new Double(Math.abs(o1.doubleValue()));
+				logger.exiting(sourceClass, Thread.currentThread().getName()
+						+ " " + "Number" + dVal);
+
+				return dVal;
+			} 
+			else if (resolvedType == TypeConstants.floatType) 
+			{
+				Float fVal = new Float(Math.abs(o1.floatValue()));
+				logger.exiting(sourceClass, Thread.currentThread().getName()
+						+ " " + "Number" + fVal);
+
+				return fVal;
+			} 
+			else if (resolvedType == TypeConstants.longType) 
+			{
+				Long lVal = new Long(Math.abs(o1.longValue()));
+				logger.exiting(sourceClass, Thread.currentThread().getName()
+						+ " " + "Number" + lVal);
+
+				return lVal;
+			} 
+			else 
+			{
+				Integer iVal = new Integer(Math.abs(o1.intValue()));
+				logger.exiting(sourceClass, Thread.currentThread().getName()
+						+ " " + "Number" + iVal);
+
+				return iVal;
+			}
+		} 
+		catch (Exception e) 
+		{
+			logger.severe(Thread.currentThread().getName() + " "
+					+ "evaluation error: " + e.toString());
+
+			throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e.toString() }));
+		}
+	}
 
-	public String getReferenceTypeName() throws SPLException {
+	public boolean validate() throws SPLException 
+	{
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "validate");
+
+		TypeInfo eType = _exp.getType();
+
+		// dataType = TypeConstants.numericType;
+		if (TypeResolver.isNumeric(eType) && !eType.getIsArray()) 
+		{
+			_dataType.copy(eType);
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "validate");
+
+			return true;
+		}
+
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "validate");
+
+		return false;
+	}
+
+	public String getReferenceTypeName() throws SPLException 
+	{
 		// TODO Auto-generated method stub
 		return null;
 	}
-	
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-
-        String str = "Abs("+ this._exp.toString() + ")";
-        	
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
-    
+
+	public String toString() 
+	{
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "toString");
+
+		String str = "Abs(" + this._exp.toString() + ")";
+
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "toString");
+
+		return str;
+	}
+
 }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Addition.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Addition.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Addition.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Addition.java Mon Aug 18 05:50:36 2008
@@ -17,7 +17,6 @@
  * under the License.  
  */
 //
-
 /**
  * 
  * @author Xiping Change Log: 3/9/07: Neeraj Joshi: Changed signature to take a
@@ -39,147 +38,159 @@
 import org.apache.imperius.spl.parser.expressions.NumericExpression;
 import org.apache.imperius.spl.parser.util.TypeInfo;
 import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
-
-
 public class Addition extends DoubleArgumentExpression implements
-        NumericExpression
+		NumericExpression 
 {
-    
-    public static final String className = Addition.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="Addition";
-    
-    
-    
-    public Addition(List exprList, boolean evaluateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Addition");
-
-        
-        if (evaluateExpression)
-        {
-            
-            if (!validate())
-            {
-
-                logger.severe(Thread.currentThread().getName()+" "+"validation error: wrong data type passed into "
-                        + className + ".");
-             
-                throw new SPLException(
-                        "validation error: wrong data type passed into "
-                                + className + ".");
-            }
-        }
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Addition");
-     
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        try
-        {
-            Number lhs = (Number) _lhsExp.evaluate();
-            Number rhs = (Number) _rhsExp.evaluate();
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-            
-            return plus(lhs, rhs);
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
-            
-            throw new SPLException("evaluation error: " + e.toString());
-        }
-        
-    }
-    
-    private static Number plus(Number o1, Number o2)
-            throws IllegalExpressionTypeException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "plus");
-
-        Number[] o = new Number[2];
-        o[0] = o1;
-        o[1] = o2;
-        
-        int resolvedType = TypeResolver.resolveType(o);
-        
-        if (resolvedType == TypeConstants.doubleType)
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "plus");
-            
-            return new Double(o1.doubleValue() + o2.doubleValue());
-        }
-        else if (resolvedType == TypeConstants.floatType)
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "plus");
-            
-            return new Float(o1.floatValue() + o2.floatValue());
-        }
-        else if (resolvedType == TypeConstants.longType)
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "plus");
-            
-            return new Long(o1.longValue() + o2.longValue());
-        }
-        else if (resolvedType == TypeConstants.shortType)
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "plus");
-            
-            return new Long(o1.shortValue() + o2.shortValue());
-        }
-        else if (resolvedType == TypeConstants.byteType)
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "plus");
-            
-            return new Long(o1.byteValue() + o2.byteValue());
-        }
-        else
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "plus");
-            
-            return new Integer(o1.intValue() + o2.intValue());
-        }
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo lType = _lhsExp.getType();
-        TypeInfo rType = _rhsExp.getType();
-        
-        // dataType = TypeConstants.numericType;
-        if (TypeResolver.isNumeric(lType) && TypeResolver.isNumeric(rType) &&
-        		!lType.getIsArray() && !rType.getIsArray())
-        {
-            _dataType = TypeResolver.binaryNumericPromotionResolver(lType, rType);
-            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 str = this._lhsExp.toString() + " + " + this._rhsExp.toString();
-        	
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
+
+	public static final String className = Addition.class.getName();
+
+	private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+	private static final String sourceClass = "Addition";
+
+	public Addition(List exprList, boolean evaluateExpression)
+			throws SPLException 
+	{
+		super(exprList);
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "Addition");
+
+		if (evaluateExpression) 
+		{
+			if (!validate()) 
+			{
+				logger.severe(Thread.currentThread().getName() + " "
+						+ "validation error: wrong data type passed into "
+						+ className + ".");
+
+				throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
+			}
+		}
+
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "Addition");
+	}
+
+	public Object evaluate() throws SPLException 
+	{
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "evaluate");
+
+		try 
+		{
+			Number lhs = (Number) _lhsExp.evaluate();
+			Number rhs = (Number) _rhsExp.evaluate();
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "evaluate");
+
+			return plus(lhs, rhs);
+		} 
+		catch (Exception e) 
+		{
+			logger.severe(Thread.currentThread().getName() + " "
+					+ "evaluation error: " + e.toString());
+
+			throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e.toString() }));
+		}
+
+	}
+
+	private static Number plus(Number o1, Number o2)
+			throws IllegalExpressionTypeException 
+	{
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "plus");
+
+		Number[] o = new Number[2];
+		o[0] = o1;
+		o[1] = o2;
+
+		int resolvedType = TypeResolver.resolveType(o);
+
+		if (resolvedType == TypeConstants.doubleType) 
+		{
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "plus");
+
+			return new Double(o1.doubleValue() + o2.doubleValue());
+		}
+		else if (resolvedType == TypeConstants.floatType) 
+		{
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "plus");
+
+			return new Float(o1.floatValue() + o2.floatValue());
+		}
+		else if (resolvedType == TypeConstants.longType) 
+		{
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "plus");
+
+			return new Long(o1.longValue() + o2.longValue());
+		}
+		else if (resolvedType == TypeConstants.shortType) 
+		{
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "plus");
+
+			return new Long(o1.shortValue() + o2.shortValue());
+		}
+		else if (resolvedType == TypeConstants.byteType) 
+		{
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "plus");
+
+			return new Long(o1.byteValue() + o2.byteValue());
+		}
+		else 
+		{
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "plus");
+
+			return new Integer(o1.intValue() + o2.intValue());
+		}
+	}
+
+	public boolean validate() throws SPLException 
+	{
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "validate");
+
+		TypeInfo lType = _lhsExp.getType();
+		TypeInfo rType = _rhsExp.getType();
+
+		// dataType = TypeConstants.numericType;
+		if (TypeResolver.isNumeric(lType) && TypeResolver.isNumeric(rType)
+				&& !lType.getIsArray() && !rType.getIsArray()) 
+		{
+			_dataType = TypeResolver.binaryNumericPromotionResolver(lType,
+					rType);
+			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 str = this._lhsExp.toString() + " + " + this._rhsExp.toString();
+
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "toString");
+
+		return str;
+	}
 }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AllInCollection.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AllInCollection.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AllInCollection.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AllInCollection.java Mon Aug 18 05:50:36 2008
@@ -38,6 +38,7 @@
 import org.apache.imperius.spl.parser.util.ExpressionUtility;
 import org.apache.imperius.spl.parser.util.TypeInfo;
 import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -100,9 +101,8 @@
                         "validation error: wrong data type passed in "
                         + this._dataType);
              
-                throw new SPLException(
-                        "validation error: wrong data type passed in "
-                                + this._dataType);
+                throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         _dataType.setType(TypeConstants.booleanType);
@@ -129,7 +129,10 @@
                 logger.severe(
                 "rhsResult is not of type List");
              
-                throw new SPLException("rhsResult is not of type List");
+                throw new SPLException(Messages.getString(
+    					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG",
+    					new Object[] { "RHS","is not", "List" }));
+
             }
             Boolean result = Boolean.FALSE;
             ArrayList rhsResultArray = (ArrayList) rhsResult;
@@ -153,8 +156,9 @@
                             logger.severe(
                             "LHS or RHS result is not of type Boolean");
                          
-                            throw new SPLException(
-                                    "LHS or RHS result is not of type Boolean");
+                            throw new SPLException(Messages.getString(
+                					"SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG",
+                					new Object[] { "boolean" }));
                         }
                         else
                         {
@@ -178,8 +182,9 @@
                             logger.severe(
                             "LHS or RHS result is not of type Boolean");
                          
-                            throw new SPLException(
-                                    "LHS or RHS result is not of type Boolean");
+                            throw new SPLException(Messages.getString(
+                					"SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG",
+                					new Object[] { "boolean" }));
                         }
                         else
                         {
@@ -204,8 +209,9 @@
                             logger.severe(
                             "LHS or RHS result is not of type Boolean");
                          
-                            throw new SPLException(
-                                    "LHS or RHS result is not of type Boolean");
+                            throw new SPLException(Messages.getString(
+                					"SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG",
+                					new Object[] { "boolean" }));
                         }
                         else
                         {
@@ -319,8 +325,9 @@
                 logger.severe(
                 "the RHS of AllInCollection expression is null BasicCollection");
              
-                throw new IllegalParameterTypeException(
-                        "the RHS of AllInCollection expression is null BasicCollection");
+                throw new IllegalParameterTypeException(Messages.getString(
+    					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+    							"Right", "is null", "" }));
             }
         }
         else
@@ -328,8 +335,9 @@
             logger.severe(
             "the RHS of AllInCollection expression should be of BasicCollection type");
          
-            throw new IllegalParameterTypeException(
-                    "the RHS of AllInCollection expression should be of BasicCollection type");
+            throw new IllegalParameterTypeException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+							"Right", "should be", "BasicCollection" }));
         }
 
     }
@@ -351,7 +359,9 @@
             logger.severe(
             "Last Expression should be a collection");
          
-            throw new SPLException("Last Expression should be a collection");
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+							"right", "is not", "collection" }));
         }
         
         if (leftType.getIsArray())
@@ -359,15 +369,19 @@
             logger.severe(
             "First Expression cannot be a collection");
          
-            throw new SPLException("First Expression cannot be a collection");
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+							"left", "can not", "collection" }));
         }
         
         if (!TypeResolver.isString(middleType))
         {
             logger.severe(
             "Middle Expression should be a string describing the Operation");
-            throw new SPLException(
-                    "Middle Expression should be a string describing the Operation");
+            
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+							"middle", "should", "string" }));
         }
         this.operationString = (String) expression2.evaluate();
         if (this.operationString == null)
@@ -375,17 +389,19 @@
             logger.severe(
             "Operation string is null");
          
-            throw new SPLException("Operation string is null");
-        }
-        if (this.operationString == null)
-        {
-            logger.severe(
-                    "Operation type is "
-                    + this.operationString);
-         
-            throw new SPLException("Operation type is "
-                    + this.operationString);
-        }
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_ERROR_MSG", new Object[] {
+							"middle" }));
+        }
+//        if (this.operationString == null)
+//        {
+//            logger.severe(
+//                    "Operation type is "
+//                    + this.operationString);
+//         
+//            throw new SPLException("Operation type is "
+//                    + this.operationString);
+//        }
         
         if (operationString.equalsIgnoreCase(LAND)
                 || operationString.equalsIgnoreCase(LOR)
@@ -405,8 +421,9 @@
                     logger.severe(
                     "LHS is of type Boolean but RHS is not of type Boolean");
                  
-                    throw new SPLException(
-                            "LHS is of type Boolean but RHS is not of type Boolean");
+                    throw new SPLException(Messages.getString(
+							"SPL_TYPE_NOT_COMPATIBLE_EXCEPTION_MSG",
+							new Object[] { leftType, rightType }));
                 }
             }
             else
@@ -414,8 +431,9 @@
                 logger.severe(
                 "Operation is of type Boolean but LHS is not of type boolean");
              
-                throw new SPLException(
-                        "Operation is of type Boolean but LHS is not of type boolean");
+                throw new SPLException(Messages.getString(
+						"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+								"left", "is not", "boolean" }));
             }
         }
         else if (operationString.equalsIgnoreCase(EQUAL)
@@ -444,8 +462,9 @@
                 logger.severe(
                 "types are not assignable for Relation or Equality");
              
-                throw new SPLException(
-                        "types are not assignable for Relation or Equality");
+                throw new SPLException(Messages.getString(
+						"SPL_TYPE_NOT_COMPATIBLE_EXCEPTION_MSG",
+						new Object[] { leftType, rightType }));
             }
         }
         else
@@ -454,8 +473,7 @@
             logger.severe(
             "operationString is not supported by AllInCollection");
          
-            throw new SPLException(
-                    "operationString is not supported by AllInCollection");
+            throw new SPLException(Messages.getString("SPL_OPERATION_NOT_SUPPORTED_EXCEPTION_MSG"));
         }
         
     }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AnyInCollection.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AnyInCollection.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AnyInCollection.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AnyInCollection.java Mon Aug 18 05:50:36 2008
@@ -38,6 +38,7 @@
 import org.apache.imperius.spl.parser.util.ExpressionUtility;
 import org.apache.imperius.spl.parser.util.TypeInfo;
 import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -96,9 +97,8 @@
             if (!validate())
             {
                 logger.severe(Thread.currentThread().getName()+" "+"validation error: wrong data type passed in");
-                throw new SPLException(
-                        "validation error: wrong data type passed in "
-                                + this._dataType);
+                throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         _dataType.setType(TypeConstants.booleanType);
@@ -123,7 +123,10 @@
             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");
+                throw new SPLException(Messages.getString(
+    					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG",
+    					new Object[] { "RHS","is not", "List" }));
+
             }
             Boolean result = Boolean.FALSE;
             ArrayList rhsResultArray = (ArrayList) rhsResult;
@@ -145,8 +148,9 @@
                         {
                             logger.severe(
                             "LHS or RHS result is not of type Boolean");
-                            throw new SPLException(
-                                    "LHS or RHS result is not of type Boolean");
+                            throw new SPLException(Messages.getString(
+                					"SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG",
+                					new Object[] { "boolean" }));
                         }
                         else
                         {
@@ -170,8 +174,9 @@
                             logger.severe(
                             "LHS or RHS result is not of type Boolean");
                             
-                            throw new SPLException(
-                                    "LHS or RHS result is not of type Boolean");
+                            throw new SPLException(Messages.getString(
+                					"SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG",
+                					new Object[] { "boolean" }));
                         }
                         else
                         {
@@ -196,8 +201,9 @@
                             logger.severe(
                             "LHS or RHS result is not of type Boolean");
                             
-                            throw new SPLException(
-                                    "LHS or RHS result is not of type Boolean");
+                            throw new SPLException(Messages.getString(
+                					"SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG",
+                					new Object[] { "boolean" }));
                         }
                         else
                         {
@@ -297,8 +303,9 @@
                 logger.severe(
                 "the RHS of AnyInCollection expression is null BasicCollection");
                 
-                throw new IllegalParameterTypeException(
-                        "the RHS of AnyInCollection expression is null BasicCollection");
+                throw new IllegalParameterTypeException(Messages.getString(
+    					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+    							"Right", "is null", "" }));
             }
         }
         else
@@ -306,8 +313,9 @@
             logger.severe(
             "the RHS of AnyInCollection expression should be of BasicCollection type");
             
-            throw new IllegalParameterTypeException(
-                    "the RHS of AnyInCollection expression should be of BasicCollection type");
+            throw new IllegalParameterTypeException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+							"Right", "should be", "BasicCollection" }));
         }
         
     }
@@ -337,7 +345,10 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"First Expression cannot be a collection");
             
-            throw new SPLException("First Expression cannot be a collection");
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+							"left", "can not", "collection" }));
+
         }
         
         if (!TypeResolver.isString(middleType))
@@ -345,24 +356,28 @@
             logger.severe(
             "Middle Expression should be a string describing the Operation");
             
-            throw new SPLException(
-                    "Middle Expression should be a string describing the Operation");
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+							"middle", "should", "string" }));
         }
         this.operationString = (String) expression2.evaluate();
         if (this.operationString == null)
         {
             logger.severe(Thread.currentThread().getName()+" "+"Operation string is null");
             
-            throw new SPLException("Operation string is null");
-        }
-        if (this.operationString == null)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"Operation type is "
-                    + this.operationString);
-            
-            throw new SPLException("Operation type is "
-                    + this.operationString);
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_ERROR_MSG", new Object[] {
+							"middle" }));
+
         }
+//        if (this.operationString == null)
+//        {
+//            logger.severe(Thread.currentThread().getName()+" "+"Operation type is "
+//                    + this.operationString);
+//            
+//            throw new SPLException("Operation type is "
+//                    + this.operationString);
+//        }
         
         if (operationString.equalsIgnoreCase(LAND)
                 || operationString.equalsIgnoreCase(LOR)
@@ -382,8 +397,9 @@
                     logger.severe(
                     "LHS is of type Boolean but RHS is not of type Boolean");
                     
-                    throw new SPLException(
-                            "LHS is of type Boolean but RHS is not of type Boolean");
+                    throw new SPLException(Messages.getString(
+							"SPL_TYPE_NOT_COMPATIBLE_EXCEPTION_MSG",
+							new Object[] { leftType, rightType }));
                 }
             }
             else
@@ -391,8 +407,9 @@
                 logger.severe(
                 "Operation is of type Boolean but LHS is not of type boolean");
                 
-                throw new SPLException(
-                        "Operation is of type Boolean but LHS is not of type boolean");
+                throw new SPLException(Messages.getString(
+						"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+								"left", "is not", "boolean" }));
             }
         }
         else if (operationString.equalsIgnoreCase(EQUAL)
@@ -421,8 +438,9 @@
                 logger.severe(
                 "types are not assignable for Relation or Equality");
                 
-                throw new SPLException(
-                        "types are not assignable for Relation or Equality");
+                throw new SPLException(Messages.getString(
+						"SPL_TYPE_NOT_COMPATIBLE_EXCEPTION_MSG",
+						new Object[] { leftType, rightType }));
             }
         }
         else
@@ -430,9 +448,7 @@
             logger.severe(
             "operationString is not supported by AnyInCollection");
             
-            throw new SPLException(
-                    "operationString is not supported by AnyInCollection");
-        }
+            throw new SPLException(Messages.getString("SPL_OPERATION_NOT_SUPPORTED_EXCEPTION_MSG"));        }
         
     }
 

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ApplyToCollection.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ApplyToCollection.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ApplyToCollection.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ApplyToCollection.java Mon Aug 18 05:50:36 2008
@@ -38,6 +38,7 @@
 import org.apache.imperius.spl.parser.util.ExpressionUtility;
 import org.apache.imperius.spl.parser.util.TypeInfo;
 import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -81,9 +82,8 @@
 
                 logger.severe
                ("validation error: wrong data type passed in"+ this._dataType);
-                throw new SPLException(
-                        "validation error: wrong data type passed in "
-                                + this._dataType);
+                throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ApplyToCollection");
@@ -107,7 +107,10 @@
             if (!(rhsResult instanceof java.util.List))
             {
                 //System.out.println("rhsResult is not of type List");
-                throw new SPLException("rhsResult is not of type List");
+                throw new SPLException(Messages.getString(
+    					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG",
+    					new Object[] { "RHS","is not", "List" }));
+
             }
             List resultList = new ArrayList();
             ArrayList rhsResultArray = (ArrayList) rhsResult;
@@ -168,8 +171,9 @@
                 logger.severe(
                 "the RHS of ApplyToCollection expression is null BasicCollection");
                 
-                throw new IllegalParameterTypeException(
-                        "the RHS of ApplyToCollection expression is null BasicCollection");
+                throw new IllegalParameterTypeException(Messages.getString(
+    					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+    							"Right", "is null", "" }));
             }
         }
         else
@@ -178,8 +182,9 @@
             "the RHS of ApplyToCollection expression should be of BasicCollection type");
             
             
-            throw new IllegalParameterTypeException(
-                    "the RHS of ApplyToCollection expression should be of BasicCollection type");
+            throw new IllegalParameterTypeException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+							"Right", "should be", "BasicCollection" }));
         }
         
     }
@@ -207,7 +212,9 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"First Expression cannot be a collection");
             
-            throw new SPLException("First Expression cannot be a collection");
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+							"right", "should not", "collection" }));
         }
         
         if (!TypeResolver.isString(middleType))
@@ -215,24 +222,28 @@
             logger.severe(
             "Middle Expression should be a string describing the Operation");
             
-            throw new SPLException(
-                    "Middle Expression should be a string describing the Operation");
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG", new Object[] {
+							"middle", "should", "string" }));
         }
         this._operationString = (String) expression2.evaluate();
         if (this._operationString == null)
         {
             logger.severe(Thread.currentThread().getName()+" "+"Operation string is null");
             
-            throw new SPLException("Operation string is null");
-        }
-        if (this._operationString == null)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"Operation type is "
-                    + this._operationString);
-            
-            throw new SPLException("Operation type is "
-                    + this._operationString);
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_ERROR_MSG", new Object[] {
+							"middle" }));
+
         }
+//        if (this._operationString == null)
+//        {
+//            logger.severe(Thread.currentThread().getName()+" "+"Operation type is "
+//                    + this._operationString);
+//            
+//            throw new SPLException("Operation type is "
+//                    + this._operationString);
+//        }
         
         if (_operationString.equalsIgnoreCase(DIV)
                 || _operationString.equalsIgnoreCase(PLUS)
@@ -257,8 +268,9 @@
                     "RHS is not numeric, and hence not applicable to ApplyToCollection");
                     
                     
-                    throw new SPLException(
-                            "RHS is not numeric, and hence not applicable to ApplyToCollection");
+                    throw new SPLException(Messages.getString(
+							"SPL_TYPE_NOT_COMPATIBLE_EXCEPTION_MSG",
+							new Object[] { leftType, rightType }));
                 }
             }
             else
@@ -267,16 +279,16 @@
                 "LHS is not numeric, and hence not applicable to ApplyToCollection");
                 
                 
-                throw new SPLException(
-                        "LHS is not numeric, and hence not applicable to ApplyToCollection");
+                throw new SPLException(Messages.getString(
+						"SPL_TYPE_NOT_COMPATIBLE_EXCEPTION_MSG",
+						new Object[] { leftType, rightType }));
             }
         }
         else
         {
             logger.severe(
             "operationString is not supported by ApplyToCollection");
-            throw new SPLException(
-                    "operationString is not supported by ApplyToCollection");
+            throw new SPLException(Messages.getString("SPL_OPERATION_NOT_SUPPORTED_EXCEPTION_MSG"));        
         }
     }
 

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AssignmentExpression.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AssignmentExpression.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AssignmentExpression.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AssignmentExpression.java Mon Aug 18 05:50:36 2008
@@ -36,6 +36,7 @@
 import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
 import org.apache.imperius.spl.parser.util.TypeInfo;
 import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -94,7 +95,10 @@
         if (!TypeResolver.isTypeAssignableForEquality(lType, rType))
         {
             logger.severe(Thread.currentThread().getName()+" "+"Types not compatible");
-            throw new TypesNotAssignableException("Types not compatible");
+            
+            throw new TypesNotAssignableException(Messages.getString(
+					"SPL_TYPE_NOT_COMPATIBLE_EXCEPTION_MSG", new Object[] {
+							lType, rType }));
         }
         _dataType.copy(rType);
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AvrgInCollection.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AvrgInCollection.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AvrgInCollection.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/AvrgInCollection.java Mon Aug 18 05:50:36 2008
@@ -34,6 +34,7 @@
 import org.apache.imperius.spl.parser.exceptions.SPLException;
 import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
 import org.apache.imperius.spl.parser.util.ExpressionUtility;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -64,9 +65,8 @@
             		   +"validation error: wrong data type passed in "
                        + this._dataType);
                
-                throw new SPLException(
-                        "validation error: wrong data type passed in "
-                                + this._dataType);
+               throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         
@@ -88,8 +88,9 @@
         if (!(expResult instanceof java.util.List))
         {
             logger.severe(Thread.currentThread().getName()+" "+"result of expression is not of type List");
-            throw new SPLException(
-                    "result of expression is not of type List");
+            throw new SPLException(Messages.getString(
+					"SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG",
+					new Object[] { "","is not", "List" }));
         }
         ArrayList resultArray = (ArrayList) expResult;
         Integer size = new Integer(resultArray.size());
@@ -124,7 +125,9 @@
         else
         {
             logger.severe(Thread.currentThread().getName()+" "+"result Array is empty");
-            throw new SPLException("result Array is empty");
+            throw new SPLException(Messages.getString(
+					"SPL_BLANK_EXPRESSION_PASSED_ERROR_MSG",
+					new Object[] { "" }));
         }
         
     }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Ceiling.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Ceiling.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Ceiling.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Ceiling.java Mon Aug 18 05:50:36 2008
@@ -17,7 +17,6 @@
  * under the License.  
  */
 //
-
 /**
  * @author Prashant Baliga <prabalig@in.ibm.com>
  *
@@ -33,106 +32,120 @@
 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.Messages;
 import org.apache.imperius.util.SPLLogger;
 
-
 public class Ceiling extends SingleArgumentExpression implements
-        NumericExpression
+		NumericExpression 
 {
-    
-    public static final String className = Ceiling.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="Ceiling";
-    
-    
-    
-    public Ceiling(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Ceiling");
-
-        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()+" "+ "Ceiling");
-     
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        
-        try
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-        
-            return ceiling((Number) _exp.evaluate());
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
-            
-            throw new SPLException("evaluation error: " + e.toString());
-        }
-    }
-    
-    public static Number ceiling(Number o)
-    {
-
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "ceiling");
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ceiling");
-     
-        return new Double(Math.ceil(o.doubleValue()));
-    }
-    
-    public boolean validate() throws SPLException
-    {
-
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo eType = _exp.getType();
-        
-        _dataType.setType(TypeConstants.intType);
-        if (TypeResolver.isNumeric(eType))
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-     
-        return false;
-    }
 
-	public String getReferenceTypeName() throws SPLException {
+	public static final String className = Ceiling.class.getName();
+
+	private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+	
+	private static final String sourceClass = "Ceiling";
+
+	public Ceiling(List exprList, boolean validateExpression)
+			throws SPLException 
+	{
+		super(exprList);
+
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "Ceiling");
+
+		if (validateExpression) 
+		{
+			if (!validate()) 
+			{
+				logger.severe(Thread.currentThread().getName() + " "
+						+ "validation error: " + className
+						+ " has wrong data type passed in.");
+				throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
+			}
+		}
+
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "Ceiling");
+
+	}
+
+	public Object evaluate() throws SPLException 
+	{
+
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "evaluate");
+
+		try 
+		{
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "evaluate");
+
+			return ceiling((Number) _exp.evaluate());
+		}
+		catch (Exception e) 
+		{
+			logger.severe(Thread.currentThread().getName() + " "
+					+ "evaluation error: " + e.toString());
+
+			throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+		}
+	}
+
+	public static Number ceiling(Number o) 
+	{
+
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "ceiling");
+
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "ceiling");
+
+		return new Double(Math.ceil(o.doubleValue()));
+	}
+
+	public boolean validate() throws SPLException 
+	{
+
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "validate");
+
+		TypeInfo eType = _exp.getType();
+
+		_dataType.setType(TypeConstants.intType);
+		if (TypeResolver.isNumeric(eType)) 
+		{
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "validate");
+
+			return true;
+		}
+
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "validate");
+
+		return false;
+	}
+
+	public String getReferenceTypeName() throws SPLException 
+	{
 		// TODO Auto-generated method stub
 		return null;
 	}
-	
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-
-        String str = "Ceiling("+ this._exp.toString() + ")";
-        	
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
-    
+
+	public String toString() 
+	{
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "toString");
+
+		String str = "Ceiling(" + this._exp.toString() + ")";
+
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "toString");
+
+		return str;
+	}
+
 }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Concatenate.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Concatenate.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Concatenate.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Concatenate.java Mon Aug 18 05:50:36 2008
@@ -17,7 +17,6 @@
  * under the License.  
  */
 //
-
 /**
  * @author Prashant Baliga <prabalig@in.ibm.com>
  *
@@ -33,91 +32,102 @@
 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.Messages;
 import org.apache.imperius.util.SPLLogger;
 
-
 public class Concatenate extends DoubleArgumentExpression implements
-        StringExpression
-{
-    
-    public static final String className = Concatenate.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="Concatenate";
-    
-    
-    
-    public Concatenate(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Concatenate");
-
-        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()+" "+ "Concatenate");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        try
-        {
-            String s0 = (String) _lhsExp.evaluate();
-            String s1 = (String) _rhsExp.evaluate();
-
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-        
-            return new String(s0 + s1);
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + toString());
-            
-            throw new SPLException("evaluation error: " + toString());
-        }
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo lType = _lhsExp.getType();
-        TypeInfo rType = _rhsExp.getType();
-        
-        if (TypeResolver.isString(lType) && TypeResolver.isString(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 str = "Concatenate("+ this._lhsExp.toString() + "," + this._rhsExp.toString() + ")";
-        	
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
-    
+		StringExpression {
+
+	public static final String className = Concatenate.class.getName();
+
+	private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+	private static final String sourceClass = "Concatenate";
+
+	public Concatenate(List exprList, boolean validateExpression)
+			throws SPLException 
+	{
+		super(exprList);
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "Concatenate");
+
+		if (validateExpression) 
+		{
+			if (!validate()) 
+			{
+				logger.severe(Thread.currentThread().getName() + " "
+						+ "validation error: " + className
+						+ " has wrong data type passed in.");
+
+				throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
+			}
+		}
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "Concatenate");
+
+	}
+
+	public Object evaluate() throws SPLException 
+	{
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "evaluate");
+
+		try 
+		{
+			String s0 = (String) _lhsExp.evaluate();
+			String s1 = (String) _rhsExp.evaluate();
+
+			logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+					+ "evaluate");
+
+			return new String(s0 + s1);
+		}
+		catch (Exception e) 
+		{
+			logger.severe(Thread.currentThread().getName() + " "
+					+ "evaluation error: " + toString());
+
+			throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+		}
+	}
+
+	public boolean validate() throws SPLException 
+	{
+		logger.entering(sourceClass, Thread.currentThread().getName() + " "
+				+ "validate");
+
+		TypeInfo lType = _lhsExp.getType();
+		TypeInfo rType = _rhsExp.getType();
+
+		if (TypeResolver.isString(lType) && TypeResolver.isString(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 str = "Concatenate(" + this._lhsExp.toString() + ","
+				+ this._rhsExp.toString() + ")";
+
+		logger.exiting(sourceClass, Thread.currentThread().getName() + " "
+				+ "toString");
+
+		return str;
+	}
+
 }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ConstantExpression.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ConstantExpression.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ConstantExpression.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ConstantExpression.java Mon Aug 18 05:50:36 2008
@@ -17,7 +17,6 @@
  * under the License.  
  */
 //
-
 /**
  * @author Prashant Baliga <prabalig@in.ibm.com>
  *
@@ -27,22 +26,25 @@
 import org.apache.imperius.spl.external.Expression;
 import org.apache.imperius.spl.parser.exceptions.SPLException;
 import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.util.Messages;
 
-
-public abstract class ConstantExpression implements Expression
+public abstract class ConstantExpression implements Expression 
 {
-    
-    public abstract Object evaluate() throws SPLException;
-    
-    public abstract TypeInfo getType();
-    
-    public boolean validate()
-    {
-        return true;
-    }
-    public String getReferenceTypeName() throws SPLException
-    {
-    	throw new SPLException("Expression not of reference type");
-    }
-    
+
+	public abstract Object evaluate() throws SPLException;
+
+	public abstract TypeInfo getType();
+
+	public boolean validate() 
+	{
+		return true;
+	}
+
+	public String getReferenceTypeName() throws SPLException 
+	{
+		throw new SPLException(Messages.getString(
+				"SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG",
+				new Object[] { "reference" }));
+	}
+
 }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Contains.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Contains.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Contains.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Contains.java Mon Aug 18 05:50:36 2008
@@ -33,6 +33,7 @@
 import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
 import org.apache.imperius.spl.parser.util.TypeInfo;
 import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -60,8 +61,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Contains");
@@ -85,7 +86,9 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyDigits.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyDigits.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyDigits.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyDigits.java Mon Aug 18 05:50:36 2008
@@ -33,6 +33,7 @@
 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.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -60,8 +61,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ContainsOnlyDigits");
@@ -99,7 +100,9 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyLetters.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyLetters.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyLetters.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyLetters.java Mon Aug 18 05:50:36 2008
@@ -33,6 +33,7 @@
 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.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -60,8 +61,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ContainsOnlyLetters");
@@ -101,7 +102,10 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyLettersOrDigits.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyLettersOrDigits.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyLettersOrDigits.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/ContainsOnlyLettersOrDigits.java Mon Aug 18 05:50:36 2008
@@ -33,6 +33,7 @@
 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.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -61,8 +62,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+						"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "ContainsOnlyLettersOrDigits");
@@ -102,7 +103,10 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/DateTimeConstant.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/DateTimeConstant.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/DateTimeConstant.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/DateTimeConstant.java Mon Aug 18 05:50:36 2008
@@ -35,6 +35,7 @@
 import org.apache.imperius.spl.parser.expressions.TimeZoneExpression;
 import org.apache.imperius.spl.parser.util.ExpressionUtility;
 import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -127,7 +128,10 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+
         }
         
     }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Division.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Division.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Division.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Division.java Mon Aug 18 05:50:36 2008
@@ -34,6 +34,7 @@
 import org.apache.imperius.spl.parser.expressions.NumericExpression;
 import org.apache.imperius.spl.parser.util.TypeInfo;
 import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -69,8 +70,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+    					"SPL_VALIDATION_ERROR_MSG", new Object[] { className}));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Division");
@@ -104,7 +105,10 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EndsWith.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EndsWith.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EndsWith.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EndsWith.java Mon Aug 18 05:50:36 2008
@@ -33,6 +33,7 @@
 import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
 import org.apache.imperius.spl.parser.util.TypeInfo;
 import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -61,8 +62,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+    					"SPL_VALIDATION_ERROR_MSG", new Object[] { className}));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "EndsWith");
@@ -86,7 +87,10 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EqCollections.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EqCollections.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EqCollections.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EqCollections.java Mon Aug 18 05:50:36 2008
@@ -32,6 +32,7 @@
 import org.apache.imperius.spl.external.TypeConstants;
 import org.apache.imperius.spl.parser.exceptions.SPLException;
 import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -63,9 +64,8 @@
             if (!validate())
             {
                 logger.severe(Thread.currentThread().getName()+" "+"validation error: wrong data type passed in");
-                throw new SPLException(
-                        "validation error: wrong data type passed in "
-                                + this._dataType);
+                throw new SPLException(Messages.getString(
+    					"SPL_VALIDATION_ERROR_MSG", new Object[] { className}));
             }
             
         }
@@ -85,7 +85,9 @@
         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");
+            throw new SPLException(Messages.getString(
+					"SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG",
+					new Object[] { "List" }));
         }
         else
         {
@@ -95,7 +97,9 @@
         {
 
             logger.severe(Thread.currentThread().getName()+" "+"rhsResult is not of type List");
-            throw new SPLException("rhsResult is not of type List");
+            throw new SPLException(Messages.getString(
+					"SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG",
+					new Object[] { "List" }));
         }
         else
         {

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Equal.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Equal.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Equal.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Equal.java Mon Aug 18 05:50:36 2008
@@ -34,6 +34,7 @@
 import org.apache.imperius.spl.parser.util.ExpressionUtility;
 import org.apache.imperius.spl.parser.util.TypeInfo;
 import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -68,8 +69,8 @@
             {
                 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.");
+                throw new SPLException(Messages.getString(
+    					"SPL_VALIDATION_ERROR_MSG", new Object[] {className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Equal");
@@ -107,7 +108,10 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Exp.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Exp.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Exp.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Exp.java Mon Aug 18 05:50:36 2008
@@ -33,6 +33,7 @@
 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.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -60,8 +61,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+    					"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Exp");
@@ -82,8 +83,9 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
         
-            
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Floor.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Floor.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Floor.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Floor.java Mon Aug 18 05:50:36 2008
@@ -33,6 +33,7 @@
 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.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -60,8 +61,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+    					"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Floor");
@@ -82,7 +83,10 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetCurrentTime.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetCurrentTime.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetCurrentTime.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetCurrentTime.java Mon Aug 18 05:50:36 2008
@@ -32,6 +32,7 @@
 import org.apache.imperius.spl.parser.exceptions.SPLException;
 import org.apache.imperius.spl.parser.expressions.NumericExpression;
 import org.apache.imperius.spl.parser.expressions.ZeroArgumentExpression;
+import org.apache.imperius.util.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -59,8 +60,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+    					"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "GetCurrentTime");
@@ -89,7 +90,10 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetDayOfMonth.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetDayOfMonth.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetDayOfMonth.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetDayOfMonth.java Mon Aug 18 05:50:36 2008
@@ -34,6 +34,7 @@
 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.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -61,8 +62,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+    					"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "GetDayOfMonth");
@@ -87,8 +88,9 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
         }
     }
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetDayOfWeek.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetDayOfWeek.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetDayOfWeek.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/GetDayOfWeek.java Mon Aug 18 05:50:36 2008
@@ -34,6 +34,7 @@
 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.Messages;
 import org.apache.imperius.util.SPLLogger;
 
 
@@ -62,8 +63,8 @@
                 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.");
+                throw new SPLException(Messages.getString(
+    					"SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
             }
         }
         logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "GetDayOfWeek");
@@ -116,7 +117,10 @@
         {
             logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
             
-            throw new SPLException("evaluation error: " + e.toString());
+            throw new SPLException(Messages.getString(
+					"SPL_EVALUATION_ERROR_MSG", new Object[] { e
+							.getLocalizedMessage() }));
+
         }
     }
     
@@ -136,7 +140,9 @@
         }
         else
         {
-        	throw new SPLException("Invalid input type " + eType + " for getDayOfWeek");
+        	throw new SPLException(Messages.getString(
+					"SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG",
+					new Object[] { eType }));
         }
 
         



Mime
View raw message