gate.creole.metadata
Annotation Type CreoleParameter


@Documented
@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface CreoleParameter

Annotation used to define a parameter to a CREOLE resource. This annotation should be used to annotate the set method corresponding to the parameter. The parameter's name is inferred from the method name, and its type is inferred from the type of the method's argument. When annotating a method whose argument type is a subtype of Collection, GATE also attempts to infer the collection element type from any generic type arguments given. If the collection type is a raw type then you will need to supply the collectionElementType explicitly in the annotation.

Parameters can be marked as optional or runtime parameters using the appropriate additional annotations.

See Also:
Optional, RunTime

Optional Element Summary
 Class<?> collectionElementType
          The item class name for parameters whose type is a Collection, Set or List.
 String comment
          A descriptive comment about this parameter.
 String defaultValue
          The default value for the parameter, expressed as a string.
 String disjunction
          If this parameter is part of a disjunction, set an ID here.
 int priority
          If this parameter is part of a disjunction, the order in which the disjunctive parameters are listed is determined by their priority values.
 String suffixes
          Semicolon-separated list of file suffixes accepted by default for this parameter.
 

collectionElementType

public abstract Class<?> collectionElementType
The item class name for parameters whose type is a Collection, Set or List. When annotating a field or get method with a parameterised type (e.g. List<String>), the correct value can often be inferred automatically, but if a value is specified here it takes precedence.

Default:
gate.creole.metadata.CreoleParameter.NoElementType.class

defaultValue

public abstract String defaultValue
The default value for the parameter, expressed as a string. For non-string parameters, follow the rules given in the user guide. If not specified, the default is null.

Default:
"____NO_DEFAULT____"

comment

public abstract String comment
A descriptive comment about this parameter.

Default:
""

suffixes

public abstract String suffixes
Semicolon-separated list of file suffixes accepted by default for this parameter. For parameters of type URL, the GUI provides a button to locate the desired file in a Java file chooser. The suffixes list defines the default file name filter used by the file chooser.

Default:
""

disjunction

public abstract String disjunction
If this parameter is part of a disjunction, set an ID here. All parameters sharing the same disjunction ID will be grouped together in a single disjunction. If not specified, the parameter will not be considered as part of a disjunction.

Default:
""

priority

public abstract int priority
If this parameter is part of a disjunction, the order in which the disjunctive parameters are listed is determined by their priority values. Parameters with smaller priority values are considered "more important" than those with larger values (i.e. 1 is higher priority than 10). When creating a new resource instance in GATE Developer, the parameters dialog offers the parameters in each disjunction in priority order, so you should assign priorities to your parameters such that the most important parameter in each disjunction is the most frequent use case. For example, in a JAPE transducer the grammarURL parameter (for loading a .jape file) is considered more important than the binaryGrammarURL (for loading a serialized transducer).

Default:
2147483647