1 22 23 24 package org.xquark.xquery.parser.primitivefunctions.fnfunctions; 25 26 import java.util.ArrayList ; 27 28 import org.xquark.xquery.parser.*; 29 import org.xquark.xquery.typing.TypeException; 30 31 33 public class FunctionSUM extends AggregateFunctionCall { 34 35 private static final String RCSRevision = "$Revision: 1.6 $"; 36 private static final String RCSName = "$Name: $"; 37 38 42 public void accept(ParserVisitor visitor) throws XQueryException { 43 visitor.visit(this); 44 } 45 46 50 public FunctionSUM(ArrayList args, XQueryModule parentModule) throws TypeException, XQueryException { 51 super(new QName("sum",null),args); 52 setParentModule(parentModule); 53 if (parentModule != null && parentModule.getStaticContext().getTypeVisitor() != null) 54 accept(parentModule.getStaticContext().getTypeVisitor()); 55 } 56 57 public void setArguments(ArrayList arguments) throws XQueryException { 59 if (arguments == null || arguments.size() != 1) throw new XQueryException("Function sum should have one argument"); 60 super.setArguments(arguments); 61 } 62 63 } 64 65 66 | Popular Tags |