Class PackagePropertiesUnmarshaller
- java.lang.Object
-
- org.apache.poi.openxml4j.opc.internal.unmarshallers.PackagePropertiesUnmarshaller
-
- All Implemented Interfaces:
PartUnmarshaller
public final class PackagePropertiesUnmarshaller extends java.lang.Object implements PartUnmarshaller
Package properties unmarshaller.
-
-
Constructor Summary
Constructors Constructor Description PackagePropertiesUnmarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkElementForOPCCompliance(org.w3c.dom.Element el)
Check the element for the following OPC compliance rules:PackagePart
unmarshall(UnmarshallContext context, java.io.InputStream in)
Save the content of the package in the stream
-
-
-
Method Detail
-
unmarshall
public PackagePart unmarshall(UnmarshallContext context, java.io.InputStream in) throws InvalidFormatException, java.io.IOException
Description copied from interface:PartUnmarshaller
Save the content of the package in the stream- Specified by:
unmarshall
in interfacePartUnmarshaller
in
- The input stream from which the part will be read.- Returns:
- The part freshly read from the input stream.
- Throws:
InvalidFormatException
- If the data can not be interpreted correctlyjava.io.IOException
- if reading from the stream fails
-
checkElementForOPCCompliance
public void checkElementForOPCCompliance(org.w3c.dom.Element el) throws InvalidFormatException
Check the element for the following OPC compliance rules:Rule M4.2: A format consumer shall consider the use of the Markup Compatibility namespace to be an error.
Rule M4.3: Producers shall not create a document element that contains refinements to the Dublin Core elements, except for the two specified in the schema: <dcterms:created> and <dcterms:modified> Consumers shall consider a document element that violates this constraint to be an error.
Rule M4.4: Producers shall not create a document element that contains the xml:lang attribute. Consumers shall consider a document element that violates this constraint to be an error.
Rule M4.5: Producers shall not create a document element that contains the xsi:type attribute, except for a <dcterms:created> or <dcterms:modified> element where the xsi:type attribute shall be present and shall hold the value dcterms:W3CDTF, where dcterms is the namespace prefix of the Dublin Core namespace. Consumers shall consider a document element that violates this constraint to be an error.
- Throws:
InvalidFormatException
-
-