org.annotation.wordfreak.scheme
Class NamedEntityAnnotationScheme

java.lang.Object
  extended byorg.annotation.wordfreak.scheme.AnnotationScheme
      extended byorg.annotation.wordfreak.scheme.DerivativeAnnotationScheme
          extended byorg.annotation.wordfreak.scheme.NamedEntityAnnotationScheme
All Implemented Interfaces:
AnnotatedFileListener, ChooserListener, java.util.EventListener, Plugin, javax.swing.event.TreeModelListener, UndoListener, ViewerListener, WordFreakKeyboardFocusManager.HotKeyListener
Direct Known Subclasses:
CoreferenceAnnotationScheme, RelationAnnotationScheme

public class NamedEntityAnnotationScheme
extends DerivativeAnnotationScheme


Nested Class Summary
 
Nested classes inherited from class org.annotation.wordfreak.scheme.AnnotationScheme
AnnotationScheme.POSFeature
 
Field Summary
protected  java.util.Set base
          Set of types which are considered base annotations.
protected  java.util.Set binary
          Stores binary features that can be assigned to an annotation.
protected static java.lang.String COLOR
           
protected  java.lang.String[] dividers
          Stores string used to seperate types and features when displayed together
protected  int featureOrientation
          Orientation of the feature buttons.
protected  java.lang.String[] features
          Stores the name of features which can be added to a named-entity annotation.
protected  java.util.Map featureValues
          Mapping between features names and their values
protected static java.lang.String GROUP
           
protected  java.util.Set handles
          Set of types which this scheme handles.
static java.lang.String HEAD
          The feature name used to store head information in annotaitons.
protected  java.lang.String iconFeature
          The feture name which icons are associated with.
protected  java.util.Map iconMap
          Mapping between feature values and a resource string path for the icon.
protected static java.lang.String NAME
           
protected  java.lang.String[] negroups
          Stores the name of the group for each name-entity type.
protected static java.lang.String NONE
           
protected  int outcomeOrientation
          Orientation of the outcome buttons.
static java.lang.String ROLE
           
protected  java.util.Map roles
          Stores mapping between types names and a list of roles for that type.
protected  boolean showFeatures
          Determines whether features are displayed
protected  boolean showHead
          Determines whether the head component is displayed
protected static IconSpacer tenSpace
           
 
Fields inherited from class org.annotation.wordfreak.scheme.DerivativeAnnotationScheme
canCreateChains, deleteParagraphs, matcher, pattern, preprocess, recursive
 
Fields inherited from class org.annotation.wordfreak.scheme.AnnotationScheme
_ADD, _MOVE, _RELOAD, _REMOVE, _UPDATE, ANNOTATE, annotationFilter, annotator, annotatorName, canCreateAnnotations, chooser, chooserWidth, COADJUST, COADJUSTLEFT, COADJUSTRIGHT, codes, coloredWords, colors, colorTable, COMMENT, config, configLoaded, confineToBase, currentFile, DEFAULT_ACTION, defaultType, END, files, findIndex, FLATLEFT, FLATNEXT, FLATPREV, FLATRIGHT, groups, GROWLEFT, GROWRIGHT, guiListener, HOME, icons, index, INSERT, JUMP, L2R, LEFT, listeners, navigator, NEXT, NEXTCHUNK, NORM, one2one, one2oneFeature, one2oneValue, orientation, OUTCOME_CODES, OUTCOME_COLORS, OUTCOME_NAMES, outcomes, PREV, PREVCHUNK, R2L, REMOVE, RIGHT, selectedAnnotations, selEnd, selStart, SHRINKLEFT, SHRINKRIGHT, sortCriteria, sorted, sortedIndex, SPLIT, splita, splitb, type, typeMap, typeName, types, update, UPDATE, view, views
 
Constructor Summary
NamedEntityAnnotationScheme(java.lang.String xml)
           
NamedEntityAnnotationScheme(java.lang.String type, Chooser c)
           
 
Method Summary
 void addAnnotationSchemeListener(AnnotationSchemeListener l)
          Registers the specified listener for annotation scheme callbacks.
 void createChooser()
          Instantiates a new chooser if one does not already exist and registers the chooser for scheme events and the scheme for chooser events.
protected  NamedEntityComponent createNamedEntityComponent(boolean showOutcomes)
           
 boolean handlesAnnotation(Annotation a)
           
 boolean handlesBaseAnnotation(Annotation a)
           
 void initOutcomes()
          Initalizes the set of outcomes that this scheme can assign an annotation.
protected  void loadXML()
           
 void process()
           
 void set(java.lang.String choice, int modifiers, boolean jump)
          Specifies that the specified choice has been selected with the specified modifier and that the next annotation should be shown.
 void setConfig(java.util.Map cfg)
          Assigns the configuration specific properties of this scheme.
 void setFeaturesToDisplay(AnnotationSchemeListener l)
           
 
Methods inherited from class org.annotation.wordfreak.scheme.DerivativeAnnotationScheme
addAnnotation, addAnnotation, annotatedFile, annotationFromMouse, findExpression, findExpressionAgain, getInsertCommandFromSelection, getPreprocessing, makeVisible, moveAnnotation, next, offsetToIndex, prev, removeAnnotation, removeAnnotation, removeRedundantChildren, replaceChildrenWithParent, selectCurrentAnnotation, set, setAnnotation, setPreprocessing, setSelection, setSelection, unstyleAnnotation
 
