public class SectionInfo
extends Object
SectionInfoStack
that maintains the current stacking order within the source text being
processed. Modifier and Type | Field and Description |
---|---|
static int |
defaultDepth
Default depth for a section: Value = 0.
|
static int |
defaultIndexFlag
Default state for Index/No-Index Flag.
|
static int |
defaultSectionBump
Default word bump for a section: Value = 0.
|
static String |
defaultSectionType
Default section type name: Value = "".
|
static int |
defaultSentenceBump
Default sentence bump for a section: Value = 5.
|
static int |
defaultSpellFlag
Default state for Spell/No-Spell Flag.
|
static String |
defaultSubDocument
Default subdocument: Value = null.
|
static float |
defaultWordBoost
Default word boost for a section: Value = 1.0f.
|
int |
depth
Depth count for a section.
|
static int |
index
Index/No-Index Flag Value: Index the current section.
|
int |
indexFlag
Index flag for a section.
|
LinkedList |
metaInfo
Meta-data collection list for a subdocument.
|
static int |
noIndex
Index/No-Index Flag Value: Index the current section.
|
static int |
noSpell
No-Spell Flag Value: Do not add words from the current section to the
spelling correction dictionary.
|
static int |
parentIndex
Index/No-Index Flag Value: Use parent section index/no-index state.
|
static int |
parentSectionBump
Special Section Bump: Value = Use parent's section bump.
|
static int |
parentSpell
Spell/No-Spell Flag Value: Use parent section spell/no-spell state.
|
int |
prevSectionBump
Previous section bump for this section.
|
int |
sectionBump
Word bump to add for a section.
|
String |
sectionType
Type name for a section.
|
int |
sentenceBump
Sentence bump value for this section.
|
static int |
spell
Spell Flag Value: Add words from the current section to the
spelling correction dictionary.
|
int |
spellFlag
Spell flag for a section.
|
String |
subDocument
Name for a subdocument.
|
float |
wordBoost
Word boost value for this section.
|
Constructor and Description |
---|
SectionInfo()
Default Constructor.
|
SectionInfo(int depth,
int indexFlag,
String sectionType,
int sectionBump,
float wordBoost,
int sentenceBump,
int spellFlag,
String subDocument,
LinkedList metaInfo)
Explicit Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
restoreSectionBump()
Restore a previously saved section bump value.
|
int |
saveSectionBump()
Saves the section bump value for later restore.
|
public static final int parentIndex
SectionInfo
instance. It is only passed as an argument
to the
explicit section push
method defined by the SectionInfoStack
class. That method in turn uses the parent section's index flag value,
which will be either
index
or
noIndex
.
public static final int noIndex
indexFlag
field
to indicate that the current section should not be indexed.
public static final int index
indexFlag
field
to indicate that the current section should be indexed.
public static final int parentSectionBump
sectionBump
field indicates that the parent's section bump value should be used.
SectionInfo
instance. It is only passed as
an argument to the
explicit section push
method defined by the SectionInfoStack
class. That method in turn uses the parent section's bump value for the
new entry on the stack.public static final int defaultIndexFlag
indexFlag
field whenever a SectionInfo
class is constructed.
public static final String defaultSectionType
sectionType
field whenever a SectionInfo
class is constructed.
public static final String defaultSubDocument
subDocument
field whenever a SectionInfo
class is constructed.
public static final int defaultSectionBump
sectionBump
field whenever a SectionInfo
class is constructed. public static final float defaultWordBoost
wordBoost
field whenever a SectionInfo
class is constructed.
public static final int defaultSentenceBump
sentenceBump
field whenever a SectionInfo
class is constructed.
public static final int defaultDepth
depth
field whenever a SectionInfo
class is constructed.
public static final int parentSpell
SectionInfo
instance. It is only passed as an argument
to the
explicit section push
method defined by the SectionInfoStack
class. That method in turn uses the parent section's spell flag value,
which will be either
spell
or
noSpell
.
public static final int noSpell
spellFlag
field
to indicate that words from the current section should not be added to
the spelling correction dictionary.
public static final int spell
spellFlag
field
to indicate that words from the current section should be added to the
spelling correction dictionary.
public static final int defaultSpellFlag
spellFlag
field whenever a SectionInfo
class is constructed.
public int depth
public int indexFlag
parentIndex
,
noIndex
,
and index
.parentIndex
is never actually stored in the index flag attribute for a
SectionInfo
instance. It is only passed as an argument to the
explicit section push
method defined by the SectionInfoStack
class. That method in turn uses the parent section's index flag value,
which will be either
index
or
noIndex
.
public String sectionType
public int sectionBump
public int prevSectionBump
parentSectionBump
is never actually stored in the sectionBump attribute for a
SectionInfo
instance. It is only passed as an argument to the
explicit section push
method defined by the SectionInfoStack
class. That method in turn uses the parent section's bump value. public float wordBoost
public int sentenceBump
public int spellFlag
parentSpell
,
noSpell
,
and spell
.parentSpell
is never actually stored in the spell flag attribute for a
SectionInfo
instance. It is only passed as an argument to the
explicit section push
method defined by the SectionInfoStack
class. That method in turn uses the parent section's spell flag value,
which will be either
spell
or
noSpell
.
public String subDocument
public LinkedList metaInfo
public SectionInfo()
SectionInfo
instance to
reasonable default values. defaultDepth
,
defaultIndexFlag
,
defaultSectionType
,
defaultSectionBump
,
defaultWordBoost
,
and
defaultSentenceBump
constants for more on the actual values set. public SectionInfo(int depth, int indexFlag, String sectionType, int sectionBump, float wordBoost, int sentenceBump, int spellFlag, String subDocument, LinkedList metaInfo)
SectionInfo
instance to
values passed by the caller. public int saveSectionBump()
sectionBump
field is reset to zero in anticipation of accumulating bump values
from previous sections. public void restoreSectionBump()
saveSectionBump()
.