Skip to content

Commit dd9a1b6

Browse files
committed
PDFBOX-6108: get and add PageTextSchema
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1930097 13f79535-47bb-0310-9956-ffa450edef68
1 parent f0a6cb3 commit dd9a1b6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

xmpbox/src/main/java/org/apache/xmpbox/XMPMetadata.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.apache.xmpbox.schema.XMPMediaManagementSchema;
3636
import org.apache.xmpbox.schema.XMPRightsManagementSchema;
3737
import org.apache.xmpbox.schema.XMPSchema;
38+
import org.apache.xmpbox.schema.XMPageTextSchema;
3839
import org.apache.xmpbox.schema.XmpSchemaException;
3940
import org.apache.xmpbox.type.StructuredType;
4041
import org.apache.xmpbox.type.TypeMapping;
@@ -575,4 +576,31 @@ public void clearSchemas()
575576
{
576577
schemas.clear();
577578
}
579+
580+
/**
581+
* Create and add PageText Schema to this metadata.
582+
*
583+
* This method return the created schema to enter information
584+
*
585+
* @return schema added in order to work on it
586+
*/
587+
public XMPageTextSchema createAndAddPageTextSchema()
588+
{
589+
XMPageTextSchema pageText = new XMPageTextSchema(this);
590+
pageText.setAboutAsSimple("");
591+
addSchema(pageText);
592+
return pageText;
593+
}
594+
595+
/**
596+
* Get the PageText schema.
597+
*
598+
* This method return null if not found
599+
*
600+
* @return The PageTextSchema schema or null if not declared
601+
*/
602+
public XMPageTextSchema getPageTextSchema()
603+
{
604+
return (XMPageTextSchema) getSchema(XMPageTextSchema.class);
605+
}
578606
}

0 commit comments

Comments
 (0)