Package help.validator.model

# Class TOCItemReference

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

All Implemented Interfaces:
  `Comparable<TOCItemReference>`

public class TOCItemReference extends TOCItem implements Comparable<TOCItemReference>
A representation of the <tocref> tag, which is a way to reference a TOC item entry in a TOC_Source.xml file other than the one in which the reference lives.

- ## Field Summary

  ### Fields inherited from class help.validator.model.TOCItem

  `INDENTS, parentItem, targetAttribute, textAttribute, TOC_ITEM_CLOSE_TAG`

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(TOCItemReference other)`
  `String`
  `generateTOCItemTag(LinkDatabase linkDatabase, boolean isInlineTag, int indentLevel)`
  Overridden, as if we get called, then something is in an invalid state, so generate special output
  `String`
  `getTargetAttribute()`
  Overridden, as references cannot have targets, only their definitions
  `String`
  `toString()`
  `boolean`
  `validate(LinkDatabase linkDatabase)`

  ### Methods inherited from class help.validator.model.TOCItem

  `addChild, childCount, equals, generateEndTag, getChildren, getIDAttribute, getLineNumber, getParent, getSortPreference, getSourceFile, getTextAttribute, hashCode, isEquivalent, printChildren, printChildren, removeChild, writeContents, writeContents`

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

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

- ## Constructor Details

  - ### TOCItemReference

    public TOCItemReference(TOCItem parentItem, Path sourceTOCFile, String ID, int lineNumber)

- ## Method Details

  - ### validate

    public boolean validate(LinkDatabase linkDatabase)
    Specified by:
      `validate` in class `TOCItem`

  - ### getTargetAttribute

    public String getTargetAttribute()
    Overridden, as references cannot have targets, only their definitions
    Overrides:
      `getTargetAttribute` in class `TOCItem`

  - ### generateTOCItemTag

    public String generateTOCItemTag(LinkDatabase linkDatabase, boolean isInlineTag, int indentLevel)
    Overridden, as if we get called, then something is in an invalid state, so generate special output
    Overrides:
      `generateTOCItemTag` in class `TOCItem`

  - ### compareTo

    public int compareTo(TOCItemReference other)
    Specified by:
      `compareTo` in interface `Comparable<TOCItemReference>`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`