You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by vi...@apache.org on 2012/06/15 04:00:36 UTC
svn commit: r1350443 [1/2] - in
/incubator/vxquery/branches/vxquery_algebricks:
vxquery-cli/src/main/java/org/apache/vxquery/cli/
vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/
vxquery-core/src/main/java/org/apache/vxquery/context/ ...
Author: vinayakb
Date: Fri Jun 15 02:00:34 2012
New Revision: 1350443
URL: http://svn.apache.org/viewvc?rev=1350443&view=rev
Log:
Added equals() and hashCode() to types. Added type management to context.
Added:
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/CodedQNamePointable.java
- copied, changed from r1348794, incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/QNamePointable.java
Removed:
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/QNamePointable.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/ComposedType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/Composer.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/QuantifiedType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/TypeOperations.java
Modified:
incubator/vxquery/branches/vxquery_algebricks/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryExpressionJobGen.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/DelegatingStaticContextImpl.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/RootStaticContextImpl.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/StaticContext.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/StaticContextImpl.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/AttributeNodePointable.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/ElementNodePointable.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-functions.xml
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-operators.xml
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyItemType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyNodeType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnySimpleType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AttributeType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/BuiltinAtomicType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/BuiltinTypeConstants.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/BuiltinTypeRegistry.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/CommentType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/DocumentType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/ElementType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/EmptySequenceType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/NameTest.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/NoneType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/ProcessingInstructionType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/SequenceType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/TextType.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java Fri Jun 15 02:00:34 2012
@@ -85,72 +85,76 @@ public class VXQuery {
if (!opts.compileOnly) {
startLocalHyracks();
}
- for (String query : opts.arguments) {
- String qStr = slurp(query);
- if (opts.showQuery) {
- System.err.println(qStr);
- }
- XQueryCompilationListener listener = new XQueryCompilationListener() {
- @Override
- public void notifyCodegenResult(Module module) {
- if (opts.showRP) {
- JobSpecification jobSpec = module.getHyracksJobSpecification();
- System.err.println(jobSpec.toString());
- }
+ try {
+ for (String query : opts.arguments) {
+ String qStr = slurp(query);
+ if (opts.showQuery) {
+ System.err.println(qStr);
}
+ XQueryCompilationListener listener = new XQueryCompilationListener() {
+ @Override
+ public void notifyCodegenResult(Module module) {
+ if (opts.showRP) {
+ JobSpecification jobSpec = module.getHyracksJobSpecification();
+ System.err.println(jobSpec.toString());
+ }
+ }
- @Override
- public void notifyTranslationResult(Module module) {
- if (opts.showTET) {
- try {
- LogicalOperatorPrettyPrintVisitor v = new LogicalOperatorPrettyPrintVisitor();
- StringBuilder buffer = new StringBuilder();
- PlanPrettyPrinter.printPlan(module.getBody(), buffer, v, 0);
- System.err.println(buffer.toString());
- } catch (AlgebricksException e) {
- e.printStackTrace();
+ @Override
+ public void notifyTranslationResult(Module module) {
+ if (opts.showTET) {
+ try {
+ LogicalOperatorPrettyPrintVisitor v = new LogicalOperatorPrettyPrintVisitor();
+ StringBuilder buffer = new StringBuilder();
+ PlanPrettyPrinter.printPlan(module.getBody(), buffer, v, 0);
+ System.err.println(buffer.toString());
+ } catch (AlgebricksException e) {
+ e.printStackTrace();
+ }
}
}
- }
- @Override
- public void notifyTypecheckResult(Module module) {
- }
+ @Override
+ public void notifyTypecheckResult(Module module) {
+ }
- @Override
- public void notifyOptimizedResult(Module module) {
- if (opts.showOET) {
- try {
- LogicalOperatorPrettyPrintVisitor v = new LogicalOperatorPrettyPrintVisitor();
- StringBuilder buffer = new StringBuilder();
- PlanPrettyPrinter.printPlan(module.getBody(), buffer, v, 0);
- System.err.println(buffer.toString());
- } catch (AlgebricksException e) {
- e.printStackTrace();
+ @Override
+ public void notifyOptimizedResult(Module module) {
+ if (opts.showOET) {
+ try {
+ LogicalOperatorPrettyPrintVisitor v = new LogicalOperatorPrettyPrintVisitor();
+ StringBuilder buffer = new StringBuilder();
+ PlanPrettyPrinter.printPlan(module.getBody(), buffer, v, 0);
+ System.err.println(buffer.toString());
+ } catch (AlgebricksException e) {
+ e.printStackTrace();
+ }
}
}
- }
- @Override
- public void notifyParseResult(ModuleNode moduleNode) {
- if (opts.showAST) {
- System.err.println(new XStream(new DomDriver()).toXML(moduleNode));
+ @Override
+ public void notifyParseResult(ModuleNode moduleNode) {
+ if (opts.showAST) {
+ System.err.println(new XStream(new DomDriver()).toXML(moduleNode));
+ }
}
+ };
+ File result = createTempFile("test");
+ XMLQueryCompiler compiler = new XMLQueryCompiler(listener);
+ CompilerControlBlock ccb = new CompilerControlBlock(new StaticContextImpl(
+ RootStaticContextImpl.INSTANCE), new FileSplit[] { new FileSplit("nc1",
+ result.getAbsolutePath()) });
+ compiler.compile(query, new StringReader(qStr), ccb, opts.optimizationLevel);
+ if (opts.compileOnly) {
+ continue;
}
- };
- File result = createTempFile("test");
- XMLQueryCompiler compiler = new XMLQueryCompiler(listener);
- CompilerControlBlock ccb = new CompilerControlBlock(new StaticContextImpl(RootStaticContextImpl.INSTANCE),
- new FileSplit[] { new FileSplit("nc1", result.getAbsolutePath()) });
- compiler.compile(query, new StringReader(qStr), ccb, opts.optimizationLevel);
- if (opts.compileOnly) {
- continue;
- }
- runInProcess(compiler.getModule().getHyracksJobSpecification(), result);
- }
- if (!opts.compileOnly) {
- stopLocalHyracks();
+ runInProcess(compiler.getModule().getHyracksJobSpecification(), result);
+ }
+ } finally {
+ if (!opts.compileOnly) {
+ stopLocalHyracks();
+ }
}
}
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryExpressionJobGen.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryExpressionJobGen.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryExpressionJobGen.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryExpressionJobGen.java Fri Jun 15 02:00:34 2012
@@ -11,47 +11,47 @@ import edu.uci.ics.hyracks.algebricks.co
import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.UnnestingFunctionCallExpression;
import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.IOperatorSchema;
import edu.uci.ics.hyracks.algebricks.core.jobgen.impl.JobGenContext;
-import edu.uci.ics.hyracks.algebricks.runtime.base.IAggregateFunctionFactory;
-import edu.uci.ics.hyracks.algebricks.runtime.base.IEvaluatorFactory;
-import edu.uci.ics.hyracks.algebricks.runtime.base.IRunningAggregateFunctionFactory;
-import edu.uci.ics.hyracks.algebricks.runtime.base.ISerializableAggregateFunctionFactory;
-import edu.uci.ics.hyracks.algebricks.runtime.base.IUnnestingFunctionFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyAggregateFunctionFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyRunningAggregateFunctionFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopySerializableAggregateFunctionFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyUnnestingFunctionFactory;
import edu.uci.ics.hyracks.algebricks.runtime.evaluators.ConstantEvalFactory;
public class VXQueryExpressionJobGen implements ILogicalExpressionJobGen {
@Override
- public IEvaluatorFactory createEvaluatorFactory(ILogicalExpression expr, IVariableTypeEnvironment env,
+ public ICopyEvaluatorFactory createEvaluatorFactory(ILogicalExpression expr, IVariableTypeEnvironment env,
IOperatorSchema[] inputSchemas, JobGenContext context) throws AlgebricksException {
if (expr.getExpressionTag() == LogicalExpressionTag.CONSTANT) {
VXQueryConstantValue cv = (VXQueryConstantValue) ((ConstantExpression) expr).getValue();
return new ConstantEvalFactory(cv.getValue());
}
- return null;
+ throw new UnsupportedOperationException("Cannot create runtime for " + expr.getExpressionTag());
}
@Override
- public IAggregateFunctionFactory createAggregateFunctionFactory(AggregateFunctionCallExpression expr,
+ public ICopyAggregateFunctionFactory createAggregateFunctionFactory(AggregateFunctionCallExpression expr,
IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
throws AlgebricksException {
return null;
}
@Override
- public ISerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory(
+ public ICopySerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory(
AggregateFunctionCallExpression expr, IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas,
JobGenContext context) throws AlgebricksException {
return null;
}
@Override
- public IRunningAggregateFunctionFactory createRunningAggregateFunctionFactory(StatefulFunctionCallExpression expr,
- IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
- throws AlgebricksException {
+ public ICopyRunningAggregateFunctionFactory createRunningAggregateFunctionFactory(
+ StatefulFunctionCallExpression expr, IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas,
+ JobGenContext context) throws AlgebricksException {
return null;
}
@Override
- public IUnnestingFunctionFactory createUnnestingFunctionFactory(UnnestingFunctionCallExpression expr,
+ public ICopyUnnestingFunctionFactory createUnnestingFunctionFactory(UnnestingFunctionCallExpression expr,
IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
throws AlgebricksException {
return null;
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/DelegatingStaticContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/DelegatingStaticContextImpl.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/DelegatingStaticContextImpl.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/DelegatingStaticContextImpl.java Fri Jun 15 02:00:34 2012
@@ -222,6 +222,21 @@ public abstract class DelegatingStaticCo
}
@Override
+ public int lookupSequenceType(SequenceType type) {
+ return parent.lookupSequenceType(type);
+ }
+
+ @Override
+ public int encodeSequenceType(SequenceType type) {
+ return parent.encodeSequenceType(type);
+ }
+
+ @Override
+ public int getMaxSequenceTypeCode() {
+ return parent.getMaxSequenceTypeCode();
+ }
+
+ @Override
public void registerVariable(XQueryVariable var) {
parent.registerVariable(var);
}
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/RootStaticContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/RootStaticContextImpl.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/RootStaticContextImpl.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/RootStaticContextImpl.java Fri Jun 15 02:00:34 2012
@@ -28,6 +28,7 @@ import org.apache.vxquery.functions.Func
import org.apache.vxquery.types.AttributeType;
import org.apache.vxquery.types.BuiltinTypeRegistry;
import org.apache.vxquery.types.ElementType;
+import org.apache.vxquery.types.ItemType;
import org.apache.vxquery.types.SchemaType;
import org.apache.vxquery.types.SequenceType;
import org.apache.vxquery.xmlquery.query.XQueryConstants;
@@ -51,17 +52,25 @@ public final class RootStaticContextImpl
INSTANCE.setDefaultFunctionNamespaceUri(XQueryConstants.FN_NSURI);
// Types
- for (Map.Entry<QName, SchemaType> type : BuiltinTypeRegistry.TYPE_MAP.entrySet()) {
- INSTANCE.registerSchemaType(type.getKey(), type.getValue());
+ for (Map.Entry<QName, SchemaType> e : BuiltinTypeRegistry.TYPE_MAP.entrySet()) {
+ QName typeName = e.getKey();
+ SchemaType type = e.getValue();
+ INSTANCE.registerSchemaType(typeName, type);
+ }
+
+ for (Map.Entry<ItemType, SequenceType[]> e : SequenceType.BUILTIN_SEQ_TYPES.entrySet()) {
+ for (SequenceType st : e.getValue()) {
+ INSTANCE.encodeSequenceType(st);
+ }
}
// Functions
for (Function fn : BuiltinFunctions.FUNCTION_COLLECTION) {
INSTANCE.registerFunction(fn);
}
-
+
INSTANCE.registerCollation(CodepointCollation.URI, CodepointCollation.INSTANCE);
-
+
INSTANCE.setDefaultCollation(CodepointCollation.URI);
((RootStaticContextImpl) INSTANCE).sealed = true;
@@ -140,6 +149,12 @@ public final class RootStaticContextImpl
}
@Override
+ public int encodeSequenceType(SequenceType type) {
+ checkSealed();
+ return super.encodeSequenceType(type);
+ }
+
+ @Override
public void setBaseUri(String baseUri) {
checkSealed();
super.setBaseUri(baseUri);
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/StaticContext.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/StaticContext.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/StaticContext.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/StaticContext.java Fri Jun 15 02:00:34 2012
@@ -30,103 +30,109 @@ import org.apache.vxquery.types.SchemaTy
import org.apache.vxquery.types.SequenceType;
public interface StaticContext {
- public abstract DataspaceContext getDataspaceContext();
+ public DataspaceContext getDataspaceContext();
- public abstract StaticContext getParent();
+ public StaticContext getParent();
public String lookupNamespaceUri(String prefix);
public void registerNamespaceUri(String prefix, String uri);
- public abstract Collation lookupCollation(String collationName);
+ public Collation lookupCollation(String collationName);
- public abstract void registerCollation(String collationName, Collation collation);
+ public void registerCollation(String collationName, Collation collation);
- public abstract Function lookupFunction(QName functionName, int arity);
+ public Function lookupFunction(QName functionName, int arity);
- public abstract Function[] lookupFunctions(QName functionName);
+ public Function[] lookupFunctions(QName functionName);
- public abstract void registerFunction(Function function);
+ public void registerFunction(Function function);
- public abstract Iterator<Function> listFunctions();
+ public Iterator<Function> listFunctions();
- public abstract SequenceType lookupDocumentType(String docUri);
+ public SequenceType lookupDocumentType(String docUri);
- public abstract void registerDocumentType(String docUri, SequenceType type);
+ public void registerDocumentType(String docUri, SequenceType type);
- public abstract XQueryVariable lookupVariable(QName name);
+ public XQueryVariable lookupVariable(QName name);
- public abstract void registerVariable(XQueryVariable var);
+ public void registerVariable(XQueryVariable var);
- public abstract Iterator<XQueryVariable> listVariables();
+ public Iterator<XQueryVariable> listVariables();
- public abstract SequenceType lookupCollectionType(String collectionUri);
+ public SequenceType lookupCollectionType(String collectionUri);
- public abstract void registerCollectionType(String collectionUri, SequenceType type);
+ public void registerCollectionType(String collectionUri, SequenceType type);
- public abstract Iterator<Pair<String, List<String>>> listModules();
+ public Iterator<Pair<String, List<String>>> listModules();
- public abstract void registerModuleImport(String uri, List<String> locations);
+ public void registerModuleImport(String uri, List<String> locations);
- public abstract Iterator<Pair<String, List<String>>> listSchemas();
+ public Iterator<Pair<String, List<String>>> listSchemas();
- public abstract void registerSchemaImport(String uri, List<String> locations);
+ public void registerSchemaImport(String uri, List<String> locations);
- public abstract SchemaType lookupSchemaType(QName name);
+ public SchemaType lookupSchemaType(QName name);
- public abstract void registerSchemaType(QName name, SchemaType type);
+ public void registerSchemaType(QName name, SchemaType type);
- public abstract AttributeType lookupAttributeDeclaration(QName name);
+ public int lookupSequenceType(SequenceType type);
- public abstract void registerAttributeDeclaration(QName name, AttributeType attrDecl);
+ public int encodeSequenceType(SequenceType type);
- public abstract ElementType lookupElementDeclaration(QName name);
+ public int getMaxSequenceTypeCode();
- public abstract void registerElementDeclaration(QName name, ElementType elemDecl);
+ public AttributeType lookupAttributeDeclaration(QName name);
- public abstract BoundarySpaceProperty getBoundarySpaceProperty();
+ public void registerAttributeDeclaration(QName name, AttributeType attrDecl);
- public abstract void setBoundarySpaceProperty(BoundarySpaceProperty boundarySpaceProperty);
+ public ElementType lookupElementDeclaration(QName name);
- public abstract String getDefaultFunctionNamespaceUri();
+ public void registerElementDeclaration(QName name, ElementType elemDecl);
- public abstract void setDefaultFunctionNamespaceUri(String uri);
+ public BoundarySpaceProperty getBoundarySpaceProperty();
- public abstract String getDefaultElementNamespaceUri();
+ public void setBoundarySpaceProperty(BoundarySpaceProperty boundarySpaceProperty);
- public abstract void setDefaultElementNamespaceUri(String uri);
+ public String getDefaultFunctionNamespaceUri();
- public abstract OrderingModeProperty getOrderingModeProperty();
+ public void setDefaultFunctionNamespaceUri(String uri);
- public abstract void setOrderingModeProperty(OrderingModeProperty orderingMode);
+ public String getDefaultElementNamespaceUri();
- public abstract EmptyOrderProperty getEmptyOrderProperty();
+ public void setDefaultElementNamespaceUri(String uri);
- public abstract void setEmptyOrderProperty(EmptyOrderProperty emptyOrder);
+ public OrderingModeProperty getOrderingModeProperty();
- public abstract String getDefaultCollation();
+ public void setOrderingModeProperty(OrderingModeProperty orderingMode);
- public abstract void setDefaultCollation(String defaultCollation);
+ public EmptyOrderProperty getEmptyOrderProperty();
- public abstract String getBaseUri();
+ public void setEmptyOrderProperty(EmptyOrderProperty emptyOrder);
- public abstract void setBaseUri(String baseUri);
+ public String getDefaultCollation();
- public abstract ConstructionModeProperty getConstructionModeProperty();
+ public void setDefaultCollation(String defaultCollation);
- public abstract void setConstructionModeProperty(ConstructionModeProperty constructionMode);
+ public String getBaseUri();
- public abstract CopyNamespacesModeProperty getCopyNamespacesModeProperty();
+ public void setBaseUri(String baseUri);
- public abstract void setCopyNamespacesModeProperty(CopyNamespacesModeProperty copyNamespacesMode);
+ public ConstructionModeProperty getConstructionModeProperty();
- public abstract SequenceType getDefaultCollectionType();
+ public void setConstructionModeProperty(ConstructionModeProperty constructionMode);
- public abstract void setDefaultCollectionType(SequenceType type);
+ public CopyNamespacesModeProperty getCopyNamespacesModeProperty();
- public abstract void setOption(QName name, String value);
+ public void setCopyNamespacesModeProperty(CopyNamespacesModeProperty copyNamespacesMode);
- public abstract String getOption(QName name);
+ public SequenceType getDefaultCollectionType();
+
+ public void setDefaultCollectionType(SequenceType type);
+
+ public void setOption(QName name, String value);
+
+ public String getOption(QName name);
public enum BoundarySpaceProperty {
PRESERVE,
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/StaticContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/StaticContextImpl.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/StaticContextImpl.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/context/StaticContextImpl.java Fri Jun 15 02:00:34 2012
@@ -18,6 +18,7 @@ package org.apache.vxquery.context;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
@@ -55,6 +56,8 @@ public class StaticContextImpl implement
protected final Map<QName, SchemaType> schemaTypeMap;
+ protected final Map<SequenceType, Integer> sequenceTypeMap;
+
protected final Map<QName, AttributeType> attributeDeclarationMap;
protected final Map<QName, ElementType> elementDeclarationMap;
@@ -81,6 +84,8 @@ public class StaticContextImpl implement
private SequenceType defaultCollectionType;
+ private int typeCounter;
+
public StaticContextImpl(StaticContext parent) {
this.parent = parent;
namespaceMap = new LinkedHashMap<String, String>();
@@ -92,9 +97,11 @@ public class StaticContextImpl implement
moduleImports = new ArrayList<Pair<String, List<String>>>();
schemaImports = new ArrayList<Pair<String, List<String>>>();
schemaTypeMap = new LinkedHashMap<QName, SchemaType>();
+ sequenceTypeMap = new HashMap<SequenceType, Integer>();
attributeDeclarationMap = new LinkedHashMap<QName, AttributeType>();
elementDeclarationMap = new LinkedHashMap<QName, ElementType>();
options = new LinkedHashMap<QName, String>();
+ typeCounter = parent == null ? 0 : parent.getMaxSequenceTypeCode();
}
@Override
@@ -346,6 +353,39 @@ public class StaticContextImpl implement
}
@Override
+ public int lookupSequenceType(SequenceType type) {
+ if (sequenceTypeMap.containsKey(type)) {
+ return sequenceTypeMap.get(type);
+ }
+ if (parent != null) {
+ return parent.lookupSequenceType(type);
+ }
+ return -1;
+ }
+
+ @Override
+ public int encodeSequenceType(SequenceType type) {
+ int code = lookupSequenceType(type);
+ if (code == -1) {
+ code = typeCounter++;
+ sequenceTypeMap.put(type, code);
+ return code;
+ }
+ if (sequenceTypeMap.containsKey(type)) {
+ return sequenceTypeMap.get(type);
+ }
+ if (parent != null) {
+ return parent.lookupSequenceType(type);
+ }
+ return -1;
+ }
+
+ @Override
+ public int getMaxSequenceTypeCode() {
+ return typeCounter;
+ }
+
+ @Override
public AttributeType lookupAttributeDeclaration(QName name) {
if (attributeDeclarationMap.containsKey(name)) {
return attributeDeclarationMap.get(name);
Copied: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/CodedQNamePointable.java (from r1348794, incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/QNamePointable.java)
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/CodedQNamePointable.java?p2=incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/CodedQNamePointable.java&p1=incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/QNamePointable.java&r1=1348794&r2=1350443&rev=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/QNamePointable.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/CodedQNamePointable.java Fri Jun 15 02:00:34 2012
@@ -3,7 +3,7 @@ package org.apache.vxquery.datamodel.acc
import edu.uci.ics.hyracks.data.std.api.AbstractPointable;
import edu.uci.ics.hyracks.data.std.primitive.IntegerPointable;
-public class QNamePointable extends AbstractPointable {
+public class CodedQNamePointable extends AbstractPointable {
public static final int SIZE = 12;
private static final int OFF_PREFIX = 0;
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/AttributeNodePointable.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/AttributeNodePointable.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/AttributeNodePointable.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/AttributeNodePointable.java Fri Jun 15 02:00:34 2012
@@ -1,7 +1,7 @@
package org.apache.vxquery.datamodel.accessors.nodes;
import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
-import org.apache.vxquery.datamodel.accessors.atomic.QNamePointable;
+import org.apache.vxquery.datamodel.accessors.atomic.CodedQNamePointable;
import edu.uci.ics.hyracks.data.std.api.AbstractPointable;
import edu.uci.ics.hyracks.data.std.primitive.IntegerPointable;
@@ -17,11 +17,11 @@ import edu.uci.ics.hyracks.data.std.prim
public class AttributeNodePointable extends AbstractPointable {
private static final int LOCAL_NODE_ID_SIZE = 4;
- public void getName(QNamePointable name) {
+ public void getName(CodedQNamePointable name) {
name.set(bytes, getNameOffset(), getNameSize());
}
- public void getTypeName(NodeTreePointable nodeTree, QNamePointable typeName) {
+ public void getTypeName(NodeTreePointable nodeTree, CodedQNamePointable typeName) {
if (nodeTree.typeExists()) {
typeName.set(bytes, getTypeOffset(), getTypeSize(nodeTree));
} else {
@@ -42,7 +42,7 @@ public class AttributeNodePointable exte
}
private int getNameSize() {
- return QNamePointable.SIZE;
+ return CodedQNamePointable.SIZE;
}
private int getTypeOffset() {
@@ -50,7 +50,7 @@ public class AttributeNodePointable exte
}
private int getTypeSize(NodeTreePointable nodeTree) {
- return nodeTree.typeExists() ? QNamePointable.SIZE : 0;
+ return nodeTree.typeExists() ? CodedQNamePointable.SIZE : 0;
}
private int getLocalNodeIdOffset(NodeTreePointable nodeTree) {
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/ElementNodePointable.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/ElementNodePointable.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/ElementNodePointable.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/ElementNodePointable.java Fri Jun 15 02:00:34 2012
@@ -1,7 +1,7 @@
package org.apache.vxquery.datamodel.accessors.nodes;
import org.apache.vxquery.datamodel.accessors.SequencePointable;
-import org.apache.vxquery.datamodel.accessors.atomic.QNamePointable;
+import org.apache.vxquery.datamodel.accessors.atomic.CodedQNamePointable;
import edu.uci.ics.hyracks.data.std.api.AbstractPointable;
import edu.uci.ics.hyracks.data.std.primitive.BytePointable;
@@ -59,11 +59,11 @@ public class ElementNodePointable extend
return (getHeader() & CHILDREN_CHUNK_EXISTS_MASK) != 0;
}
- public void getName(QNamePointable name) {
+ public void getName(CodedQNamePointable name) {
name.set(bytes, getNameOffset(), getNameSize());
}
- public void getTypeName(NodeTreePointable nodeTree, QNamePointable typeName) {
+ public void getTypeName(NodeTreePointable nodeTree, CodedQNamePointable typeName) {
if (nodeTree.typeExists()) {
typeName.set(bytes, getTypeOffset(), getTypeSize(nodeTree));
} else {
@@ -126,7 +126,7 @@ public class ElementNodePointable extend
}
private int getNameSize() {
- return QNamePointable.SIZE;
+ return CodedQNamePointable.SIZE;
}
private int getTypeOffset() {
@@ -134,7 +134,7 @@ public class ElementNodePointable extend
}
private int getTypeSize(NodeTreePointable nodeTree) {
- return nodeTree.typeExists() ? QNamePointable.SIZE : 0;
+ return nodeTree.typeExists() ? CodedQNamePointable.SIZE : 0;
}
private int getLocalNodeIdOffset(NodeTreePointable nodeTree) {
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-functions.xml
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-functions.xml?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-functions.xml (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-functions.xml Fri Jun 15 02:00:34 2012
@@ -20,7 +20,6 @@
<function name="fn:abs">
<param name="arg" type="xsext:numeric?"/>
<return type="xsext:numeric?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnAbsIterator"/>
</function>
<!-- fn:adjust-date-to-timezone( $arg as xs:date?) as xs:date? -->
@@ -77,21 +76,18 @@
<function name="fn:base-uri">
<param name="arg" type="node()?"/>
<return type="xs:anyURI?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnBaseUriIterator"/>
</function>
<!-- fn:boolean($arg as item()*) as xs:boolean -->
<function name="fn:boolean">
<param name="arg" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnBooleanIterator"/>
</function>
<!-- fn:ceiling($arg as numeric?) as numeric? -->
<function name="fn:ceiling">
<param name="arg" type="xsext:numeric?"/>
<return type="xsext:numeric?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnCeilingIterator"/>
</function>
<!-- fn:codepoint-equal($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:boolean? -->
@@ -99,14 +95,12 @@
<param name="comparand1" type="xs:string?"/>
<param name="comparand2" type="xs:string?"/>
<return type="xs:boolean?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnCodepointEqualIterator"/>
</function>
<!-- fn:codepoints-to-string( $arg as xs:integer*) as xs:string -->
<function name="fn:codepoints-to-string">
<param name="arg" type="xs:integer*"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnCodepointsToStringIterator"/>
</function>
<!-- fn:collection() as node()* -->
@@ -140,7 +134,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnConcatIterator"/>
</function>
<!-- fn:contains($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean -->
@@ -148,7 +141,6 @@
<param name="arg1" type="xs:string?"/>
<param name="arg2" type="xs:string?"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnContainsIterator"/>
</function>
<!-- fn:contains($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean -->
@@ -157,14 +149,12 @@
<param name="arg2" type="xs:string?"/>
<param name="collation" type="xs:string"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnContainsIterator"/>
</function>
<!-- fn:count($arg as item()*) as xs:integer -->
<function name="fn:count">
<param name="arg" type="item()*"/>
<return type="xs:integer"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnCountIterator"/>
</function>
<!-- fn:current-date() as xs:date -->
@@ -175,20 +165,17 @@
<!-- fn:current-dateTime() as xs:dateTime -->
<function name="fn:current-dateTime">
<return type="xs:dateTime"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnCurrentDateTimeIterator"/>
</function>
<!-- fn:current-time() as xs:time -->
<function name="fn:current-time">
<return type="xs:time"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnCurrentTimeIterator"/>
</function>
<!-- fn:data($arg as item()*) as xs:anyAtomicType* -->
<function name="fn:data">
<param name="arg" type="item()*"/>
<return type="xs:anyAtomicType*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnDataIterator"/>
</function>
<!-- fn:dateTime($arg1 as xs:date?, $arg2 as xs:time?) as xs:dateTime? -->
@@ -202,21 +189,18 @@
<function name="fn:day-from-date">
<param name="arg" type="xs:date?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnDayFromDateIterator"/>
</function>
<!-- fn:day-from-dateTime( $arg as xs:dateTime?) as xs:integer? -->
<function name="fn:day-from-dateTime">
<param name="arg" type="xs:dateTime?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnDayFromDateTimeIterator"/>
</function>
<!-- fn:days-from-duration( $arg as xs:duration?) as xs:integer? -->
<function name="fn:days-from-duration">
<param name="arg" type="xs:duration?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnDaysFromDurationIterator"/>
</function>
<!-- fn:deep-equal($parameter1 as item()*, $parameter2 as item()*) as xs:boolean -->
@@ -224,7 +208,6 @@
<param name="parameter1" type="item()*"/>
<param name="parameter2" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnDeepEqualIterator"/>
</function>
<!-- fn:deep-equal($parameter1 as item()*, $parameter2 as item()*, $collation as xs:string) as xs:boolean -->
@@ -233,13 +216,11 @@
<param name="parameter2" type="item()*"/>
<param name="collation" type="xs:string"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnDeepEqualIterator"/>
</function>
<!-- fn:default-collation() as xs:string -->
<function name="fn:default-collation">
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnDefaultCollationIterator"/>
</function>
<!-- fn:distinct-values($arg as xs:anyAtomicType*) as xs:anyAtomicType* -->
@@ -259,7 +240,6 @@
<function name="fn:doc">
<param name="uri" type="xs:string?"/>
<return type="document-node()?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnDocIterator"/>
</function>
<!-- fn:doc-available($uri as xs:string?) as xs:boolean -->
@@ -272,21 +252,18 @@
<function name="fn:document-uri">
<param name="arg" type="node()?"/>
<return type="xs:anyURI?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnDocumentUriIterator"/>
</function>
<!-- fn:empty($arg as item()*) as xs:boolean -->
<function name="fn:empty">
<param name="arg" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnEmptyIterator"/>
</function>
<!-- fn:encode-for-uri($uri-part as xs:string?) as xs:string -->
<function name="fn:encode-for-uri">
<param name="uri-part" type="xs:string?"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnEncodeForUriIterator"/>
</function>
<!-- fn:ends-with($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean -->
@@ -294,7 +271,6 @@
<param name="arg1" type="xs:string?"/>
<param name="arg2" type="xs:string?"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnEndsWithIterator"/>
</function>
<!-- fn:ends-with($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean -->
@@ -303,7 +279,6 @@
<param name="arg2" type="xs:string?"/>
<param name="collation" type="xs:string"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnEndsWithIterator"/>
</function>
<!-- fn:error() as none -->
@@ -342,48 +317,41 @@
<function name="fn:exactly-one">
<param name="arg" type="item()*"/>
<return type="item()"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnExactlyOneIterator"/>
</function>
<!-- fn:exists($arg as item()*) as xs:boolean -->
<function name="fn:exists">
<param name="arg" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnExistsIterator"/>
</function>
<!-- fn:false() as xs:boolean -->
<function name="fn:false">
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnFalseIterator"/>
</function>
<!-- fn:floor($arg as numeric?) as numeric? -->
<function name="fn:floor">
<param name="arg" type="xsext:numeric?"/>
<return type="xsext:numeric?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnFloorIterator"/>
</function>
<!-- fn:hours-from-dateTime( $arg as xs:dateTime?) as xs:integer? -->
<function name="fn:hours-from-dateTime">
<param name="arg" type="xs:dateTime?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnHoursFromDateTimeIterator"/>
</function>
<!-- fn:hours-from-duration( $arg as xs:duration?) as xs:integer? -->
<function name="fn:hours-from-duration">
<param name="arg" type="xs:duration?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnHoursFromDurationIterator"/>
</function>
<!-- fn:hours-from-time($arg as xs:time?) as xs:integer? -->
<function name="fn:hours-from-time">
<param name="arg" type="xs:time?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnHoursFromTimeIterator"/>
</function>
<!-- fn:id($arg as xs:string*) as element()* -->
@@ -428,7 +396,6 @@
<param name="seqParam" type="xs:anyAtomicType*"/>
<param name="srcParam" type="xs:anyAtomicType"/>
<return type="xs:integer*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnIndexOfIterator"/>
</function>
<!-- fn:index-of($seqParam as xs:anyAtomicType*, $srchParam as xs:anyAtomicType, $collation as xs:string) as xs:integer* -->
@@ -437,7 +404,6 @@
<param name="srcParam" type="xs:anyAtomicType"/>
<param name="collation" type="xs:string"/>
<return type="xs:integer*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnIndexOfIterator"/>
</function>
<!-- fn:insert-before($target as item()*, $position as xs:integer, $inserts as item()*) as item()* -->
@@ -446,7 +412,6 @@
<param name="position" type="xs:integer"/>
<param name="inserts" type="item()*"/>
<return type="item()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnInsertBeforeIterator"/>
</function>
<!-- fn:iri-to-uri($iri as xs:string?) as xs:string -->
@@ -482,21 +447,18 @@
<function name="fn:local-name">
<param name="arg" type="node()?"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnLocalNameIterator"/>
</function>
<!-- fn:local-name-from-QName( $arg as xs:QName?) as xs:NCName? -->
<function name="fn:local-name-from-QName">
<param name="arg" type="xs:QName?"/>
<return type="xs:NCName?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnLocalNameFromQNameIterator"/>
</function>
<!-- fn:lower-case($arg as xs:string?) as xs:string -->
<function name="fn:lower-case">
<param name="arg" type="xs:string?"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnLowerCaseIterator"/>
</function>
<!-- fn:matches($input as xs:string?, $pattern as xs:string) as xs:boolean -->
@@ -518,7 +480,6 @@
<function name="fn:max">
<param name="arg" type="xs:anyAtomicType*"/>
<return type="xs:anyAtomicType"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnMaxIterator"/>
</function>
<!-- fn:max($arg as xs:anyAtomicType*, $collation as string) as xs:anyAtomicType? -->
@@ -526,14 +487,12 @@
<param name="arg" type="xs:anyAtomicType*"/>
<param name="collation" type="xs:string"/>
<return type="xs:anyAtomicType"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnMaxIterator"/>
</function>
<!-- fn:min($arg as xs:anyAtomicType*) as xs:anyAtomicType? -->
<function name="fn:min">
<param name="arg" type="xs:anyAtomicType*"/>
<return type="xs:anyAtomicType"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnMinIterator"/>
</function>
<!-- fn:min($arg as xs:anyAtomicType*, $collation as string) as xs:anyAtomicType? -->
@@ -541,49 +500,42 @@
<param name="arg" type="xs:anyAtomicType*"/>
<param name="collation" type="xs:string"/>
<return type="xs:anyAtomicType"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnMaxIterator"/>
</function>
<!-- fn:minutes-from-dateTime( $arg as xs:dateTime?) as xs:integer? -->
<function name="fn:minutes-from-dateTime">
<param name="arg" type="xs:dateTime?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnMinutesFromDateTimeIterator"/>
</function>
<!-- fn:minutes-from-duration( $arg as xs:duration?) as xs:integer? -->
<function name="fn:minutes-from-duration">
<param name="arg" type="xs:duration?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnMinutesFromDurationIterator"/>
</function>
<!-- fn:minutes-from-time( $arg as xs:time?) as xs:integer? -->
<function name="fn:minutes-from-time">
<param name="arg" type="xs:time?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnMinutesFromTimeIterator"/>
</function>
<!-- fn:month-from-date($arg as xs:date?) as xs:integer? -->
<function name="fn:month-from-date">
<param name="arg" type="xs:date?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnMonthFromDateIterator"/>
</function>
<!-- fn:month-from-dateTime( $arg as xs:dateTime?) as xs:integer? -->
<function name="fn:month-from-dateTime">
<param name="arg" type="xs:dateTime?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnMonthFromDateTimeIterator"/>
</function>
<!-- fn:months-from-duration( $arg as xs:duration?) as xs:integer? -->
<function name="fn:months-from-duration">
<param name="arg" type="xs:duration?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnMonthsFromDurationIterator"/>
</function>
<!-- fn:name() as xs:string -->
@@ -595,7 +547,6 @@
<function name="fn:name">
<param name="arg" type="node()?"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnNameIterator"/>
</function>
<!-- fn:namespace-uri() as xs:anyURI -->
@@ -607,7 +558,6 @@
<function name="fn:namespace-uri">
<param name="arg" type="node()?"/>
<return type="xs:anyURI"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnNamespaceUriIterator"/>
</function>
<!-- fn:namespace-uri-for-prefix( $prefix as xs:string?, $element as element()) as xs:anyURI? -->
@@ -621,21 +571,18 @@
<function name="fn:namespace-uri-from-QName">
<param name="arg" type="xs:QName?"/>
<return type="xs:anyURI?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnNamespaceUriFromQNameIterator"/>
</function>
<!-- fn:nilled($arg as node()?) as xs:boolean? -->
<function name="fn:nilled">
<param name="arg" type="node()?"/>
<return type="xs:boolean?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnNilledIterator"/>
</function>
<!-- fn:node-name($arg as node()?) as xs:QName? -->
<function name="fn:node-name">
<param name="arg" type="node()?"/>
<return type="xs:QName?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnNodeNameIterator"/>
</function>
<!-- fn:normalize-space() as xs:string -->
@@ -647,7 +594,6 @@
<function name="fn:normalize-space">
<param name="arg" type="xs:string?"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnNormalizeSpaceIterator"/>
</function>
<!-- fn:normalize-unicode( $arg as xs:string?) as xs:string -->
@@ -667,7 +613,6 @@
<function name="fn:not">
<param name="arg" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnNotIterator"/>
</function>
<!-- fn:number() as xs:double -->
@@ -679,14 +624,12 @@
<function name="fn:number">
<param name="arg" type="xs:anyAtomicType?"/>
<return type="xs:double"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnNumberIterator"/>
</function>
<!-- fn:one-or-more($arg as item()*) as item()+ -->
<function name="fn:one-or-more">
<param name="arg" type="item()*"/>
<return type="item()+"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnOneOrMoreIterator"/>
</function>
<!-- fn:position() as xs:integer -->
@@ -698,7 +641,6 @@
<function name="fn:prefix-from-QName">
<param name="arg" type="xs:QName?"/>
<return type="xs:NCName?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnPrefixFromQNameIterator"/>
</function>
<!-- fn:QName($paramURI as xs:string?, $paramQName as xs:string) as xs:QName -->
@@ -713,7 +655,6 @@
<param name="target" type="item()*"/>
<param name="position" type="xs:integer"/>
<return type="item()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnRemoveIterator"/>
</function>
<!-- fn:replace($input as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string -->
@@ -757,7 +698,6 @@
<function name="fn:reverse">
<param name="arg" type="item()*"/>
<return type="item()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnReverseIterator"/>
</function>
<!-- fn:root() as node() -->
@@ -775,14 +715,12 @@
<function name="fn:round">
<param name="arg" type="xsext:numeric?"/>
<return type="xsext:numeric?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnRoundIterator"/>
</function>
<!-- fn:round-half-to-even( $arg as numeric?) as numeric? -->
<function name="fn:round-half-to-even">
<param name="arg" type="xsext:numeric?"/>
<return type="xsext:numeric?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnRoundHalfToEvenIterator"/>
</function>
<!-- fn:round-half-to-even( $arg as numeric?, $precision as xs:integer) as numeric? -->
@@ -790,28 +728,24 @@
<param name="arg" type="xsext:numeric?"/>
<param name="precision" type="xs:integer"/>
<return type="xsext:numeric?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnRoundHalfToEvenIteratorWithPrecision"/>
</function>
<!-- fn:seconds-from-dateTime( $arg as xs:dateTime?) as xs:decimal? -->
<function name="fn:seconds-from-dateTime">
<param name="arg" type="xs:dateTime?"/>
<return type="xs:decimal?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSecondsFromDateTimeIterator"/>
</function>
<!-- fn:seconds-from-duration( $arg as xs:duration?) as xs:decimal? -->
<function name="fn:seconds-from-duration">
<param name="arg" type="xs:duration?"/>
<return type="xs:decimal?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSecondsFromDurationIterator"/>
</function>
<!-- fn:seconds-from-time( $arg as xs:time?) as xs:decimal? -->
<function name="fn:seconds-from-time">
<param name="arg" type="xs:time?"/>
<return type="xs:decimal?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSecondsFromTimeIterator"/>
</function>
<!-- fn:starts-with($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean -->
@@ -819,7 +753,6 @@
<param name="arg1" type="xs:string?"/>
<param name="arg2" type="xs:string?"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnStartsWithIterator"/>
</function>
<!-- fn:starts-with($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean -->
@@ -828,13 +761,11 @@
<param name="arg2" type="xs:string?"/>
<param name="collation" type="xs:string"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnStartsWithIterator"/>
</function>
<!-- fn:static-base-uri() as xs:anyURI? -->
<function name="fn:static-base-uri">
<return type="xs:anyURI?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnStaticBaseUriIterator"/>
</function>
<!-- fn:string() as xs:string -->
@@ -846,7 +777,6 @@
<function name="fn:string">
<param name="arg" type="item()?"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnStringIterator"/>
</function>
<!-- fn:string-join($arg1 as xs:string*, $arg2 as xs:string) as xs:string -->
@@ -854,7 +784,6 @@
<param name="arg1" type="xs:string*"/>
<param name="arg2" type="xs:string"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnStringJoinIterator"/>
</function>
<!-- fn:string-length() as xs:integer -->
@@ -866,14 +795,12 @@
<function name="fn:string-length">
<param name="arg" type="xs:string?"/>
<return type="xs:integer"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnStringLengthIterator"/>
</function>
<!-- fn:string-to-codepoints( $arg as xs:string?) as xs:integer* -->
<function name="fn:string-to-codepoints">
<param name="arg" type="xs:string?"/>
<return type="xs:integer*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnStringToCodepointsIterator"/>
</function>
<!-- fn:subsequence($sourceSeq as item()*, $startingLoc as xs:double) as item()* -->
@@ -881,7 +808,6 @@
<param name="sourceSeq" type="item()*"/>
<param name="startingLoc" type="xs:double"/>
<return type="item()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSubsequenceIterator"/>
</function>
<!-- fn:subsequence($sourceSeq as item()*, $startingLoc as xs:double, $length as xs:double) as item()* -->
@@ -890,7 +816,6 @@
<param name="startingLoc" type="xs:double"/>
<param name="length" type="xs:double"/>
<return type="item()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSubsequenceIterator"/>
</function>
<!-- fn:substring($sourceString as xs:string?, $startingLoc as xs:double) as xs:string -->
@@ -898,7 +823,6 @@
<param name="sourceSeq" type="xs:string?"/>
<param name="startingLoc" type="xs:double"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSubstringIterator"/>
</function>
<!-- fn:substring($sourceString as xs:string?, $startingLoc as xs:double, $length as xs:double) as xs:string -->
@@ -907,7 +831,6 @@
<param name="startingLoc" type="xs:double"/>
<param name="length" type="xs:double"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSubstringIterator"/>
</function>
<!-- fn:substring-after($arg1 as xs:string?, $arg2 as xs:string?) as xs:string -->
@@ -915,7 +838,6 @@
<param name="arg1" type="xs:string?"/>
<param name="arg2" type="xs:string?"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSubstringAfterIterator"/>
</function>
<!-- fn:substring-after($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string -->
@@ -924,7 +846,6 @@
<param name="arg2" type="xs:string?"/>
<param name="collation" type="xs:string"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSubstringAfterIterator"/>
</function>
<!-- fn:substring-before( $arg1 as xs:string?, $arg2 as xs:string?) as xs:string -->
@@ -932,7 +853,6 @@
<param name="arg1" type="xs:string?"/>
<param name="arg2" type="xs:string?"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSubstringBeforeIterator"/>
</function>
<!-- fn:substring-before( $arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string -->
@@ -941,7 +861,6 @@
<param name="arg2" type="xs:string?"/>
<param name="collation" type="xs:string"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnSubstringBeforeIterator"/>
</function>
<!-- fn:sum($arg as xs:anyAtomicType*) as xs:anyAtomicType -->
@@ -961,21 +880,18 @@
<function name="fn:timezone-from-date">
<param name="arg" type="xs:date?"/>
<return type="xs:dayTimeDuration?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnTimezoneFromDateIterator"/>
</function>
<!-- fn:timezone-from-dateTime( $arg as xs:dateTime?) as xs:dayTimeDuration? -->
<function name="fn:timezone-from-dateTime">
<param name="arg" type="xs:dateTime?"/>
<return type="xs:dayTimeDuration?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnTimezoneFromDateTimeIterator"/>
</function>
<!-- fn:timezone-from-time( $arg as xs:time?) as xs:dayTimeDuration? -->
<function name="fn:timezone-from-time">
<param name="arg" type="xs:time?"/>
<return type="xs:dayTimeDuration?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnTimezoneFromTimeIterator"/>
</function>
<!-- fn:tokenize($input as xs:string?, $pattern as xs:string) as xs:string* -->
@@ -998,7 +914,6 @@
<param name="value" type="item()*"/>
<param name="label" type="xs:string"/>
<return type="item()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnTraceIterator"/>
</function>
<!-- fn:translate($arg as xs:string?, $mapString as xs:string, $transString as xs:string) as xs:string -->
@@ -1007,13 +922,11 @@
<param name="mapString" type="xs:string"/>
<param name="transString" type="xs:string"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnTranslateIterator"/>
</function>
<!-- fn:true() as xs:boolean -->
<function name="fn:true">
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnTrueIterator"/>
</function>
<!-- fn:unordered($sourceSeq as item()*) as item()* -->
@@ -1026,34 +939,29 @@
<function name="fn:upper-case">
<param name="arg" type="xs:string?"/>
<return type="xs:string"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnUpperCaseIterator"/>
</function>
<!-- fn:year-from-date($arg as xs:date?) as xs:integer? -->
<function name="fn:year-from-date">
<param name="arg" type="xs:date?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnYearFromDateIterator"/>
</function>
<!-- fn:year-from-dateTime( $arg as xs:dateTime?) as xs:integer? -->
<function name="fn:year-from-dateTime">
<param name="arg" type="xs:dateTime?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnYearFromDateTimeIterator"/>
</function>
<!-- fn:years-from-duration( $arg as xs:duration?) as xs:integer? -->
<function name="fn:years-from-duration">
<param name="arg" type="xs:duration?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnYearsFromDurationIterator"/>
</function>
<!-- fn:zero-or-one($arg as item()*) as item()? -->
<function name="fn:zero-or-one">
<param name="arg" type="item()*"/>
<return type="item()?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.FnZeroOrOneIterator"/>
</function>
</functions>
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-operators.xml
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-operators.xml?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-operators.xml (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-operators.xml Fri Jun 15 02:00:34 2012
@@ -97,7 +97,6 @@
<operator name="op:concatenate" varargs="true">
<param name="arg" type="item()*"/>
<return type="item()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.ConcatenateIterator"/>
</operator>
<!-- op:date-equal($arg1 as xs:date, $arg2 as xs:date) as xs:boolean -->
@@ -197,7 +196,6 @@
<param name="parameter2" type="node()*"/>
<return type="node()*"/>
<!-- implementation assumes input in document order -->
- <runtime class="org.apache.vxquery.v0runtime.functions.OpExceptIterator"/>
</operator>
<!-- op:gDay-equal($arg1 as xs:gDay, $arg2 as xs:gDay) as xs:boolean -->
@@ -248,7 +246,6 @@
<param name="parameter2" type="node()*"/>
<return type="node()*"/>
<!-- implementation assumes input in document order -->
- <runtime class="org.apache.vxquery.v0runtime.functions.OpIntersectIterator"/>
</operator>
<!-- op:is-same-node($parameter1 as node(), $parameter2 as node()) as xs:boolean -->
@@ -256,7 +253,6 @@
<param name="parameter1" type="node()?"/>
<param name="parameter2" type="node()?"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpIsSameNodeIterator"/>
</operator>
<!-- op:multiply-dayTimeDuration( $arg1 as xs:dayTimeDuration, $arg2 as xs:double) as xs:dayTimeDuration -->
@@ -278,7 +274,6 @@
<param name="parameter1" type="node()?"/>
<param name="parameter2" type="node()?"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpNodeAfterIterator"/>
</operator>
<!-- op:node-before($parameter1 as node(), $parameter2 as node()) as xs:boolean -->
@@ -286,7 +281,6 @@
<param name="parameter1" type="node()?"/>
<param name="parameter2" type="node()?"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpNodeBeforeIterator"/>
</operator>
<!-- op:NOTATION-equal($arg1 as xs:NOTATION, $arg2 as xs:NOTATION) as xs:boolean -->
@@ -329,7 +323,6 @@
<param name="arg1" type="xsext:numeric"/>
<param name="arg2" type="xsext:numeric"/>
<return type="xs:integer"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.IntegerDivideArithmeticOperationIterator"/>
</operator>
<!-- op:numeric-less-than( $arg1 as numeric, $arg2 as numeric) as xs:boolean -->
@@ -364,7 +357,6 @@
<operator name="op:numeric-unary-minus">
<param name="arg1" type="xsext:numeric"/>
<return type="xsext:numeric"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.NumericUnaryMinusIterator"/>
</operator>
<!-- op:numeric-unary-plus( $arg as numeric) as numeric -->
@@ -476,7 +468,6 @@
<param name="firstval" type="xs:integer"/>
<param name="lastval" type="xs:integer"/>
<return type="xs:integer*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpToIterator"/>
</operator>
<!-- op:union($parameter1 as node()*, $parameter2 as node()*) as node()* -->
@@ -486,7 +477,6 @@
<return type="node()*"/>
<!-- as we do the doc-order-sort and the duplicate elimination -->
<!-- after the concatenation, we can reuse the concat iterator -->
- <runtime class="org.apache.vxquery.v0runtime.functions.ConcatenateIterator"/>
</operator>
<!-- op:yearMonthDuration-greater-than( $arg1 as xs:yearMonthDuration, $arg2 as xs:yearMonthDuration) as xs:boolean -->
@@ -520,7 +510,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:boolean?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.ValueEqComparisonIterator"/>
</operator>
<!-- opext:value-ne($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:boolean? -->
@@ -528,7 +517,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:boolean?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.ValueNeComparisonIterator"/>
</operator>
<!-- opext:value-lt($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:boolean? -->
@@ -536,7 +524,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:boolean?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.ValueLtComparisonIterator"/>
</operator>
<!-- opext:value-le($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:boolean? -->
@@ -544,7 +531,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:boolean?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.ValueLeComparisonIterator"/>
</operator>
<!-- opext:value-gt($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:boolean? -->
@@ -552,7 +538,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:boolean?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.ValueGtComparisonIterator"/>
</operator>
<!-- opext:value-ge($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:boolean? -->
@@ -560,7 +545,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:boolean?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.ValueGeComparisonIterator"/>
</operator>
<!-- opext:general-eq($arg1 as item()*, $arg2 as item()*) as xs:boolean -->
@@ -568,7 +552,6 @@
<param name="arg1" type="item()*"/>
<param name="arg2" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.GeneralEqComparisonIterator"/>
</operator>
<!-- opext:general-ne($arg1 as item()*, $arg2 as item()*) as xs:boolean -->
@@ -576,7 +559,6 @@
<param name="arg1" type="item()*"/>
<param name="arg2" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.GeneralNeComparisonIterator"/>
</operator>
<!-- opext:general-lt($arg1 as item()*, $arg2 as item()*) as xs:boolean -->
@@ -584,7 +566,6 @@
<param name="arg1" type="item()*"/>
<param name="arg2" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.GeneralLtComparisonIterator"/>
</operator>
<!-- opext:general-le($arg1 as item()*, $arg2 as item()*) as xs:boolean -->
@@ -592,7 +573,6 @@
<param name="arg1" type="item()*"/>
<param name="arg2" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.GeneralLeComparisonIterator"/>
</operator>
<!-- opext:general-gt($arg1 as item()*, $arg2 as item()*) as xs:boolean -->
@@ -600,7 +580,6 @@
<param name="arg1" type="item()*"/>
<param name="arg2" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.GeneralGtComparisonIterator"/>
</operator>
<!-- opext:general-ge($arg1 as item()*, $arg2 as item()*) as xs:boolean -->
@@ -608,7 +587,6 @@
<param name="arg1" type="item()*"/>
<param name="arg2" type="item()*"/>
<return type="xs:boolean"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.GeneralGeComparisonIterator"/>
</operator>
<!-- opext:add($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:anyAtomicType? -->
@@ -616,7 +594,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:anyAtomicType?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.AddArithmeticOperationIterator"/>
</operator>
<!-- opext:subtract($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:anyAtomicType? -->
@@ -624,7 +601,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:anyAtomicType?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.SubtractArithmeticOperationIterator"/>
</operator>
<!-- opext:multiply($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:anyAtomicType? -->
@@ -632,7 +608,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:anyAtomicType?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.MultiplyArithmeticOperationIterator"/>
</operator>
<!-- opext:divide($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:anyAtomicType? -->
@@ -640,7 +615,6 @@
<param name="arg1" type="xs:anyAtomicType?"/>
<param name="arg2" type="xs:anyAtomicType?"/>
<return type="xs:anyAtomicType?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.DivideArithmeticOperationIterator"/>
</operator>
<!-- opext:idiv($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:anyAtomicType? -->
@@ -648,7 +622,6 @@
<param name="arg1" type="xsext:numeric?"/>
<param name="arg2" type="xsext:numeric?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.IntegerDivideArithmeticOperationIterator"/>
</operator>
<!-- opext:mod($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:anyAtomicType? -->
@@ -656,7 +629,6 @@
<param name="arg1" type="xsext:numeric?"/>
<param name="arg2" type="xsext:numeric?"/>
<return type="xs:integer?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.ModArithmeticOperationIterator"/>
</operator>
<!-- opext:and($arg1 as xs:boolean?, $arg2 as xs:boolean?) as xs:boolean? -->
@@ -664,7 +636,6 @@
<param name="arg1" type="xs:boolean?"/>
<param name="arg2" type="xs:boolean?"/>
<return type="xs:boolean?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.BooleanAndIterator"/>
</operator>
<!-- opext:or($arg1 as xs:boolean?, $arg2 as xs:boolean?) as xs:boolean? -->
@@ -672,56 +643,48 @@
<param name="arg1" type="xs:boolean?"/>
<param name="arg2" type="xs:boolean?"/>
<return type="xs:boolean?"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.BooleanOrIterator"/>
</operator>
<!-- opext:sort-nodes-asc($arg as node()*) as node()* -->
<operator name="opext:sort-nodes-asc">
<param name="arg" type="node()*"/>
<return type="node()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpExtSortNodesAscIterator"/>
</operator>
<!-- opext:sort-nodes-asc($arg as node()*) as node()* -->
<operator name="opext:sort-distinct-nodes-asc">
<param name="arg" type="node()*"/>
<return type="node()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpExtSortAndDistinctNodesAscIterator"/>
</operator>
<!-- opext:sort-nodes-asc-or-atomics($arg as item()*) as item()* -->
<operator name="opext:sort-distinct-nodes-asc-or-atomics">
<param name="arg" type="item()*"/>
<return type="item()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpExtSortAndDistinctNodesAscOrAtomicsIterator"/>
</operator>
<!-- opext:sort-nodes-desc($arg as node()*) as node()* -->
<operator name="opext:sort-nodes-desc">
<param name="arg" type="node()*"/>
<return type="node()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpExtSortNodesDescIterator"/>
</operator>
<!-- opext:sort-nodes-desc($arg as node()*) as node()* -->
<operator name="opext:sort-distinct-nodes-desc">
<param name="arg" type="node()*"/>
<return type="node()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpExtSortAndDistinctNodesDescIterator"/>
</operator>
<!-- opext:sort-nodes-desc-or-atomics($arg as item()*) as item()* -->
<operator name="opext:sort-distinct-nodes-desc-or-atomics">
<param name="arg" type="item()*"/>
<return type="item()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpExtSortAndDistinctNodesDescOrAtomicsIterator"/>
</operator>
<!-- opext:deflate-sequences($arg as item()*) as item()* -->
<operator name="opext:deflate-sequences">
<param name="arg" type="item()*"/>
<return type="item()*"/>
- <runtime class="org.apache.vxquery.v0runtime.functions.OpExtDeflateSequencesIterator"/>
</operator>
<!-- opext:pi-constructor($target as xs:sring, $content as xs:string) as node() -->
@@ -870,35 +833,35 @@
<!-- opext:promote($arg as item()*, $type as xsext:type) as item()* -->
<operator name="opext:promote">
<param name="arg" type="item()*"/>
- <param name="type" type="xsext:type"/>
+ <param name="type" type="xs:int"/>
<return type="item()*"/>
</operator>
<!-- opext:treat($arg as item()*, $type as xsext:type) as item()* -->
<operator name="opext:treat">
<param name="arg" type="item()*"/>
- <param name="type" type="xsext:type"/>
+ <param name="type" type="xs:int"/>
<return type="item()*"/>
</operator>
<!-- opext:cast($arg as item()*, $type as xsext:type) as item()* -->
<operator name="opext:cast">
<param name="arg" type="item()*"/>
- <param name="type" type="xsext:type"/>
+ <param name="type" type="xs:int"/>
<return type="item()*"/>
</operator>
<!-- opext:castable($arg as item()*, $type as xsext:type) as xs:boolean -->
<operator name="opext:castable">
<param name="arg" type="item()*"/>
- <param name="type" type="xsext:type"/>
+ <param name="type" type="xs:int"/>
<return type="xs:boolean"/>
</operator>
<!-- opext:instance-of($arg as item()*, $type as xsext:type) as xs:boolean -->
<operator name="opext:instance-of">
<param name="arg" type="item()*"/>
- <param name="type" type="xsext:type"/>
+ <param name="type" type="xs:int"/>
<return type="xs:boolean"/>
</operator>
</operators>
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyItemType.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyItemType.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyItemType.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyItemType.java Fri Jun 15 02:00:34 2012
@@ -26,4 +26,14 @@ public final class AnyItemType implement
public boolean isAtomicType() {
return false;
}
+
+ @Override
+ public int hashCode() {
+ return AnyItemType.class.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ return other instanceof AnyItemType;
+ }
}
\ No newline at end of file
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyNodeType.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyNodeType.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyNodeType.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyNodeType.java Fri Jun 15 02:00:34 2012
@@ -26,4 +26,14 @@ public final class AnyNodeType extends A
public NodeKind getNodeKind() {
return NodeKind.ANY;
}
+
+ @Override
+ public int hashCode() {
+ return AnyNodeType.class.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ return other instanceof AnyNodeType;
+ }
}
\ No newline at end of file
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnySimpleType.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnySimpleType.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnySimpleType.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnySimpleType.java Fri Jun 15 02:00:34 2012
@@ -51,4 +51,14 @@ public final class AnySimpleType impleme
public boolean isSimpleType() {
return true;
}
+
+ @Override
+ public int hashCode() {
+ return AnySimpleType.class.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ return other instanceof AnySimpleType;
+ }
}
\ No newline at end of file
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyType.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyType.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyType.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AnyType.java Fri Jun 15 02:00:34 2012
@@ -51,4 +51,14 @@ public final class AnyType implements Co
public boolean isSimpleType() {
return false;
}
+
+ @Override
+ public int hashCode() {
+ return AnyType.class.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ return other instanceof AnyType;
+ }
}
\ No newline at end of file
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AttributeType.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AttributeType.java?rev=1350443&r1=1350442&r2=1350443&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AttributeType.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-core/src/main/java/org/apache/vxquery/types/AttributeType.java Fri Jun 15 02:00:34 2012
@@ -40,4 +40,35 @@ public final class AttributeType extends
public SchemaType getContentType() {
return contentType;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((contentType == null) ? 0 : contentType.hashCode());
+ result = prime * result + ((nameTest == null) ? 0 : nameTest.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ AttributeType other = (AttributeType) obj;
+ if (contentType == null) {
+ if (other.contentType != null)
+ return false;
+ } else if (!contentType.equals(other.contentType))
+ return false;
+ if (nameTest == null) {
+ if (other.nameTest != null)
+ return false;
+ } else if (!nameTest.equals(other.nameTest))
+ return false;
+ return true;
+ }
}
\ No newline at end of file