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 Details

    • INDENTS

      protected static final String[] INDENTS
    • TOC_ITEM_CLOSE_TAG

      protected static final String TOC_ITEM_CLOSE_TAG
      See Also:
    • 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)