Package opendap.servers
Class ClauseFactory
java.lang.Object
opendap.servers.ClauseFactory
Represents a source of Clause objects for the constraint expression
parser. By inheriting from this class and overriding the "newX" methods,
you can create a factory that provides your own Clause objects instead
of the default ones. This custom factory can be given to the parser
via the CEEvaluator interface.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new clause factory with a blank function library.ClauseFactory(FunctionLibrary functionLibrary) Creates a clause factory which uses the specified function library. -
Method Summary
Modifier and TypeMethodDescriptionnewBoolFunctionClause(String functionName, List children) Generates a clause which invokes a function that returns a boolean value.newBTFunctionClause(String functionName, List children) Generates a clause which invokes a function that returns a BaseType.Generates a clause representing a remote value, referenced by a URL.newRelOpClause(int operator, SubClause lhs, List rhs) Generates a clause which which compares subclauses, using one of the relative operators supported by the Operator class.newValueClause(opendap.dap.BaseType value, boolean constant) Generates a clause representing a simple value, such as "var1" or "19".
-
Field Details
-
functionLibrary
-
-
Constructor Details
-
ClauseFactory
public ClauseFactory()Creates a new clause factory with a blank function library. This constructor is sufficient for servers with no server side functions.- See Also:
-
ClauseFactory
Creates a clause factory which uses the specified function library. This constructor allows you to parse CE's using a customized function library.- Parameters:
functionLibrary- The function library that will be used when creating clauses that invoke server-side functions.
-
-
Method Details
-
newRelOpClause
public TopLevelClause newRelOpClause(int operator, SubClause lhs, List rhs) throws DAP2ServerSideException Generates a clause which which compares subclauses, using one of the relative operators supported by the Operator class.- Throws:
DAP2ServerSideException
-
newBoolFunctionClause
public TopLevelClause newBoolFunctionClause(String functionName, List children) throws DAP2ServerSideException, opendap.dap.NoSuchFunctionException Generates a clause which invokes a function that returns a boolean value.- Throws:
DAP2ServerSideExceptionopendap.dap.NoSuchFunctionException- See Also:
-
newValueClause
public SubClause newValueClause(opendap.dap.BaseType value, boolean constant) throws DAP2ServerSideException Generates a clause representing a simple value, such as "var1" or "19".- Throws:
DAP2ServerSideException- See Also:
-
newBTFunctionClause
public SubClause newBTFunctionClause(String functionName, List children) throws DAP2ServerSideException, opendap.dap.NoSuchFunctionException Generates a clause which invokes a function that returns a BaseType.- Throws:
DAP2ServerSideExceptionopendap.dap.NoSuchFunctionException- See Also:
-
newDereferenceClause
Generates a clause representing a remote value, referenced by a URL. Note that dereferencing is not currently supported, and the default implementation of this clause type throws an exception when it is evaluated.- Throws:
DAP2ServerSideException- See Also:
-