Package help.validator.model
Class TOCItem
- java.lang.Object
-
- help.validator.model.TOCItem
-
- Direct Known Subclasses:
TOCItemDefinition
,TOCItemExternal
,TOCItemReference
public abstract class TOCItem extends java.lang.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 java.lang.String[]
INDENTS
protected TOCItem
parentItem
protected java.lang.String
targetAttribute
protected java.lang.String
textAttribute
protected static java.lang.String
TOC_ITEM_CLOSE_TAG
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addChild(TOCItem child)
protected int
childCount()
boolean
equals(java.lang.Object obj)
java.lang.String
generateEndTag(int indentLevel)
java.lang.String
generateTOCItemTag(LinkDatabase linkDatabase, boolean isInlineTag, int indentLevel)
protected java.util.Collection<TOCItem>
getChildren()
java.lang.String
getIDAttribute()
int
getLineNumber()
TOCItem
getParent()
java.lang.String
getSortPreference()
java.nio.file.Path
getSourceFile()
java.lang.String
getTargetAttribute()
java.lang.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 java.lang.String
printChildren()
protected java.lang.String
printChildren(int tabCount)
protected void
removeChild(TOCItem child)
abstract boolean
validate(LinkDatabase linkDatabase)
void
writeContents(LinkDatabase linkDatabase, java.io.PrintWriter writer)
void
writeContents(LinkDatabase linkDatabase, java.io.PrintWriter writer, int indentLevel)
-
-
-
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.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)
-
-