opendap.servers.test
Class SSFdummyval

java.lang.Object
  extended by opendap.servers.test.SSFdummyval
All Implemented Interfaces:
BTFunction, ServerSideFunction

public class SSFdummyval
extends java.lang.Object
implements BTFunction


Constructor Summary
SSFdummyval()
           
 
Method Summary
 void checkArgs(java.util.List args)
          Checks that the arguments given are acceptable arguments for this function.
 BaseType evaluate(java.util.List args)
          Evaluates the function using the argument list given.
 java.lang.String getName()
          Returns the name of the server-side function, as it will appear in constraint expressions.
 BaseType getReturnType(java.util.List args)
          A given function must always evaluate to the same class of BaseType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSFdummyval

public SSFdummyval()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ServerSideFunction
Returns the name of the server-side function, as it will appear in constraint expressions. This must be a valid OPeNDAP identifier. All functions must have distinct names.

Specified by:
getName in interface ServerSideFunction

checkArgs

public void checkArgs(java.util.List args)
               throws InvalidParameterException
Description copied from interface: ServerSideFunction
Checks that the arguments given are acceptable arguments for this function. This method should only use those attributes of a SubClause which do not change over its lifetime - whether it is constant, what class of SubClause it is, what class of BaseType it returns, etc. Thus, the method should not look at the actual value of an argument unless the argument is flagged as constant.

Specified by:
checkArgs in interface ServerSideFunction
Parameters:
args - A list of SubClauses that the caller is considering passing to the evaluate() method of the function.
Throws:
InvalidParameterException - Thrown if the function will not evaluate successfully using these arguments.

getReturnType

public BaseType getReturnType(java.util.List args)
Description copied from interface: BTFunction
A given function must always evaluate to the same class of BaseType. Only the value held by the BaseType may change. This method can be used to discover the BaseType class of a function without actually evaluating it.

Specified by:
getReturnType in interface BTFunction

evaluate

public BaseType evaluate(java.util.List args)
                  throws DAP2ServerSideException
Description copied from interface: BTFunction
Evaluates the function using the argument list given.

Specified by:
evaluate in interface BTFunction
Throws:
DAP2ServerSideException - Thrown if the function cannot evaluate successfully. The exact type of exception is up to the author of the server-side function.