Skip to content

Commit

Permalink
Fix getremappedStandardType method
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Aug 6, 2024
1 parent 00cd2aa commit 332435d
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,21 @@ public String getStandardTypeNamespaceURL() {

@Override
public String getremappedStandardType() {
StructureType standardStructureType = org.verapdf.pd.structure.PDStructElem.getStructureElementStandardStructureType(
((org.verapdf.pd.structure.PDStructElem)simplePDObject));
if (hasStandardType()) {
StructureType type = ((org.verapdf.pd.structure.PDStructElem)simplePDObject).getStructureType();
if (type == null) {
return null;
}
if (!type.getType().getValue().equals(standardType)) {
if (!Objects.equals(type.getType(), standardStructureType.getType()) ||
!Objects.equals(type.getNameSpaceURI(), standardStructureType.getNameSpaceURI())) {
return type.getType().getValue();
}
} else if (standardType != null) {
StructureType standardStructureType = org.verapdf.pd.structure.PDStructElem.getStructureElementStandardStructureType(
((org.verapdf.pd.structure.PDStructElem)simplePDObject));
String standardTypeMap = org.verapdf.pd.structure.PDStructElem.getStructureTypeStandardType(standardStructureType);
if (!Objects.equals(standardTypeMap, standardType)) {
StructureType standardTypeMap = org.verapdf.pd.structure.PDStructElem.getStructureTypeStandardStructureType(standardStructureType);
if (!Objects.equals(standardTypeMap.getType(), standardStructureType.getType()) ||
!Objects.equals(standardTypeMap.getNameSpaceURI(), standardStructureType.getNameSpaceURI())) {
return standardType;
}
}
Expand Down

0 comments on commit 332435d

Please sign in to comment.