gate.jape.constraint
Class StringAccessor
java.lang.Object
gate.jape.constraint.MetaPropertyAccessor
gate.jape.constraint.StringAccessor
- All Implemented Interfaces:
- AnnotationAccessor, Serializable
- Direct Known Subclasses:
- CleanStringAccessor
public class StringAccessor
- extends MetaPropertyAccessor
Accessor that returns the underlying string of an annotation in a document.
- Version:
- $Revision$
- Author:
- esword
- See Also:
- Serialized Form
StringAccessor
public StringAccessor()
getValue
public Object getValue(Annotation annot,
AnnotationSet context)
- Return the underlying string for the annotation. Context
must be a
Document or an AnnotationSet which
points to the document.
context - optional parameter with information about the
context in which the annotation has meaning. Normally this
would be a Document. Not all accessors will
require the context information so it may be null. Some
accessor implementations may throw an exception without
it.
- Returns:
getKey
public Object getKey()
- Always returns "string", the name of the meta-property which this
accessor provides.
- Specified by:
getKey in interface AnnotationAccessor- Specified by:
getKey in class MetaPropertyAccessor
- Returns: