diva.sketch.recognition
Interface TypedData

All Superinterfaces:
XmlBuilder
All Known Implementing Classes:
BulletedData, BulletedItem, BulletedItems, BulletedLine, BulletedList, PanRecognizer.PanData, SimpleData, TextAnnotations, TextBlock, TextData, TextLine, ZoomRecognizer.ZoomData

public interface TypedData
extends XmlBuilder

Typed data refers to a piece of semantic data that results from a recognition process and has an associated type. For example, a SquareRecognizer might return some SquareData that describes a square that it recognized, and that SquareData might has an associated Type object (available through getType()) that uniquely identifies squares.

Most custom recognizers that understand the semantics of the things that they are recognizing will return some custom implementation of the TypedData interface. For example, a handwriting recognizer might retun a TextData object in its recognition results, which contains the actual text that was recognized and whose getType() method returns a type object that uniquely identifies text.

In contrast, there are some generic recognizers that actually know nothing about the semantics of the things they are recognizing. For example, BasicStrokeRecognizer only knows about feature vectors that it extracts from strokes, and is able to map these to string types, such as "square," "circle," or "triangle." For convenience, there is also an implementation of TypedData called SimpleData that actually provides an implementation for such cases when there is no extra semantic information available, and also when the type system has to be dynamic (e.g. if the types are specified in a text file and there is no associated class to go along with them).

Additionally, TypedData extends XmlBuilder, so that recognition results can be saved to and from XML files.

Version:
$Revision: 1.5 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu)
See Also:
Type, SimpleData, Recognition, SceneElement

Method Summary
 Type getType()
          Return the uniquely identifying type associated with this piece of data.
 
Methods inherited from interface diva.util.xml.XmlBuilder
build, generate, setDelegate
 

Method Detail

getType

Type getType()
Return the uniquely identifying type associated with this piece of data.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.