Skip to content

Commit 429a8c8

Browse files
committed
Add getisGrouping method to GFPDStructElem
1 parent 5caee0a commit 429a8c8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

validation-model/src/main/java/org/verapdf/gf/model/impl/pd/GFPDStructElem.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,4 +327,27 @@ private List<CosAlt> getalt() {
327327
}
328328
return Collections.emptyList();
329329
}
330+
331+
@Override
332+
public Boolean getisGrouping() {
333+
if (standardType == null) {
334+
return false;
335+
}
336+
if (TaggedPDFHelper.isGroupingStructureType(standardType)) {
337+
return true;
338+
}
339+
if (!TaggedPDFHelper.isBlockOrGroupingStructureType(standardType) &&
340+
!TaggedPDFHelper.isBlockOrGroupingOrInlineStructureType(standardType)) {
341+
return false;
342+
}
343+
if (gethasContentItems()) {
344+
return false;
345+
}
346+
for (String kidStandardType : getChildrenStandardTypes()) {
347+
if (TaggedPDFHelper.isInlineStructureType(kidStandardType)) {
348+
return false;
349+
}
350+
}
351+
return true;
352+
}
330353
}

0 commit comments

Comments
 (0)