Package help.validator.model

# Class TOCItem

java.lang.Object
help.validator.model.TOCItem

Direct Known Subclasses:
  `TOCItemDefinition`, `TOCItemExternal`, `TOCItemReference`

public abstract class TOCItem extends Object
A Table of Contents entry, which is represented in the help output as an xml tag.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final String[]`
  `INDENTS`
  `protected TOCItem`
  `parentItem`
  `protected String`
  `targetAttribute`
  `protected String`
  `textAttribute`
  `protected static final String`
  `TOC_ITEM_CLOSE_TAG`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TOCItem(TOCItem parentItem, Path sourceFile, String ID, int lineNumber)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `addChild(TOCItem child)`
  `protected int`
  `childCount()`
  `boolean`
  `equals(Object obj)`
  `String`
  `generateEndTag(int indentLevel)`
  `String`
  `generateTOCItemTag(LinkDatabase linkDatabase, boolean isInlineTag, int indentLevel)`
  `protected Collection<TOCItem>`
  `getChildren()`
  `String`
  `getIDAttribute()`
  `int`
  `getLineNumber()`
  `TOCItem`
  `getParent()`
  `String`
  `getSortPreference()`
  `Path`
  `getSourceFile()`
  `String`
  `getTargetAttribute()`
  `String`
  `getTextAttribute()`
  `int`
  `hashCode()`
  `boolean`
  `isEquivalent(TOCItem other)`
  True if the two items are the same, except that they come from a different source file.
  `protected String`
  `printChildren()`
  `protected String`
  `printChildren(int tabCount)`
  `protected void`
  `removeChild(TOCItem child)`
  `abstract boolean`
  `validate(LinkDatabase linkDatabase)`
  `void`
  `writeContents(LinkDatabase linkDatabase, PrintWriter writer)`
  `void`
  `writeContents(LinkDatabase linkDatabase, PrintWriter writer, int indentLevel)`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### INDENTS

    protected static final String[] INDENTS

  - ### TOC_ITEM_CLOSE_TAG

    protected static final String TOC_ITEM_CLOSE_TAG
    See Also:
      - Constant Field Values

  - ### textAttribute

    protected String textAttribute

  - ### targetAttribute

    protected String targetAttribute

  - ### parentItem

    protected TOCItem parentItem

- ## Constructor Details

  - ### TOCItem

    public TOCItem(TOCItem parentItem, Path sourceFile, String ID, int lineNumber)

- ## Method Details

  - ### validate

    public abstract boolean validate(LinkDatabase linkDatabase)

  - ### childCount

    protected int childCount()

  - ### addChild

    protected void addChild(TOCItem child)

  - ### removeChild

    protected void removeChild(TOCItem child)

  - ### getChildren

    protected Collection<TOCItem> getChildren()

  - ### getSortPreference

    public String getSortPreference()

  - ### getLineNumber

    public int getLineNumber()

  - ### getParent

    public TOCItem getParent()

  - ### getSourceFile

    public Path getSourceFile()

  - ### getIDAttribute

    public String getIDAttribute()

  - ### getTextAttribute

    public String getTextAttribute()

  - ### getTargetAttribute

    public String getTargetAttribute()

  - ### printChildren

    protected String printChildren()

  - ### printChildren

    protected String printChildren(int tabCount)

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### isEquivalent

    public boolean isEquivalent(TOCItem other)
    True if the two items are the same, except that they come from a different source file.
    Parameters:
      `other` - the other item
    Returns:
      true if equivalent

  - ### writeContents

    public void writeContents(LinkDatabase linkDatabase, PrintWriter writer, int indentLevel)

  - ### generateTOCItemTag

    public String generateTOCItemTag(LinkDatabase linkDatabase, boolean isInlineTag, int indentLevel)

  - ### generateEndTag

    public String generateEndTag(int indentLevel)

  - ### writeContents

    public void writeContents(LinkDatabase linkDatabase, PrintWriter writer)