wxtpages
Class indexEntry

java.lang.Object
  extended bywxtpages.indexEntry

public class indexEntry
extends java.lang.Object

An instance of indexEntry holds an entry for an index table.


Constructor Summary
indexEntry(java.lang.String w, unitPage p, java.lang.String f)
          Creates a new instance of indexEntry
 
Method Summary
 int compare(indexEntry e)
          Get the order of an entry compared to this entry
 java.lang.String getFragment()
          Get the fragment for this indexEntry
 unitPage getPage()
          Get the page for this indexEntry
 java.lang.String getWord()
          Get the word for this indexEntry
 org.w3c.dom.Element getWordEntryElement(unitPage ownerP, java.lang.String eltType)
          Produce an element with a word-entry Introduce the style: ixentry
 org.w3c.dom.Element getWordHeadElement(unitPage ownerP, java.lang.String eltType)
          Produce an element with a word-heading Introduce the style: ixword
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

indexEntry

public indexEntry(java.lang.String w,
                  unitPage p,
                  java.lang.String f)
Creates a new instance of indexEntry

Parameters:
w - The word we will index
p - The page we will refer to, the page where w occurs
f - The fragment within the page
Method Detail

getWord

public java.lang.String getWord()
Get the word for this indexEntry

Returns:
The keyword

getPage

public unitPage getPage()
Get the page for this indexEntry

Returns:
The page

getFragment

public java.lang.String getFragment()
Get the fragment for this indexEntry

Returns:
The fragment

compare

public int compare(indexEntry e)
Get the order of an entry compared to this entry

Parameters:
e - The indexentry to compare with
Returns:
paralell to String::comparetoIgnoreCase

getWordHeadElement

public org.w3c.dom.Element getWordHeadElement(unitPage ownerP,
                                              java.lang.String eltType)
Produce an element with a word-heading Introduce the style: ixword

Parameters:
ownerP - The page that will own the indextable
eltType - Type of element, normally div or span
Returns:
an Element of type div or span with classattribute ixword and content word

getWordEntryElement

public org.w3c.dom.Element getWordEntryElement(unitPage ownerP,
                                               java.lang.String eltType)
Produce an element with a word-entry Introduce the style: ixentry

Parameters:
eltType - normally div or span
ownerP - The page that will own the indextable
Returns:
an Element of type div or span with classattribute ixentry and pagereference