org.exist.fluent
Class QueryService.QueryAnalysis

java.lang.Object
  extended by org.exist.fluent.QueryService.QueryAnalysis
Enclosing class:
QueryService

public static class QueryService.QueryAnalysis
extends Object

An access point for running various analyses on a query.


Nested Class Summary
static class QueryService.QueryAnalysis.Cardinality
          The enumeration of recognized cardinalities for parameter and return types.
 
Method Summary
 QueryService.QueryAnalysis.Cardinality cardinality()
          Return the statically determined cardinality of the return type of the query expression.
 Set<QName> requiredFunctions()
          Return a list of functions that are required to be defined by this query, beyond the standard XPath/XQuery ones.
 Set<QName> requiredVariables()
          Return a list of variables that are required to be defined by this query, excluding any positional variables that were provided to the analyze method.
 String returnTypeName()
          Return the name of the statically determined return type of the query expression.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

returnTypeName

public String returnTypeName()
Return the name of the statically determined return type of the query expression. The name is in a standard form, see Type for a list of possible values. If the return type cannot be statically determined, it defaults to Type.ITEM, the universal supertype in XQuery.

Returns:
the name of the return type of the query being analyzed

cardinality

public QueryService.QueryAnalysis.Cardinality cardinality()
Return the statically determined cardinality of the return type of the query expression. If the cardinality cannot be statically determined, it defaults to ZERO_OR_MORE, the least restrictive cardinality.

Returns:
the cardinality of the return type of the query being analyzed

requiredVariables

public Set<QName> requiredVariables()
Return a list of variables that are required to be defined by this query, excluding any positional variables that were provided to the analyze method. The variable names will not include the leading '$'.

Returns:
a list of variables required by this query

requiredFunctions

public Set<QName> requiredFunctions()
Return a list of functions that are required to be defined by this query, beyond the standard XPath/XQuery ones.

Returns:
a list of functions required by this query


Copyright (C) All rights reserved.