org.apache.uima.simpleserver.config.impl
Class ServerSpecImpl

java.lang.Object
  extended by org.apache.uima.simpleserver.config.impl.ServerSpecImpl
All Implemented Interfaces:
ServerSpec

public class ServerSpecImpl
extends java.lang.Object
implements ServerSpec

Implementation of ServerSpec interface.


Field Summary
 
Fields inherited from interface org.apache.uima.simpleserver.config.ServerSpec
PATH_SEPARATOR
 
Constructor Summary
ServerSpecImpl(java.lang.String shortDesc, java.lang.String longDesc)
           
ServerSpecImpl(java.lang.String shortDesc, java.lang.String longDesc, boolean doOutputAll)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerSpecImpl

public ServerSpecImpl(java.lang.String shortDesc,
                      java.lang.String longDesc,
                      boolean doOutputAll)

ServerSpecImpl

public ServerSpecImpl(java.lang.String shortDesc,
                      java.lang.String longDesc)
Method Detail

addTypeMap

public void addTypeMap(TypeMap typeMap)
Description copied from interface: ServerSpec
Add a type map to an existing spec.

Specified by:
addTypeMap in interface ServerSpec
Parameters:
typeMap - The input type map to be added.

getLongDescription

public java.lang.String getLongDescription()
Description copied from interface: ServerSpec
Get the service's long description.

Specified by:
getLongDescription in interface ServerSpec
Returns:
The long description.

getShortDescription

public java.lang.String getShortDescription()
Description copied from interface: ServerSpec
Get the service's short description.

Specified by:
getShortDescription in interface ServerSpec
Returns:
The short description.

getTypeSpecs

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

validate

public java.util.List<SimpleServerException> validate(org.apache.uima.cas.TypeSystem typeSystem)
Description copied from interface: ServerSpec
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.

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

getOutputAll

public boolean getOutputAll()
Description copied from interface: ServerSpec
Check setting to output all types. If this returns true, individual type maps are ignored. Defaults to false.

Specified by:
getOutputAll in interface ServerSpec
Returns:
true iff output of all types is enabled.


Copyright © 2011. All Rights Reserved.