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 public class FunctionCOUNT extends AggregateFunctionCall { 32 33 private static final String RCSRevision = "$Revision: 1.6 $"; 34 private static final String RCSName = "$Name: $"; 35 36 40 public void accept(ParserVisitor visitor) throws XQueryException { 41 visitor.visit(this); 42 } 43 44 48 public FunctionCOUNT(ArrayList args, XQueryModule parentModule) throws TypeException, XQueryException { 49 super(new QName("count",null),args); 50 setParentModule(parentModule); 51 if (parentModule != null && parentModule.getStaticContext().getTypeVisitor() != null) 52 accept(parentModule.getStaticContext().getTypeVisitor()); 53 } 54 55 public void setArguments(ArrayList arguments) throws XQueryException { 56 if (arguments == null || arguments.size() != 1) throw new XQueryException("Function count should have one argument"); 57 super.setArguments(arguments); 58 } 59 60 } 61 62 63 | Popular Tags |