gate.gui.teamware
Class TeamwareUtils

java.lang.Object
  extended by gate.gui.teamware.TeamwareUtils

public class TeamwareUtils
extends Object

Class containing utility methods for GATE teamware.


Field Summary
static String INPUT_ANNOTATION_SETS_FEATURE
           
static String OUTPUT_ANNOTATION_SETS_FEATURE
           
 
Constructor Summary
private TeamwareUtils()
          Private constructor - this class should not be instantiated.
 
Method Summary
static Set<String> getInputAnnotationSets(Controller c)
          Get the set of annotation set names that an application requires for input.
static Set<String> getLikelyInputAnnotationSets(Controller c)
          Analyse the given controller and return a list of likely candidate input annotation sets.
static Set<String> getLikelyOutputAnnotationSets(Controller c)
          Analyse the given controller and return a list of likely candidate output annotation sets.
static Set<String> getOutputAnnotationSets(Controller c)
          Get the set of annotation set names that an application uses for output.
private static void populateInputSetNamesForController(Set<String> setNames, Controller c, boolean strict)
          Populate the set of input annotation set names for a controller based on heuristics.
private static void populateOutputSetNamesForController(Set<String> setNames, Controller c, boolean strict)
          Populate the set of output annotation set names for a controller based on heuristics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT_ANNOTATION_SETS_FEATURE

public static final String INPUT_ANNOTATION_SETS_FEATURE
See Also:
Constant Field Values

OUTPUT_ANNOTATION_SETS_FEATURE

public static final String OUTPUT_ANNOTATION_SETS_FEATURE
See Also:
Constant Field Values
Constructor Detail

TeamwareUtils

private TeamwareUtils()
Private constructor - this class should not be instantiated.

Method Detail

getInputAnnotationSets

public static Set<String> getInputAnnotationSets(Controller c)
Get the set of annotation set names that an application requires for input. If the controller does not yet have a set of input annotation set names, an initial one is constructed using some simple heuristics. The returned set is a reference to the controller's stored set of annotation set names, and changes will propagate back to the controller. The set may be empty, and it may contain a null entry (denoting the default annotation set).


getLikelyInputAnnotationSets

public static Set<String> getLikelyInputAnnotationSets(Controller c)
Analyse the given controller and return a list of likely candidate input annotation sets. The set will not be empty, as it will always include at least a null entry, denoting the default annotation set.


populateInputSetNamesForController

private static void populateInputSetNamesForController(Set<String> setNames,
                                                       Controller c,
                                                       boolean strict)
Populate the set of input annotation set names for a controller based on heuristics. In the strict case we assume that if a PR in the controller has an inputASName parameter whose value is not the default set, and there is no PR earlier in the pipeline which has the same set as its outputASName or annotationSetName parameter, then it is probably a set that needs to be provided externally. In the non-strict case we simply take all inputASName and annotationSetName parameter values from the controller's PRs, without regard for whether they may have been satisfied by an earlier PR in the pipeline.

Parameters:
setNames -
c -
strict -

getOutputAnnotationSets

public static Set<String> getOutputAnnotationSets(Controller c)
Get the set of annotation set names that an application uses for output. If the controller does not yet have a set of output annotation set names, an initial one is constructed using some simple heuristics. The returned set is a reference to the controller's stored set of annotation set names, and changes will propagate back to the controller. The set may be empty, and it may contain a null entry (denoting the default annotation set).


getLikelyOutputAnnotationSets

public static Set<String> getLikelyOutputAnnotationSets(Controller c)
Analyse the given controller and return a list of likely candidate output annotation sets. The set will not be empty, as it will always include at least a null entry, denoting the default annotation set.


populateOutputSetNamesForController

private static void populateOutputSetNamesForController(Set<String> setNames,
                                                        Controller c,
                                                        boolean strict)
Populate the set of output annotation set names for a controller based on heuristics. In the strict case, we assume that if a PR in the controller has an outputASName or annotationSetName parameter whose value is not used as the inputASName or annotationSetName of a later PR then it is probably a set that will be output from the controller. In the non-strict case we simply take all outputASName and annotationSetName parameter values from the controller's PRs without regard for which ones may simply be feeding later PRs in the controller (also, the default annotation set is always included in non-strict mode).