uk.ac.ebi.microarray.zooma.utils
Interface ZoomaMode


public interface ZoomaMode

The interface for a Zooma operation, which is a mapping "endpoint". Usually, a new operation will define a new resource against which zoom runs, or maybe a type of inputs. Each operation should define several operations, which may qualify the resources a given operation runs against. So, for example, the "text" operation will match provided terms against either a provided ontology, or against bioportal and ols, depending on the operation specified.

Author:
Tony Burdett

Nested Class Summary
static interface ZoomaMode.Argument
          Defines an argument provided to modify an operation.
static interface ZoomaMode.Operation
          Defines an operation on a operation.
 
Method Summary
 java.util.List<ZoomaMode.Argument> getArgumentsForOperation(ZoomaMode.Operation operation)
          A collection of arguments that can be supplied to this operation
 java.lang.String getModeName()
          Returns the name of this operation
 java.util.Collection<ZoomaMode.Operation> getOperations()
          A collection of modes that this operation can operate in
 void invokeTarget(ZoomaMode.Operation operation, java.lang.String... argumentValues)
          Invokes the operation for the operation on this operation with the given parameters.
 

Method Detail

getModeName

java.lang.String getModeName()
Returns the name of this operation

Returns:
the name of the zooma operation

getOperations

java.util.Collection<ZoomaMode.Operation> getOperations()
A collection of modes that this operation can operate in

Returns:
the modes of operation for this operation

getArgumentsForOperation

java.util.List<ZoomaMode.Argument> getArgumentsForOperation(ZoomaMode.Operation operation)
A collection of arguments that can be supplied to this operation

Parameters:
operation -
Returns:
the arguments that can be supplied before invocation

invokeTarget

void invokeTarget(ZoomaMode.Operation operation,
                  java.lang.String... argumentValues)
                  throws ZoomaInvocationException
Invokes the operation for the operation on this operation with the given parameters.

Operations do not have values, you just need to pick one.

Argument values are supplied as a flexible array of strings, and they must be ordered to match the arguments they are values for. In other words, the first element in the supplied argumentValues must be the value for the first element obtained from getArgumentsForOperation(uk.ac.ebi.microarray.zooma.utils.ZoomaMode.Operation)

Parameters:
operation - the operation to use
argumentValues - the arguments to supply when invoking this operation.
Throws:
ZoomaInvocationException - whenever the attempt to invoke the target fails


Copyright © 2010. All Rights Reserved.