Package com.itextpdf.kernel.validation
Class Pdf20Checker.ParentChildRelationshipHandler
- java.lang.Object
-
- com.itextpdf.kernel.validation.Pdf20Checker.ParentChildRelationshipHandler
-
- All Implemented Interfaces:
ITagTreeIteratorHandler
- Enclosing class:
- Pdf20Checker
static final class Pdf20Checker.ParentChildRelationshipHandler extends java.lang.Object implements ITagTreeIteratorHandler
-
-
Field Summary
Fields Modifier and Type Field Description private TagStructureContexttagStructureContext
-
Constructor Summary
Constructors Constructor Description ParentChildRelationshipHandler(TagStructureContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(IStructureNode node)Checks whether the element should be traversed.voidprocessElement(IStructureNode elem)Called when the next element is reached during the traversal to process it.private java.lang.StringresolveRole(PdfStructElem elem)private static voidthrowInvalidRelationshipException(java.lang.String parentRole, java.lang.String childRole)
-
-
-
Field Detail
-
tagStructureContext
private final TagStructureContext tagStructureContext
-
-
Constructor Detail
-
ParentChildRelationshipHandler
public ParentChildRelationshipHandler(TagStructureContext context)
-
-
Method Detail
-
throwInvalidRelationshipException
private static void throwInvalidRelationshipException(java.lang.String parentRole, java.lang.String childRole)
-
resolveRole
private java.lang.String resolveRole(PdfStructElem elem)
-
accept
public boolean accept(IStructureNode node)
Description copied from interface:ITagTreeIteratorHandlerChecks whether the element should be traversed.- Specified by:
acceptin interfaceITagTreeIteratorHandler- Parameters:
node- the element to check- Returns:
trueif the iteration should be continued,falseotherwise
-
processElement
public void processElement(IStructureNode elem)
Description copied from interface:ITagTreeIteratorHandlerCalled when the next element is reached during the traversal to process it.- Specified by:
processElementin interfaceITagTreeIteratorHandler- Parameters:
elem- the element to process
-
-