Class TOCItem

    • Field Detail

      • INDENTS

        protected static final java.lang.String[] INDENTS
      • TOC_ITEM_CLOSE_TAG

        protected static final java.lang.String TOC_ITEM_CLOSE_TAG
        See Also:
        Constant Field Values
      • textAttribute

        protected java.lang.String textAttribute
      • targetAttribute

        protected java.lang.String targetAttribute
      • parentItem

        protected TOCItem parentItem
    • Constructor Detail

      • TOCItem

        public TOCItem​(TOCItem parentItem,
                       java.nio.file.Path sourceFile,
                       java.lang.String ID,
                       int lineNumber)
    • Method Detail

      • 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 java.util.Collection<TOCItem> getChildren()
      • getSortPreference

        public java.lang.String getSortPreference()
      • getLineNumber

        public int getLineNumber()
      • getParent

        public TOCItem getParent()
      • getSourceFile

        public java.nio.file.Path getSourceFile()
      • getIDAttribute

        public java.lang.String getIDAttribute()
      • getTextAttribute

        public java.lang.String getTextAttribute()
      • getTargetAttribute

        public java.lang.String getTargetAttribute()
      • printChildren

        protected java.lang.String printChildren()
      • printChildren

        protected java.lang.String printChildren​(int tabCount)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • isEquivalent

        public boolean isEquivalent​(TOCItem other)
        True if the two items are the same, except that they come from a different source file.
      • writeContents

        public void writeContents​(LinkDatabase linkDatabase,
                                  java.io.PrintWriter writer,
                                  int indentLevel)
      • generateTOCItemTag

        public java.lang.String generateTOCItemTag​(LinkDatabase linkDatabase,
                                                   boolean isInlineTag,
                                                   int indentLevel)
      • generateEndTag

        public java.lang.String generateEndTag​(int indentLevel)
      • writeContents

        public void writeContents​(LinkDatabase linkDatabase,
                                  java.io.PrintWriter writer)