org.WeaselReader.PalmIO
Class ZtxtDB.Annotations

java.lang.Object
  extended by org.WeaselReader.PalmIO.Bookmarks
      extended by org.WeaselReader.PalmIO.ZtxtDB.Annotations
Enclosing class:
ZtxtDB

public class ZtxtDB.Annotations
extends Bookmarks

A collection of annotations. An annotation is essentially a bookmark with an extra block of text. The annotation index is identical in format to the bookmark index. In a zTXT database file, the text of each annotation would occupy the records following the index record. The annotation text has a maximum size of 4096 bytes.


Field Summary
private  java.lang.String[] annotationText
          The text of each annotation in a zTXT.
 
Fields inherited from class org.WeaselReader.PalmIO.Bookmarks
length
 
Constructor Summary
ZtxtDB.Annotations(int[] offsets, java.lang.String[] titles, java.lang.String[] annotationText)
          Create a new annotation collection.
 
Method Summary
 java.lang.String getAnnotationText(int index)
          Get the block of text associated with the given annotation.
 java.lang.String[] getAnnotationTextArray()
          Get the array containing the annotation text blocks.
 
Methods inherited from class org.WeaselReader.PalmIO.Bookmarks
getOffset, getOffsetArray, getTitle, getTitleArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

annotationText

private final java.lang.String[] annotationText
The text of each annotation in a zTXT.

Constructor Detail

ZtxtDB.Annotations

public ZtxtDB.Annotations(int[] offsets,
                          java.lang.String[] titles,
                          java.lang.String[] annotationText)
Create a new annotation collection. The annotation collection is read-only once created.

Parameters:
offsets - an int array containing the byte offsets for each annotation.
titles - a String array containing the titles for each annotation.
annotationText - a String array containing the text for each annotation.
Method Detail

getAnnotationText

public java.lang.String getAnnotationText(int index)
Get the block of text associated with the given annotation.

Parameters:
index - the index of the annotation for which to get the text.
Returns:
the text block for the given annotation.

getAnnotationTextArray

public java.lang.String[] getAnnotationTextArray()
Get the array containing the annotation text blocks.

Returns:
a String array containing the text blocks of all annotations.