Class PackagePropertiesUnmarshaller
- All Implemented Interfaces:
PartUnmarshaller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCheck the element for the following OPC compliance rules:unmarshall(UnmarshallContext context, InputStream in) Save the content of the package in the stream
-
Constructor Details
-
PackagePropertiesUnmarshaller
public PackagePropertiesUnmarshaller()
-
-
Method Details
-
unmarshall
public PackagePart unmarshall(UnmarshallContext context, InputStream in) throws InvalidFormatException, IOException Description copied from interface:PartUnmarshallerSave the content of the package in the stream- Specified by:
unmarshallin interfacePartUnmarshaller- Parameters:
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 correctlyIOException- if reading from the stream fails
-
checkElementForOPCCompliance
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
-