org.apache.uima.simpleserver.config
Interface ServerSpec

All Known Implementing Classes:
ServerSpecImpl

public interface ServerSpec

Output specification for a simple service.


Field Summary
static char PATH_SEPARATOR
          The path separator of feature paths: /.
 
Method Summary
 void addTypeMap(TypeMap typeMap)
          Add a type map to an existing spec.
 java.lang.String getLongDescription()
          Get the service's long description.
 boolean getOutputAll()
          Check setting to output all types.
 java.lang.String getShortDescription()
          Get the service's short description.
 java.util.List<TypeMap> getTypeSpecs()
           
 java.util.List<SimpleServerException> validate(org.apache.uima.cas.TypeSystem typeSystem)
          Validate a service spec with respect to a type system.
 

Field Detail

PATH_SEPARATOR

static final char PATH_SEPARATOR
The path separator of feature paths: /.

See Also:
Constant Field Values
Method Detail

getOutputAll

boolean getOutputAll()
Check setting to output all types. If this returns true, individual type maps are ignored. Defaults to false.

Returns:
true iff output of all types is enabled.

getTypeSpecs

java.util.List<TypeMap> getTypeSpecs()
Returns:
A list of type specifications. Each type specification represents output specifications for a single CAS type.

addTypeMap

void addTypeMap(TypeMap typeMap)
Add a type map to an existing spec.

Parameters:
typeMap - The input type map to be added.

getShortDescription

java.lang.String getShortDescription()
Get the service's short description.

Returns:
The short description.

getLongDescription

java.lang.String getLongDescription()
Get the service's long description.

Returns:
The long description.

validate

java.util.List<SimpleServerException> validate(org.apache.uima.cas.TypeSystem typeSystem)
Validate a service spec with respect to a type system. Check that types and feature paths exist. None of the errors found here need to be considered fatal. A non-existing type simply means a type spec that will never produce any output. Similarly, an invalid feature path means a filter that will never match or an output spec that will never produce output. Server-side, it's probably valid to simply log those errors and carry on.

Parameters:
typeSystem - The type system to validate against.
Returns:
A list of errors/warnings in the form of SimpleServerExceptions.


Copyright © 2011. All Rights Reserved.