opendap.dap.Server
Class DereferenceClause

java.lang.Object
  extended by opendap.dap.Server.AbstractClause
      extended by opendap.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  java.lang.String url
           
protected  BaseType value
           
 
Fields inherited from class opendap.dap.Server.AbstractClause
children, constant, defined
 
Constructor Summary
protected DereferenceClause(java.lang.String url)
          Creates a new DereferenceClause
 
Method Summary
 BaseType evaluate()
          Evaluates the clause, first calling evaluate() on any sub-clauses it contains.
 Clause getParent()
          Returns the Clause which contains this subclause.
 java.lang.String getURL()
           
 BaseType getValue()
          Returns a BaseType containing the current value of the sub-clause.
protected  BaseType retrieve(java.lang.String url)
           
 void setParent(Clause parent)
          Sets the parent of this subclause.
 java.lang.String toString()
           
 
Methods inherited from class opendap.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 opendap.dap.Server.Clause
getChildren, isConstant, isDefined
 

Field Detail

url

protected java.lang.String url

parent

protected Clause parent

value

protected BaseType value
Constructor Detail

DereferenceClause

protected DereferenceClause(java.lang.String url)
                     throws DAP2ServerSideException
Creates a new DereferenceClause

Throws:
DAP2ServerSideException
Method Detail

getValue

public 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 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 java.lang.String getURL()

retrieve

protected BaseType retrieve(java.lang.String url)
                     throws DAP2ServerSideException
Throws:
DAP2ServerSideException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object