dods.dap.Server
Class DereferenceClause

java.lang.Object
  extended by dods.dap.Server.AbstractClause
      extended by dods.dap.Server.DereferenceClause
All Implemented Interfaces:
Clause, SubClause

public class DereferenceClause
extends AbstractClause
implements SubClause

Represents a sub-clause that is a URL reference to remote data. This feature is not yet supported in Java. Thus this class throws an exception in its constructor.

Author:
joew
See Also:
ClauseFactory

Field Summary
protected  Clause parent
           
protected  String url
           
protected  dods.dap.BaseType value
           
 
Fields inherited from class dods.dap.Server.AbstractClause
children, constant, defined
 
Constructor Summary
protected DereferenceClause(String url)
          Creates a new DereferenceClause
 
Method Summary
 dods.dap.BaseType evaluate()
          Evaluates the clause, first calling evaluate() on any sub-clauses it contains.
 Clause getParent()
          Returns the Clause which contains this subclause.
 String getURL()
           
 dods.dap.BaseType getValue()
          Returns a BaseType containing the current value of the sub-clause.
protected  dods.dap.BaseType retrieve(String url)
           
 void setParent(Clause parent)
          Sets the parent of this subclause.
 String toString()
           
 
Methods inherited from class dods.dap.Server.AbstractClause
getChildren, isConstant, isDefined
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface dods.dap.Server.Clause
getChildren, isConstant, isDefined
 

Field Detail

url

protected String url

parent

protected Clause parent

value

protected dods.dap.BaseType value
Constructor Detail

DereferenceClause

protected DereferenceClause(String url)
                     throws SDODSException
Creates a new DereferenceClause

Throws:
SDODSException
Method Detail

getValue

public dods.dap.BaseType getValue()
Description copied from interface: SubClause
Returns 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.

Specified by:
getValue in interface SubClause

evaluate

public dods.dap.BaseType evaluate()
Description copied from interface: SubClause
Evaluates 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:
evaluate in interface SubClause

getParent

public Clause getParent()
Description copied from interface: SubClause
Returns the Clause which contains this subclause. The clause returned may be a TopLevelClause or another SubClause.

Specified by:
getParent in interface SubClause

setParent

public void setParent(Clause parent)
Description copied from interface: SubClause
Sets the parent of this subclause. Used during parsing.

Specified by:
setParent in interface SubClause

getURL

public String getURL()

retrieve

protected dods.dap.BaseType retrieve(String url)
                              throws SDODSException
Throws:
SDODSException

toString

public String toString()
Overrides:
toString in class Object