Skip to content

Commit

Permalink
Merge pull request #623 from veraPDF/struct_elem_parent
Browse files Browse the repository at this point in the history
Add getcontainsParent to GFPDStructElem
  • Loading branch information
MaximPlusov authored and Git User committed Dec 14, 2023
1 parent 5bb01e2 commit a56ec4d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ public String getparentStandardType() {
parentStandardStructureType = org.verapdf.pd.structure.PDStructElem.getStructureElementStandardStructureType(parent);
parentStandardType = parentStandardStructureType != null ? parentStandardStructureType.getType().getValue() : null;
}
if (parent.getType() == ASAtom.STRUCT_TREE_ROOT) {
return ASAtom.STRUCT_TREE_ROOT.getValue();
}
if (org.verapdf.pd.structure.PDStructElem.isMathStandardType(parentStandardStructureType)) {
return TaggedPDFConstants.MATH_ML;
}
Expand All @@ -128,6 +131,11 @@ public String getparentStandardType() {
return null;
}

@Override
public Boolean getcontainsParent() {
return ((org.verapdf.pd.structure.PDStructElem) simplePDObject).getParent() != null;
}

@Override
public String getvalueS() {
COSName type = ((org.verapdf.pd.structure.PDStructElem) this.simplePDObject).getCOSStructureType();
Expand Down

0 comments on commit a56ec4d

Please sign in to comment.