Methods inherited from class org.annotation.wordfreak.scheme.AnnotationScheme
adjudicationMatch, adjudicationMatch, annotationFromMouse, annotationFromMouse, buildSwatches, closeAnnotatedFile, colorize, createView, dispose, down, end, filter, flatNext, flatPrev, getAdjudicationData, getAnnotation, getAnnotation, getAnnotationFilter, getAnnotationsFromFile, getAnnotationsFromOffsets, getAnnotationSize, getChooser, getColorScheme, getConfineToBase, getCurrentAnnotation, getDefaultType, getNames, getPropertyName, getSelectionMode, getSortedIndex, getValuesForFeature, handlesRelation, hilightChunk, home, hotKeyPressed, indexOfAnnotation, isOutcome, jumpToMark, linkAnnotation, nextFile, nextOutcome, notifyListeners, notifyListeners, prevFile, prevOutcome, process, redoPerformed, reload, reloadFiles, removeAllAnnotationSchemeListeners, removeAnnotationSchemeListener, set, set, setAnnotatedFile, setAnnotationFilter, setAnnotationView, setAnnotator, setAnnotatorName, setChooser, setChunkNavigation, setConfineToBase, setFeature, setGuiListener, setJumpAfterAnnotation, setMark, setNavigator, setOneToOne, setOneToOne, setOrientation, setSelectionEnd, setSelectionMode, setSelectionStart, setSelEnd, setSortedIndex, setSortScheme, setTypeName, trackAnnotation, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, undoPerformed, up, updateOutcomes, viewCreated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEAD

public static final java.lang.String HEAD
The feature name used to store head information in annotaitons.

See Also:
Constant Field Values

negroups

protected java.lang.String[] negroups
Stores the name of the group for each name-entity type.


features

protected java.lang.String[] features
Stores the name of features which can be added to a named-entity annotation.


dividers

protected java.lang.String[] dividers
Stores string used to seperate types and features when displayed together


roles

protected java.util.Map roles
Stores mapping between types names and a list of roles for that type.


binary

protected java.util.Set binary
Stores binary features that can be assigned to an annotation.


featureValues

protected java.util.Map featureValues
Mapping between features names and their values


iconFeature

protected java.lang.String iconFeature
The feture name which icons are associated with. Icons for multiple features should be supported in the future.


iconMap

protected java.util.Map iconMap
Mapping between feature values and a resource string path for the icon.


handles

protected java.util.Set handles
Set of types which this scheme handles.


base

protected java.util.Set base
Set of types which are considered base annotations.


showFeatures

protected boolean showFeatures
Determines whether features are displayed


showHead

protected boolean showHead
Determines whether the head component is displayed


outcomeOrientation

protected int outcomeOrientation
Orientation of the outcome buttons.


featureOrientation

protected int featureOrientation
Orientation of the feature buttons.


ROLE

public static final java.lang.String ROLE
See Also:
Constant Field Values

NONE

protected static final java.lang.String NONE
See Also:
Constant Field Values

GROUP

protected static final java.lang.String GROUP
See Also:
Constant Field Values

NAME

protected static final java.lang.String NAME
See Also:
Constant Field Values

COLOR

protected static final java.lang.String COLOR
See Also:
Constant Field Values

tenSpace

protected static IconSpacer tenSpace
Constructor Detail

NamedEntityAnnotationScheme

public NamedEntityAnnotationScheme(java.lang.String xml)

NamedEntityAnnotationScheme

public NamedEntityAnnotationScheme(java.lang.String type,
                                   Chooser c)
Method Detail

initOutcomes

public void initOutcomes()
Description copied from class: AnnotationScheme
Initalizes the set of outcomes that this scheme can assign an annotation.

Specified by:
initOutcomes in class AnnotationScheme

setConfig

public void setConfig(java.util.Map cfg)
Description copied from class: AnnotationScheme
Assigns the configuration specific properties of this scheme.

Overrides:
setConfig in class AnnotationScheme
Parameters:
cfg - a mapping between configuration parameters and their values.

loadXML

protected void loadXML()

set

public void set(java.lang.String choice,
                int modifiers,
                boolean jump)
Description copied from interface: ChooserListener
Specifies that the specified choice has been selected with the specified modifier and that the next annotation should be shown.

Specified by:
set in interface ChooserListener
Overrides:
set in class AnnotationScheme

handlesAnnotation

public boolean handlesAnnotation(Annotation a)
Overrides:
handlesAnnotation in class AnnotationScheme

handlesBaseAnnotation

public boolean handlesBaseAnnotation(Annotation a)
Overrides:
handlesBaseAnnotation in class DerivativeAnnotationScheme

addAnnotationSchemeListener

public void addAnnotationSchemeListener(AnnotationSchemeListener l)
Description copied from class: AnnotationScheme
Registers the specified listener for annotation scheme callbacks.

Overrides:
addAnnotationSchemeListener in class AnnotationScheme
Parameters:
l - The object that will recieve the callbacks.

setFeaturesToDisplay

public void setFeaturesToDisplay(AnnotationSchemeListener l)

createNamedEntityComponent

protected NamedEntityComponent createNamedEntityComponent(boolean showOutcomes)

createChooser

public void createChooser()
Description copied from class: AnnotationScheme
Instantiates a new chooser if one does not already exist and registers the chooser for scheme events and the scheme for chooser events.

Overrides:
createChooser in class DerivativeAnnotationScheme

process

public void process()
Overrides:
process in class DerivativeAnnotationScheme


Copyright © 2004 Thomas Morton and Jeremy LaCivita. All Rights Reserved.