org.apache.uima.simpleserver.config
Class ConfigFactory

java.lang.Object
  extended by org.apache.uima.simpleserver.config.ConfigFactory

public final class ConfigFactory
extends java.lang.Object

Creates config objects. This class is used internally when reading in config files. Similarly, it may be used to create config objects programmatically.


Constructor Summary
ConfigFactory()
           
 
Method Summary
static AndFilter newAndFilter()
          Create a new filter conjunction.
static Condition newCondition(FilterOp type)
          Create new Condition with null value.
static Condition newCondition(FilterOp type, java.lang.String value)
          Create new Condition.
static OrFilter newOrFilter()
          Create a new filter disjunction.
static Output newOutput(java.util.List<java.lang.String> path, java.lang.String attribute, java.lang.String shortDescription, java.lang.String longDescription)
          Create a new output mapping.
static ServerSpec newServerSpec(java.lang.String shortDescription, java.lang.String longDescription, boolean doOutputAll)
          Create a new server specification.
static SimpleFilter newSimpleFilter(java.util.List<java.lang.String> featurePath, Condition condition)
          Create a new Filter.
static TypeMap newTypeMap(java.lang.String typeName, Filter filter, java.lang.String outputTag, boolean coveredText)
          Create a new type map.
static TypeMap newTypeMap(java.lang.String typeName, Filter filter, java.lang.String outputTag, boolean coveredText, boolean outputAll, java.lang.String shortDescription, java.lang.String longDescription)
          Create a new type map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigFactory

public ConfigFactory()
Method Detail

newServerSpec

public static ServerSpec newServerSpec(java.lang.String shortDescription,
                                       java.lang.String longDescription,
                                       boolean doOutputAll)
Create a new server specification.

Parameters:
shortDescription - Short description of service.
longDescription - Verbose description of service.
doOutputAll - Output all types, regardless of individual type maps.
Returns:
A new service config object.

newTypeMap

public static TypeMap newTypeMap(java.lang.String typeName,
                                 Filter filter,
                                 java.lang.String outputTag,
                                 boolean coveredText)
Create a new type map.

Parameters:
typeName - The UIMA type name (input).
outputTag - A XML tag name (output).
coveredText - Output covered text, yes or no.
Returns:
A new type map object. Can be added to a server spec.

newTypeMap

public static TypeMap newTypeMap(java.lang.String typeName,
                                 Filter filter,
                                 java.lang.String outputTag,
                                 boolean coveredText,
                                 boolean outputAll,
                                 java.lang.String shortDescription,
                                 java.lang.String longDescription)
Create a new type map.

Parameters:
typeName - The UIMA type name (input).
outputTag - A XML tag name (output).
coveredText - Output covered text, yes or no.
shortDescription - Short description of map.
longDescription - Verbose description of map.
Returns:
A new type map object. Can be added to a server spec.

newOutput

public static Output newOutput(java.util.List<java.lang.String> path,
                               java.lang.String attribute,
                               java.lang.String shortDescription,
                               java.lang.String longDescription)
Create a new output mapping.

Parameters:
path - Feature path whose value will be output.
attribute - XML attribute that will contain the output.
shortDescription - A short description of the output mapping.
longDescription - A verbose description of the output mapping.
Returns:
A new output mapping. Can be added to a type map.

newSimpleFilter

public static SimpleFilter newSimpleFilter(java.util.List<java.lang.String> featurePath,
                                           Condition condition)
Create a new Filter.

Parameters:
featurePath - Feature path whose value the filter operates on. Must not be null.
condition - The condition the path's value must satisfy.
Returns:
A new Filter.

newAndFilter

public static AndFilter newAndFilter()
Create a new filter conjunction.

Returns:
A new filter conjunction.

newOrFilter

public static OrFilter newOrFilter()
Create a new filter disjunction.

Returns:
A new filter disjunction.

newCondition

public static Condition newCondition(FilterOp type,
                                     java.lang.String value)
Create new Condition.

Parameters:
type - The condition's type (not null, equals etc.).
value - Value for equality constraints.
Returns:
A new Condition.

newCondition

public static Condition newCondition(FilterOp type)
Create new Condition with null value.

Parameters:
type - The condition's type (not null, etc.).
Returns:
A new Condition.


Copyright © 2011. All Rights Reserved.