Author: tilman
Date: Tue Dec 30 12:34:09 2025
New Revision: 1930983
Log:
PDFBOX-6137: replace calls to the deprecated method
Modified:
pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/parser/DeserializationTest.java
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PDFAIdentificationOthersTest.java
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Modified:
pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java
==============================================================================
---
pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java
Tue Dec 30 12:15:11 2025 (r1930982)
+++
pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java
Tue Dec 30 12:34:09 2025 (r1930983)
@@ -56,7 +56,7 @@ public class PDFAIdentificationValidatio
public List<ValidationError> validatePDFAIdentifer(XMPMetadata metadata)
throws ValidationException
{
List<ValidationError> ve = new ArrayList<ValidationError>();
- PDFAIdentificationSchema id = metadata.getPDFIdentificationSchema();
+ PDFAIdentificationSchema id = metadata.getPDFAIdentificationSchema();
if (id == null)
{
ve.add(new ValidationError(ERROR_METADATA_PDFA_ID_MISSING,
Modified:
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/parser/DeserializationTest.java
==============================================================================
---
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/parser/DeserializationTest.java
Tue Dec 30 12:15:11 2025 (r1930982)
+++
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/parser/DeserializationTest.java
Tue Dec 30 12:34:09 2025 (r1930983)
@@ -391,7 +391,7 @@ public class DeserializationTest
XMPBasicSchema basic = metadata.getXMPBasicSchema();
Assert.assertNotNull(basic.getCreateDate());
- PDFAIdentificationSchema pdfaIdentificationSchema =
metadata.getPDFIdentificationSchema();
+ PDFAIdentificationSchema pdfaIdentificationSchema =
metadata.getPDFAIdentificationSchema();
Assert.assertEquals("B", pdfaIdentificationSchema.getConformance());
Assert.assertEquals(1, (int) pdfaIdentificationSchema.getPart());
Modified:
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PDFAIdentificationOthersTest.java
==============================================================================
---
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PDFAIdentificationOthersTest.java
Tue Dec 30 12:15:11 2025 (r1930982)
+++
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/schema/PDFAIdentificationOthersTest.java
Tue Dec 30 12:34:09 2025 (r1930983)
@@ -63,12 +63,12 @@ public class PDFAIdentificationOthersTes
Assert.assertEquals(conformance,
pdfaid.getConformanceProperty().getStringValue());
// check retrieve this schema in metadata
- Assert.assertEquals(pdfaid, metadata.getPDFIdentificationSchema());
+ Assert.assertEquals(pdfaid, metadata.getPDFAIdentificationSchema());
ByteArrayOutputStream bos = new ByteArrayOutputStream();
new XmpSerializer().serialize(metadata, bos, true);
XMPMetadata rxmp = new DomXmpParser().parse(bos.toByteArray());
- pdfaid = rxmp.getPDFIdentificationSchema();
+ pdfaid = rxmp.getPDFAIdentificationSchema();
Assert.assertEquals(versionId, pdfaid.getPart());
Assert.assertEquals(amdId, pdfaid.getAmendment());
Modified:
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
==============================================================================
---
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Tue Dec 30 12:15:11 2025 (r1930982)
+++
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Tue Dec 30 12:34:09 2025 (r1930983)
@@ -71,8 +71,8 @@ public class DomXmpParserTest
InputStream fis =
DomXmpParser.class.getResourceAsStream("/org/apache/xmpbox/xml/PDFBOX-5835.xml");
DomXmpParser dxp = new DomXmpParser();
XMPMetadata xmp = dxp.parse(fis);
- assertEquals("A", xmp.getPDFIdentificationSchema().getConformance());
- assertEquals((Integer) 3, xmp.getPDFIdentificationSchema().getPart());
+ assertEquals("A", xmp.getPDFAIdentificationSchema().getConformance());
+ assertEquals((Integer) 3, xmp.getPDFAIdentificationSchema().getPart());
fis.close();
}
@@ -91,8 +91,8 @@ public class DomXmpParserTest
"<?xpacket end=\"r\"?>";
DomXmpParser xmpParser = new DomXmpParser();
XMPMetadata xmp = xmpParser.parse(s.getBytes("utf-8"));
- assertEquals("B", xmp.getPDFIdentificationSchema().getConformance());
- assertEquals((Integer) 3, xmp.getPDFIdentificationSchema().getPart());
+ assertEquals("B", xmp.getPDFAIdentificationSchema().getConformance());
+ assertEquals((Integer) 3, xmp.getPDFAIdentificationSchema().getPart());
}
/**
@@ -519,7 +519,7 @@ public class DomXmpParserTest
"<?xpacket end=\"w\"?>";
DomXmpParser xmpParser = new DomXmpParser();
XMPMetadata xmp = xmpParser.parse(s.getBytes("utf-8"));
- PDFAIdentificationSchema pdfaIdSchema =
xmp.getPDFIdentificationSchema();
+ PDFAIdentificationSchema pdfaIdSchema =
xmp.getPDFAIdentificationSchema();
assertEquals((Integer) 2, pdfaIdSchema.getPart());
String dataValue =
xmp.getSchema("http://ns.example.org/default/1.0/").getUnqualifiedTextPropertyValue("Data");
assertEquals("Example", dataValue);
@@ -1573,7 +1573,7 @@ public class DomXmpParserTest
InputStream is =
DomXmpParser.class.getResourceAsStream("/org/apache/xmpbox/xml/PDFBOX-6131-RMR6DEEUWZO6IM3A7WKRPX33SZMBTTQZ.xml");
DomXmpParser xmpParser = new DomXmpParser();
XMPMetadata xmp = xmpParser.parse(is);
- assertEquals((Integer) 1, xmp.getPDFIdentificationSchema().getPart());
+ assertEquals((Integer) 1, xmp.getPDFAIdentificationSchema().getPart());
is.close();
}
@@ -1766,7 +1766,7 @@ public class DomXmpParserTest
final DomXmpParser xmpParser = new DomXmpParser();
xmpParser.setStrictParsing(false);
XMPMetadata xmp = xmpParser.parse(s.getBytes("utf-8"));
- assertEquals("B", xmp.getPDFIdentificationSchema().getConformance());
- assertEquals((Integer) 1, xmp.getPDFIdentificationSchema().getPart());
+ assertEquals("B", xmp.getPDFAIdentificationSchema().getConformance());
+ assertEquals((Integer) 1, xmp.getPDFAIdentificationSchema().getPart());
}
}