Version: ${maven.project.version}

org.soaplab.services.metadata
Interface MetadataAccessor

All Known Implementing Classes:
MetadataAccessorXML

public interface MetadataAccessor

An interface to get metadata describing behaviour, and possibly even look-and-feel, for any analysis. An analysis is typically a remote program, often, but not necessarily, a command-line program. It can be also other remote resource, like a web page - the result of such "analysis" is screen-scraped content of the page.

This interface does not address the problem where to get metadata from (for example by reading and parsing an XML file). It is up to the implementation of this interface to solve it. For example, look at DefaultMetadataAccessorFactory.

Version:
$Id: MetadataAccessor.java,v 1.6 2007/11/04 11:53:56 marsenger Exp $
Author:
Martin Senger

Method Summary
 java.lang.String describe()
          Return the whole metadata in the raw format.
 AnalysisDef getAnalysisDef()
          Return a general description of an analysis.
 InputPropertyDef[] getInputDefs()
          Return a slightly simplified version of what is returned by getParamDefs() - and only for input data and options.
 OutputPropertyDef[] getOutputDefs()
          Return a slightly simplified version of what is returned by getParamDefs() - and only for output data.
 ParamDef[] getParamDefs()
          Return description of all parameters for an analysis.
 java.lang.String getServiceName()
          Return a name of a service providing this analysis.
 

Method Detail

getAnalysisDef

AnalysisDef getAnalysisDef()
Return a general description of an analysis.

Returns:
an analysis metadata, or null if such metadata does not exist (but that would cause a havoc in Soaplab)

getParamDefs

ParamDef[] getParamDefs()
Return description of all parameters for an analysis. A parameter is any input or output. It contains the usual input/output data and the command-line options.

Returns:
an array of metadata, one element for each parameter; if there are no parameters, it returns an empty array (not null)

getInputDefs

InputPropertyDef[] getInputDefs()
Return a slightly simplified version of what is returned by getParamDefs() - and only for input data and options.

Some elements (parameters) returned by getParamDefs() can be represented here by more elements. For example, this typically happens for input data that can be sent to an analysis either as direct data, or as a reference to data. Such input is represented by only one ParamDef instance, but by two elements returned by this getInputDefs.

The mapping between elements returned by getParamDefs() and by this method is done by parameter name: the names used by this method are either same as those returned by getParamDefs(), or they have some additional suffixes. Soaplab recognizes suffixes SoaplabConstants.DIRECT_DATA_SUFFIX, SoaplabConstants.URL_SUFFIX,SoaplabConstants.USA_SUFFIX.

Returns:
an array of metadata; if there are no input parameters, it returns an empty array (not null)

getOutputDefs

OutputPropertyDef[] getOutputDefs()
Return a slightly simplified version of what is returned by getParamDefs() - and only for output data.

The mapping between elements returned by getParamDefs() and by this method is done by parameter name: the names used by this method are the same as those returned by getParamDefs().

Returns:
an array of metadata; if there are no output data, it returns an empty array (not null)

describe

java.lang.String describe()
                          throws SoaplabException
Return the whole metadata in the raw format.

Returns:
an XML representation of the analysis metadata, using the SoaplabAnalysis.dtd.
Throws:
SoaplabException - if metadata does not exist

getServiceName

java.lang.String getServiceName()
                                throws SoaplabException
Return a name of a service providing this analysis.

Returns:
a name of a service - this may be different from the analysis name returned within getAnalysisDef()
Throws:
SoaplabException

Version: ${maven.project.version}

Submit a bug or feature
Generated: Tue Jun 14 15:18:14 AST 2011