Package help.validator.model
Class TOCItemReference
- java.lang.Object
-
- help.validator.model.TOCItem
-
- help.validator.model.TOCItemReference
-
- All Implemented Interfaces:
java.lang.Comparable<TOCItemReference>
public class TOCItemReference extends TOCItem implements java.lang.Comparable<TOCItemReference>
A representation of thetag, 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, java.nio.file.Path sourceTOCFile, java.lang.String ID, int lineNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(TOCItemReference other)
java.lang.String
generateTOCItemTag(LinkDatabase linkDatabase, boolean isInlineTag, int indentLevel)
Overridden, as if we get called, then something is in an invalid state, so generate special outputjava.lang.String
getTargetAttribute()
Overridden, as references cannot have targets, only their definitionsjava.lang.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
-
-
-
-
Constructor Detail
-
TOCItemReference
public TOCItemReference(TOCItem parentItem, java.nio.file.Path sourceTOCFile, java.lang.String ID, int lineNumber)
-
-
Method Detail
-
validate
public boolean validate(LinkDatabase linkDatabase)
-
getTargetAttribute
public java.lang.String getTargetAttribute()
Overridden, as references cannot have targets, only their definitions- Overrides:
getTargetAttribute
in classTOCItem
-
generateTOCItemTag
public java.lang.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 classTOCItem
-
compareTo
public int compareTo(TOCItemReference other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<TOCItemReference>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-