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 FunctionDISTINCT_VALUES extends PrimitiveFunctionCall { 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 FunctionDISTINCT_VALUES(ArrayList args, XQueryModule parentModule) throws TypeException, XQueryException { 49 super(new QName("distinct-values",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 { 58 if (arguments == null || arguments.size() != 1) 59 throw new XQueryException("Only partial specification has been implemented, function distinct-values should have one argument"); 60 super.setArguments(arguments); 61 } 62 63 public ArrayList getXTrees() { 64 return ((XQueryExpression)arguments.get(0)).getXTrees(); 65 } 66 67 } 68 69 70 | Popular Tags |