edu.mit.sketch.system
Class InterpretationIndex

java.lang.Object
  |
  +--edu.mit.sketch.system.InterpretationIndex

public class InterpretationIndex
extends Object

A collection of all the items that need to be displayed. The interpretation index contains both the original strokes and links to their interpretations. It can get more complicated if necessary, for example, to communicate conflicts in the interpretations to the UI who can ask the user to help the system resolve these conflicts. Change or extend this class to do that.

Created: Tue Mar 5 11:07:50 2002
Copyright: Copyright (C) 2001 by MIT. All rights reserved.


Constructor Summary
InterpretationIndex()
           
InterpretationIndex(InterpretationIndex index)
           
 
Method Summary
 void addInterpretation(BBItem w, Collection roots)
          If you try to add an interpretation that already exists, it just gets ignored.
 void clear()
           
 Collection getInterpretations()
           
 Collection getStrokes()
           
 Collection getStrokesForInterpretation(BBItem w)
           
 void removeInterpretation(BBItem w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterpretationIndex

public InterpretationIndex()

InterpretationIndex

public InterpretationIndex(InterpretationIndex index)
Method Detail

getInterpretations

public Collection getInterpretations()

getStrokes

public Collection getStrokes()

getStrokesForInterpretation

public Collection getStrokesForInterpretation(BBItem w)

addInterpretation

public void addInterpretation(BBItem w,
                              Collection roots)
If you try to add an interpretation that already exists, it just gets ignored. That is, if it's the exact same item. It is up to whoever is using this class to make sure there are no conflicts in the interpretations. See note above about making this class more interesting.

removeInterpretation

public void removeInterpretation(BBItem w)

clear

public void clear()