Package opendap.servers
Class ValueClause
- java.lang.Object
-
- opendap.servers.AbstractClause
-
- opendap.servers.ValueClause
-
public class ValueClause extends AbstractClause implements SubClause
Represents a clause containing a simple value. If the value is an constant value such as "2.0", the clause's isConstant() method will return true; if it is a variable of the dataset, isConstant() will return false.- See Also:
ClauseFactory
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedValueClause(opendap.dap.BaseType value, boolean constant)Creates a new ValueClause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description opendap.dap.BaseTypeevaluate()Returns the BaseType represented by this clause.ClausegetParent()Returns the Clause which contains this subclause.opendap.dap.BaseTypegetValue()Returns the BaseType represented by this clause.voidprintConstraint(PrintWriter os)Prints the original string representation of this clause.voidsetParent(Clause parent)Sets the parent of this subclause.-
Methods inherited from class opendap.servers.AbstractClause
getChildren, isConstant, isDefined
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface opendap.servers.Clause
getChildren, isConstant, isDefined
-
-
-
-
Field Detail
-
value
protected opendap.dap.BaseType value
-
parent
protected Clause parent
-
-
Constructor Detail
-
ValueClause
protected ValueClause(opendap.dap.BaseType value, boolean constant)Creates a new ValueClause.- Parameters:
value- The BaseType represented by this clause. This can be either a BaseType taken from the DDS of a dataset, or a BaseType object created to hold a constant value.constant- Should be set to false if the value parameter is from the DDS of a dataset, and true if the value parameter is a constant value.
-
-
Method Detail
-
getValue
public opendap.dap.BaseType getValue()
Returns the BaseType represented by this clause.
-
evaluate
public opendap.dap.BaseType evaluate()
Returns the BaseType represented by this clause. Equivalent to getValue(), except that calling this method flags this clause as "defined".- Specified by:
evaluatein interfaceSubClause- Throws:
DAP2ServerSideException- Not thrown by this type of clause.
-
getParent
public Clause getParent()
Description copied from interface:SubClauseReturns the Clause which contains this subclause. The clause returned may be a TopLevelClause or another SubClause.
-
setParent
public void setParent(Clause parent)
Description copied from interface:SubClauseSets the parent of this subclause. Used during parsing.
-
printConstraint
public void printConstraint(PrintWriter os)
Prints the original string representation of this clause. For use in debugging.- Specified by:
printConstraintin interfaceClause
-
-