org.apache.uima.search
Interface Style

All Superinterfaces:
Serializable, XMLizable

public interface Style
extends XMLizable, Serializable

An indexing style. A set of indexing sytles make up a IndexRule, which is then applied to an IndexBuildItem in order to assign indexing behavior to an annotation type.

We support an open-ended schema for styles. Each style has a name and zero or more getAttributes(), where each attribute has a name and a value. Any given indexer implementation can declare which styles it implements, and which attributes it supports. An indexer should gracefully handle unknown styles or attributes and report them in an appropriate manner.

The following styles and attributes are currently defined:

This object implements the XMLizable interface and can be parsed from an XML representation.


Field Summary
static String ANNOTATION
          Constant for the name of the Annotation style.
static String BREAKING
          Constant for the name of the Breaking style.
static String TERM
          Constant for the name of the Term style.
 
Method Summary
 String getAttribute(String aName)
          Gets the value of an attribute with the given name.
 Mapping[] getAttributeMappings()
          Gets the mappings that specify which features (properties) of the annotation should be indexed, and under which names.
 Attribute[] getAttributes()
          Gets the Attributes for this style.
 String getName()
          Gets the name of this style.
 void setAttributeMappings(Mapping[] aMappings)
          Sets the mappings that specify which features (properties) of the annotation should be indexed, and under which names.
 void setAttributes(Attribute[] aAttributes)
          Sets the Attributes for this style.
 void setName(String aName)
          Sets the name of this style.
 
Methods inherited from interface org.apache.uima.util.XMLizable
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
 

Field Detail

TERM

static final String TERM
Constant for the name of the Term style.

See Also:
Constant Field Values

BREAKING

static final String BREAKING
Constant for the name of the Breaking style.

See Also:
Constant Field Values

ANNOTATION

static final String ANNOTATION
Constant for the name of the Annotation style.

See Also:
Constant Field Values
Method Detail

getName

String getName()
Gets the name of this style. See the class comment for a list of defined style names. Implementations must make sure that all names are String.intern()ed so that they can be compared with the == operator.

Returns:
the name of this style

setName

void setName(String aName)
Sets the name of this style. See the class comment for a list of defined style names. Implementations must make sure that all names are String.intern()ed so that they can be compared with the == operator.

Parameters:
aName - the name of this style

getAttributes

Attribute[] getAttributes()
Gets the Attributes for this style. See the class comment for a list of defined attributes for each style name.

Returns:
the attibutes for this style.

setAttributes

void setAttributes(Attribute[] aAttributes)
Sets the Attributes for this style. See the class comment for a list of defined attributes for each style name.

Parameters:
aAttributes - the attibutes for this style.

getAttribute

String getAttribute(String aName)
Gets the value of an attribute with the given name.

Parameters:
aName - name of an attribute
Returns:
the value of the named attribute, null if there is no such attribute declared on this style

getAttributeMappings

Mapping[] getAttributeMappings()
Gets the mappings that specify which features (properties) of the annotation should be indexed, and under which names.

Returns:
an array of objects that each specify a mapping from a CAS feature name to the name under which this feature should be recorded in the index.

setAttributeMappings

void setAttributeMappings(Mapping[] aMappings)
Sets the mappings that specify which features (properties) of the annotation should be indexed, and under which names.



Copyright © 2010 The Apache Software Foundation. All Rights Reserved.