Package opendap.servers
Class BTFunctionClause
java.lang.Object
opendap.servers.AbstractClause
opendap.servers.BTFunctionClause
Represents a clause which invokes a function that returns a BaseType.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BTFunctionprotected Clauseprotected opendap.dap.BaseTypeFields inherited from class opendap.servers.AbstractClause
children, constant, defined -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBTFunctionClause(BTFunction function, List children) Creates a new BTFunctionClause. -
Method Summary
Modifier and TypeMethodDescriptionopendap.dap.BaseTypeevaluate()Evaluates the clause, first calling evaluate() on any sub-clauses it contains.Returns the server-side function invoked by this clauseReturns the Clause which contains this subclause.opendap.dap.BaseTypegetValue()Returns a BaseType containing the current value of the sub-clause.voidPrints the original string representation of this clause.voidSets the parent of this subclause.Methods inherited from class opendap.servers.AbstractClause
getChildren, isConstant, isDefinedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface opendap.servers.Clause
getChildren, isConstant, isDefined
-
Field Details
-
parent
-
function
-
value
protected opendap.dap.BaseType value
-
-
Constructor Details
-
BTFunctionClause
Creates a new BTFunctionClause.- Parameters:
function- The function invoked by the clausechildren- A list of SubClauses, to be given as arguments to the function. If all the arguments are constant, the function clause will be flagged as constant, and evaluated immediately.- Throws:
DAP2ServerSideException- Thrown if either 1) the function does not accept the arguments given, or 2) the clause is constant, and the attempt to evaluate it fails.
-
-
Method Details
-
getParent
Description copied from interface:SubClauseReturns the Clause which contains this subclause. The clause returned may be a TopLevelClause or another SubClause. -
getValue
public opendap.dap.BaseType getValue()Description copied from interface:SubClauseReturns a BaseType containing the current value of the sub-clause. Sub-clauses that are not constant have an undefined value until the evaluate() method has been called. However, in such circumstances this method is still useful, as it indicates which class of BaseType the sub-clause will evaluate to. Implementations of this method should never return null. -
evaluate
Description copied from interface:SubClauseEvaluates the clause, first calling evaluate() on any sub-clauses it contains. Implementations of this method should flag the clause as "defined" if the evaluation is successful.- Specified by:
evaluatein interfaceSubClause- Throws:
DAP2ServerSideException- Thrown if the evaluation fails for any reason.
-
setParent
Description copied from interface:SubClauseSets the parent of this subclause. Used during parsing. -
getFunction
Returns the server-side function invoked by this clause -
printConstraint
Prints the original string representation of this clause. For use in debugging.- Specified by:
printConstraintin interfaceClause
-