diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotCaret.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotCaret.java index 213f30b89..a11e75bb2 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotCaret.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotCaret.java @@ -1355,18 +1355,6 @@ public COSObject getRD3Value() { return entry3; } - @Override - public Double getRD2NumberValue() { - COSObject RD2 = getRD2Value(); - return getNumberValue(RD2); - } - - @Override - public Double getRD3NumberValue() { - COSObject RD3 = getRD3Value(); - return getNumberValue(RD3); - } - @Override public Double getRD0NumberValue() { COSObject RD0 = getRD0Value(); @@ -1379,6 +1367,18 @@ public Double getRD1NumberValue() { return getNumberValue(RD1); } + @Override + public Double getRD2NumberValue() { + COSObject RD2 = getRD2Value(); + return getNumberValue(RD2); + } + + @Override + public Double getRD3NumberValue() { + COSObject RD3 = getRD3Value(); + return getNumberValue(RD3); + } + @Override public Boolean getAPNHasTypeDictionary() { COSObject APN = getAPNValue(); diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotCircle.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotCircle.java index 26c3bd130..cf66063d0 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotCircle.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotCircle.java @@ -1464,18 +1464,6 @@ public COSObject getRD3Value() { return entry3; } - @Override - public Double getRD2NumberValue() { - COSObject RD2 = getRD2Value(); - return getNumberValue(RD2); - } - - @Override - public Double getRD3NumberValue() { - COSObject RD3 = getRD3Value(); - return getNumberValue(RD3); - } - @Override public Double getRD0NumberValue() { COSObject RD0 = getRD0Value(); @@ -1488,6 +1476,18 @@ public Double getRD1NumberValue() { return getNumberValue(RD1); } + @Override + public Double getRD2NumberValue() { + COSObject RD2 = getRD2Value(); + return getNumberValue(RD2); + } + + @Override + public Double getRD3NumberValue() { + COSObject RD3 = getRD3Value(); + return getNumberValue(RD3); + } + @Override public Boolean getAPNHasTypeDictionary() { COSObject APN = getAPNValue(); diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotFreeText.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotFreeText.java index 02d9990b9..fb2bacf53 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotFreeText.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotFreeText.java @@ -1584,18 +1584,6 @@ public COSObject getRD3Value() { return entry3; } - @Override - public Double getRD2NumberValue() { - COSObject RD2 = getRD2Value(); - return getNumberValue(RD2); - } - - @Override - public Double getRD3NumberValue() { - COSObject RD3 = getRD3Value(); - return getNumberValue(RD3); - } - @Override public Double getRD0NumberValue() { COSObject RD0 = getRD0Value(); @@ -1608,6 +1596,18 @@ public Double getRD1NumberValue() { return getNumberValue(RD1); } + @Override + public Double getRD2NumberValue() { + COSObject RD2 = getRD2Value(); + return getNumberValue(RD2); + } + + @Override + public Double getRD3NumberValue() { + COSObject RD3 = getRD3Value(); + return getNumberValue(RD3); + } + @Override public Boolean getAPNHasTypeDictionary() { COSObject APN = getAPNValue(); diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotSquare.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotSquare.java index 454ca9e5b..26c093c76 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotSquare.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAnnotSquare.java @@ -1460,18 +1460,6 @@ public COSObject getRD3Value() { return entry3; } - @Override - public Double getRD2NumberValue() { - COSObject RD2 = getRD2Value(); - return getNumberValue(RD2); - } - - @Override - public Double getRD3NumberValue() { - COSObject RD3 = getRD3Value(); - return getNumberValue(RD3); - } - @Override public Double getRD0NumberValue() { COSObject RD0 = getRD0Value(); @@ -1484,6 +1472,18 @@ public Double getRD1NumberValue() { return getNumberValue(RD1); } + @Override + public Double getRD2NumberValue() { + COSObject RD2 = getRD2Value(); + return getNumberValue(RD2); + } + + @Override + public Double getRD3NumberValue() { + COSObject RD3 = getRD3Value(); + return getNumberValue(RD3); + } + @Override public Boolean getAPNHasTypeDictionary() { COSObject APN = getAPNValue(); diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAArrayOfNamesForEnforceEntry.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAArrayOfNamesForEnforceEntry.java index 8fc6d1f87..dcbcc81bd 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAArrayOfNamesForEnforceEntry.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAArrayOfNamesForEnforceEntry.java @@ -40,6 +40,9 @@ public String getNameValue() { @Override public String getparentPrintScalingNameValue() { + if (this.parentObject == null || !this.parentObject.getType().isDictionaryBased()) { + return null; + } return new GFAViewerPreferences(this.parentObject.getDirectBase(), null, null).getPrintScalingNameValue(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAuthCode.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAuthCode.java index f3fa20863..47c56fe27 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAuthCode.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAAuthCode.java @@ -189,50 +189,98 @@ public Boolean getSigObjRefHasTypeDictionary() { } @Override - public Long getByteRange1IntegerValue() { + public Long getByteRange0IntegerValue() { COSObject ByteRange = getByteRangeValue(); - return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry1IntegerValue(); + if (ByteRange == null || ByteRange.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (ByteRange.size() <= 0) { + return null; + } + return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry0IntegerValue(); } @Override - public Long getByteRange2IntegerValue() { + public Long getByteRange1IntegerValue() { COSObject ByteRange = getByteRangeValue(); - return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry2IntegerValue(); + if (ByteRange == null || ByteRange.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (ByteRange.size() <= 1) { + return null; + } + return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry1IntegerValue(); } @Override - public Long getByteRange0IntegerValue() { + public Long getByteRange2IntegerValue() { COSObject ByteRange = getByteRangeValue(); - return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry0IntegerValue(); + if (ByteRange == null || ByteRange.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (ByteRange.size() <= 2) { + return null; + } + return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry2IntegerValue(); } @Override public Long getByteRange3IntegerValue() { COSObject ByteRange = getByteRangeValue(); + if (ByteRange == null || ByteRange.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (ByteRange.size() <= 3) { + return null; + } return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry3IntegerValue(); } @Override public Boolean getByteRange1HasTypeInteger() { COSObject ByteRange = getByteRangeValue(); + if (ByteRange == null || ByteRange.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (ByteRange.size() <= 1) { + return null; + } return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry1HasTypeInteger(); } @Override public Boolean getByteRange2HasTypeInteger() { COSObject ByteRange = getByteRangeValue(); + if (ByteRange == null || ByteRange.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (ByteRange.size() <= 2) { + return null; + } return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry2HasTypeInteger(); } @Override public Boolean getByteRange0HasTypeInteger() { COSObject ByteRange = getByteRangeValue(); + if (ByteRange == null || ByteRange.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (ByteRange.size() <= 0) { + return null; + } return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry0HasTypeInteger(); } @Override public Boolean getByteRange3HasTypeInteger() { COSObject ByteRange = getByteRangeValue(); + if (ByteRange == null || ByteRange.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (ByteRange.size() <= 3) { + return null; + } return new GFAArrayOf_4Integers(ByteRange.getDirectBase(), null, null).getentry3HasTypeInteger(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFACryptFilterMap.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFACryptFilterMap.java index 6eca17dee..10c697ff2 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFACryptFilterMap.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFACryptFilterMap.java @@ -139,6 +139,9 @@ public Boolean getStdCFHasTypeDictionary() { @Override public String getStdCFAuthEventNameValue() { COSObject StdCF = getStdCFValue(); + if (StdCF == null || !StdCF.getType().isDictionaryBased()) { + return null; + } return new GFACryptFilter(StdCF.getDirectBase(), null, null).getAuthEventNameValue(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFloatingWindowParameters.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFloatingWindowParameters.java index 8790996da..c2f350e89 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFloatingWindowParameters.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFloatingWindowParameters.java @@ -343,26 +343,50 @@ public Boolean getUCHasTypeBoolean() { } @Override - public Long getD1IntegerValue() { + public Long getD0IntegerValue() { COSObject D = getDValue(); - return new GFAArrayOf_2Integers(D.getDirectBase(), null, null).getentry1IntegerValue(); + if (D == null || D.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (D.size() <= 0) { + return null; + } + return new GFAArrayOf_2Integers(D.getDirectBase(), null, null).getentry0IntegerValue(); } @Override - public Long getD0IntegerValue() { + public Long getD1IntegerValue() { COSObject D = getDValue(); - return new GFAArrayOf_2Integers(D.getDirectBase(), null, null).getentry0IntegerValue(); + if (D == null || D.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (D.size() <= 1) { + return null; + } + return new GFAArrayOf_2Integers(D.getDirectBase(), null, null).getentry1IntegerValue(); } @Override public Boolean getD1HasTypeInteger() { COSObject D = getDValue(); + if (D == null || D.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (D.size() <= 1) { + return null; + } return new GFAArrayOf_2Integers(D.getDirectBase(), null, null).getentry1HasTypeInteger(); } @Override public Boolean getD0HasTypeInteger() { COSObject D = getDValue(); + if (D == null || D.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (D.size() <= 0) { + return null; + } return new GFAArrayOf_2Integers(D.getDirectBase(), null, null).getentry0HasTypeInteger(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorCIDType0.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorCIDType0.java index 75f4e7883..3f625dad9 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorCIDType0.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorCIDType0.java @@ -716,6 +716,9 @@ public Boolean getXHeightHasTypeNumber() { @Override public String getparentBaseFontNameValue() { + if (this.parentObject == null || !this.parentObject.getType().isDictionaryBased()) { + return null; + } return new GFAFontCIDType0(this.parentObject.getDirectBase(), null, null).getBaseFontNameValue(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorCIDType2.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorCIDType2.java index 4ee936605..ab563ed95 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorCIDType2.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorCIDType2.java @@ -716,6 +716,9 @@ public Boolean getXHeightHasTypeNumber() { @Override public String getparentBaseFontNameValue() { + if (this.parentObject == null || !this.parentObject.getType().isDictionaryBased()) { + return null; + } return new GFAFontCIDType2(this.parentObject.getDirectBase(), null, null).getBaseFontNameValue(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorTrueType.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorTrueType.java index df2e1e98b..4c1fd0b7c 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorTrueType.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorTrueType.java @@ -498,6 +498,9 @@ public Boolean getXHeightHasTypeNumber() { @Override public String getparentBaseFontNameValue() { + if (this.parentObject == null || !this.parentObject.getType().isDictionaryBased()) { + return null; + } return new GFAFontTrueType(this.parentObject.getDirectBase(), null, null).getBaseFontNameValue(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorType3.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorType3.java index e9df1b13b..5b60b9dcd 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorType3.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAFontDescriptorType3.java @@ -384,6 +384,9 @@ public Boolean getXHeightHasTypeNumber() { @Override public String getparentNameNameValue() { + if (this.parentObject == null || !this.parentObject.getType().isDictionaryBased()) { + return null; + } return new GFAFontType3(this.parentObject.getDirectBase(), null, null).getNameNameValue(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAIconFit.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAIconFit.java index 6af02e6da..2fe9df9fe 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAIconFit.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAIconFit.java @@ -176,26 +176,50 @@ public String getSWNameValue() { } @Override - public Double getA1NumberValue() { + public Double getA0NumberValue() { COSObject A = getAValue(); - return new GFAArrayOf_2Numbers(A.getDirectBase(), null, null).getentry1NumberValue(); + if (A == null || A.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (A.size() <= 0) { + return null; + } + return new GFAArrayOf_2Numbers(A.getDirectBase(), null, null).getentry0NumberValue(); } @Override - public Double getA0NumberValue() { + public Double getA1NumberValue() { COSObject A = getAValue(); - return new GFAArrayOf_2Numbers(A.getDirectBase(), null, null).getentry0NumberValue(); + if (A == null || A.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (A.size() <= 1) { + return null; + } + return new GFAArrayOf_2Numbers(A.getDirectBase(), null, null).getentry1NumberValue(); } @Override public Boolean getA1HasTypeNumber() { COSObject A = getAValue(); + if (A == null || A.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (A.size() <= 1) { + return null; + } return new GFAArrayOf_2Numbers(A.getDirectBase(), null, null).getentry1HasTypeNumber(); } @Override public Boolean getA0HasTypeNumber() { COSObject A = getAValue(); + if (A == null || A.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (A.size() <= 0) { + return null; + } return new GFAArrayOf_2Numbers(A.getDirectBase(), null, null).getentry0HasTypeNumber(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAMovieActivation.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAMovieActivation.java index b486f82d4..bd9d77093 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAMovieActivation.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAMovieActivation.java @@ -459,48 +459,96 @@ public Double getVolumeNumberValue() { @Override public Double getFWPosition0NumberValue() { COSObject FWPosition = getFWPositionValue(); + if (FWPosition == null || FWPosition.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (FWPosition.size() <= 0) { + return null; + } return new GFAArrayOf_2Numbers(FWPosition.getDirectBase(), null, null).getentry0NumberValue(); } @Override public Double getFWPosition1NumberValue() { COSObject FWPosition = getFWPositionValue(); + if (FWPosition == null || FWPosition.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (FWPosition.size() <= 1) { + return null; + } return new GFAArrayOf_2Numbers(FWPosition.getDirectBase(), null, null).getentry1NumberValue(); } @Override public Long getFWScale0IntegerValue() { COSObject FWScale = getFWScaleValue(); + if (FWScale == null || FWScale.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (FWScale.size() <= 0) { + return null; + } return new GFAArrayOf_2Integers(FWScale.getDirectBase(), null, null).getentry0IntegerValue(); } @Override public Long getFWScale1IntegerValue() { COSObject FWScale = getFWScaleValue(); + if (FWScale == null || FWScale.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (FWScale.size() <= 1) { + return null; + } return new GFAArrayOf_2Integers(FWScale.getDirectBase(), null, null).getentry1IntegerValue(); } @Override public Boolean getFWPosition0HasTypeNumber() { COSObject FWPosition = getFWPositionValue(); + if (FWPosition == null || FWPosition.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (FWPosition.size() <= 0) { + return null; + } return new GFAArrayOf_2Numbers(FWPosition.getDirectBase(), null, null).getentry0HasTypeNumber(); } @Override public Boolean getFWPosition1HasTypeNumber() { COSObject FWPosition = getFWPositionValue(); + if (FWPosition == null || FWPosition.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (FWPosition.size() <= 1) { + return null; + } return new GFAArrayOf_2Numbers(FWPosition.getDirectBase(), null, null).getentry1HasTypeNumber(); } @Override public Boolean getFWScale0HasTypeInteger() { COSObject FWScale = getFWScaleValue(); + if (FWScale == null || FWScale.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (FWScale.size() <= 0) { + return null; + } return new GFAArrayOf_2Integers(FWScale.getDirectBase(), null, null).getentry0HasTypeInteger(); } @Override public Boolean getFWScale1HasTypeInteger() { COSObject FWScale = getFWScaleValue(); + if (FWScale == null || FWScale.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (FWScale.size() <= 1) { + return null; + } return new GFAArrayOf_2Integers(FWScale.getDirectBase(), null, null).getentry1HasTypeInteger(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAOPIVersion20Dict.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAOPIVersion20Dict.java index 37ad116d8..085199ce6 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAOPIVersion20Dict.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAOPIVersion20Dict.java @@ -386,51 +386,99 @@ public Double getVersionNumberValue() { return getNumberValue(Version); } + @Override + public Long getIncludedImageDimensions0IntegerValue() { + COSObject IncludedImageDimensions = getIncludedImageDimensionsValue(); + if (IncludedImageDimensions == null || IncludedImageDimensions.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (IncludedImageDimensions.size() <= 0) { + return null; + } + return new GFAArrayOf_2Integers(IncludedImageDimensions.getDirectBase(), null, null).getentry0IntegerValue(); + } + @Override public Long getIncludedImageDimensions1IntegerValue() { COSObject IncludedImageDimensions = getIncludedImageDimensionsValue(); + if (IncludedImageDimensions == null || IncludedImageDimensions.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (IncludedImageDimensions.size() <= 1) { + return null; + } return new GFAArrayOf_2Integers(IncludedImageDimensions.getDirectBase(), null, null).getentry1IntegerValue(); } @Override public Double getSize0NumberValue() { COSObject Size = getSizeValue(); + if (Size == null || Size.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (Size.size() <= 0) { + return null; + } return new GFAArrayOf_2Numbers(Size.getDirectBase(), null, null).getentry0NumberValue(); } - @Override - public Long getIncludedImageDimensions0IntegerValue() { - COSObject IncludedImageDimensions = getIncludedImageDimensionsValue(); - return new GFAArrayOf_2Integers(IncludedImageDimensions.getDirectBase(), null, null).getentry0IntegerValue(); - } - @Override public Double getSize1NumberValue() { COSObject Size = getSizeValue(); + if (Size == null || Size.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (Size.size() <= 1) { + return null; + } return new GFAArrayOf_2Numbers(Size.getDirectBase(), null, null).getentry1NumberValue(); } @Override public Boolean getIncludedImageDimensions1HasTypeInteger() { COSObject IncludedImageDimensions = getIncludedImageDimensionsValue(); + if (IncludedImageDimensions == null || IncludedImageDimensions.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (IncludedImageDimensions.size() <= 1) { + return null; + } return new GFAArrayOf_2Integers(IncludedImageDimensions.getDirectBase(), null, null).getentry1HasTypeInteger(); } @Override public Boolean getSize0HasTypeNumber() { COSObject Size = getSizeValue(); + if (Size == null || Size.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (Size.size() <= 0) { + return null; + } return new GFAArrayOf_2Numbers(Size.getDirectBase(), null, null).getentry0HasTypeNumber(); } @Override public Boolean getIncludedImageDimensions0HasTypeInteger() { COSObject IncludedImageDimensions = getIncludedImageDimensionsValue(); + if (IncludedImageDimensions == null || IncludedImageDimensions.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (IncludedImageDimensions.size() <= 0) { + return null; + } return new GFAArrayOf_2Integers(IncludedImageDimensions.getDirectBase(), null, null).getentry0HasTypeInteger(); } @Override public Boolean getSize1HasTypeNumber() { COSObject Size = getSizeValue(); + if (Size == null || Size.getType() != COSObjType.COS_ARRAY) { + return null; + } + if (Size.size() <= 1) { + return null; + } return new GFAArrayOf_2Numbers(Size.getDirectBase(), null, null).getentry1HasTypeNumber(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFASoftMaskLuminosity.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFASoftMaskLuminosity.java index 110793292..ae3670882 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFASoftMaskLuminosity.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFASoftMaskLuminosity.java @@ -309,6 +309,9 @@ public COSObject getGGroupValue() { @Override public String getGGroupSNameValue() { COSObject GGroup = getGGroupValue(); + if (GGroup == null || !GGroup.getType().isDictionaryBased()) { + return null; + } return new GFAGroupAttributes(GGroup.getDirectBase(), null, null).getSNameValue(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAUserProperty.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAUserProperty.java index 0ae898bf9..d220babee 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAUserProperty.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAUserProperty.java @@ -201,6 +201,9 @@ public COSObject gettrailerCatalogMarkInfoValue() { @Override public Boolean gettrailerCatalogMarkInfoUserPropertiesBooleanValue() { COSObject trailerCatalogMarkInfo = gettrailerCatalogMarkInfoValue(); + if (trailerCatalogMarkInfo == null || !trailerCatalogMarkInfo.getType().isDictionaryBased()) { + return null; + } return new GFAMarkInfo(trailerCatalogMarkInfo.getDirectBase(), null, null).getUserPropertiesBooleanValue(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAViewerPreferences.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAViewerPreferences.java index e95843157..8170d8176 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAViewerPreferences.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAViewerPreferences.java @@ -646,6 +646,9 @@ public COSObject gettrailerCatalogValue() { @Override public String gettrailerCatalogPageModeNameValue() { COSObject trailerCatalog = gettrailerCatalogValue(); + if (trailerCatalog == null || !trailerCatalog.getType().isDictionaryBased()) { + return null; + } return new GFACatalog(trailerCatalog.getDirectBase(), null, null).getPageModeNameValue(); } diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAXObjectImageMask.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAXObjectImageMask.java index cce6718ee..9d2ede686 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAXObjectImageMask.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAXObjectImageMask.java @@ -1364,18 +1364,18 @@ public Boolean getimageIsStructContentItem() { return getimageIsStructContentItem(new COSObject(this.baseObject)); } - @Override - public Long getDecode1IntegerValue() { - COSObject Decode1 = getDecode1Value(); - return getIntegerValue(Decode1); - } - @Override public Long getDecode0IntegerValue() { COSObject Decode0 = getDecode0Value(); return getIntegerValue(Decode0); } + @Override + public Long getDecode1IntegerValue() { + COSObject Decode1 = getDecode1Value(); + return getIntegerValue(Decode1); + } + @Override public Boolean gethasExtensionADBE_Extn3() { return false; diff --git a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAXObjectImageSoftMask.java b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAXObjectImageSoftMask.java index 3c15122f5..953f5c863 100644 --- a/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAXObjectImageSoftMask.java +++ b/validation-model/src/main/java/org/verapdf/gf/model/impl/arlington/GFAXObjectImageSoftMask.java @@ -910,18 +910,18 @@ public COSObject getparentWidthValue() { return Width; } - @Override - public Long getparentWidthIntegerValue() { - COSObject parentWidth = getparentWidthValue(); - return getIntegerValue(parentWidth); - } - @Override public Long getparentHeightIntegerValue() { COSObject parentHeight = getparentHeightValue(); return getIntegerValue(parentHeight); } + @Override + public Long getparentWidthIntegerValue() { + COSObject parentWidth = getparentWidthValue(); + return getIntegerValue(parentWidth); + } + @Override public Boolean getparentWidthHasTypeInteger() { COSObject parentWidth = getparentWidthValue();