diva.sketch.toolbox
Class TextAnnotations

java.lang.Object
  extended by diva.util.xml.AbstractXmlBuilder
      extended by diva.sketch.toolbox.TextAnnotations
All Implemented Interfaces:
TypedData, XmlBuilder
Direct Known Subclasses:
BulletedData, BulletedItem, BulletedItems, BulletedLine, BulletedList, TextBlock, TextLine

public abstract class TextAnnotations
extends AbstractXmlBuilder
implements TypedData

An abstract typed data that holds a recognized text string and annotations about the geometry of the text including the character height and width.

Version:
$Revision: 1.2 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu)

Field Summary
static String CHAR_HEIGHT
           
static String CHAR_WIDTH
           
 
Constructor Summary
TextAnnotations()
           
TextAnnotations(double charHeight, double charWidth)
           
 
Method Summary
 Object build(XmlElement elt, String type)
          Given an XmlElement, create and return an internal representtion of it.
 boolean equals(Object o)
           
 XmlElement generate(Object in)
          Unable to generate XML by default.
 double getCharHeight()
           
 double getCharWidth()
           
 void setCharHeight(double charHeight)
           
 void setCharWidth(double charWidth)
           
 String toString()
           
 
Methods inherited from class diva.util.xml.AbstractXmlBuilder
getDelegate, setDelegate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface diva.sketch.recognition.TypedData
getType
 
Methods inherited from interface diva.util.xml.XmlBuilder
setDelegate
 

Field Detail

CHAR_HEIGHT

public static final String CHAR_HEIGHT
See Also:
Constant Field Values

CHAR_WIDTH

public static final String CHAR_WIDTH
See Also:
Constant Field Values
Constructor Detail

TextAnnotations

public TextAnnotations()

TextAnnotations

public TextAnnotations(double charHeight,
                       double charWidth)
Method Detail

generate

public XmlElement generate(Object in)
                    throws Exception
Description copied from class: AbstractXmlBuilder
Unable to generate XML by default.

Specified by:
generate in interface XmlBuilder
Overrides:
generate in class AbstractXmlBuilder
Throws:
Exception

build

public Object build(XmlElement elt,
                    String type)
             throws Exception
Description copied from class: AbstractXmlBuilder
Given an XmlElement, create and return an internal representtion of it. Implementors should also provide a more type-specific version of this method:
   public Graph build (XmlELement elt, String type);
 

Specified by:
build in interface XmlBuilder
Specified by:
build in class AbstractXmlBuilder
Throws:
Exception

getCharHeight

public double getCharHeight()

getCharWidth

public double getCharWidth()

setCharHeight

public void setCharHeight(double charHeight)

setCharWidth

public void setCharWidth(double charWidth)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


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