Package org.odftoolkit.odfdom.pkg
Enum OdfPackageConstraint
- All Implemented Interfaces:
Serializable
,Comparable<OdfPackageConstraint>
,java.lang.constant.Constable
,ValidationConstraint
This class is used for validation of the ODF Package. It contains the constraint messages are
taken from the OASIS ODF 1.2 part 3, the ODF package specification. These messages are used by
the
ValidationException
for ODF validation. The validation is enabled, when an
ErrorHandler
was provided to the OdfPackage
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA directory is a document and should be listed in the \"/META-INF/manifest.xml\" file of ODF package.A file shall be listed in the \"/META-INF/manifest.xml\" file as it exists in the ODF package.A directory is not a sub-document and should not be listed in the \"/META-INF/manifest.xml\" file of ODF package.A file shall not be listed in the \"/META-INF/manifest.xml\" file as it does not exist in the ODF package.The ODF package shall contain the \"/META-INF/manifest.xml\" file.The root document shall be listed in the \"/META-INF/manifest.xml\" file using a '/' as path within the ODF package.The ODF package contains a \"mediatype\" file, which content differs from the mediatype of the root document!"There shall be no extra field for the \"mediatype\" file of ODF package.The file \"mediatype\" shall not be compressed in the ODF package.The file \"mediatype\" is not the first file in the ODF package.The ODF package contains no \"mediatype\" file.The ODF package contains a \"mediatype\" file, but no mediatype its root document in the \"/META-INF/manifest.xml\" file of ODF package!In case a ZIP entry is using neither STORED and DEFLATED as compression method.The ODF package shall be a ZIP file. -
Method Summary
Modifier and TypeMethodDescriptionCreates a localized description of a Constraint.Returns the detail message string of this Constraint.static OdfPackageConstraint
Returns the enum constant of this type with the specified name.static OdfPackageConstraint[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PACKAGE_ENTRY_USING_INVALID_COMPRESSION
In case a ZIP entry is using neither STORED and DEFLATED as compression method. -
MANIFEST_NOT_IN_PACKAGE
The ODF package shall contain the \"/META-INF/manifest.xml\" file. -
MANIFEST_LISTS_DIRECTORY
A directory is not a sub-document and should not be listed in the \"/META-INF/manifest.xml\" file of ODF package. -
MANIFEST_DOES_NOT_LIST_DIRECTORY
A directory is a document and should be listed in the \"/META-INF/manifest.xml\" file of ODF package. -
MANIFEST_LISTS_NONEXISTENT_FILE
A file shall not be listed in the \"/META-INF/manifest.xml\" file as it does not exist in the ODF package. -
MANIFEST_DOES_NOT_LIST_FILE
A file shall be listed in the \"/META-INF/manifest.xml\" file as it exists in the ODF package. -
MIMETYPE_DIFFERS_FROM_PACKAGE
The ODF package contains a \"mediatype\" file, which content differs from the mediatype of the root document!" -
MIMETYPE_WITHOUT_MANIFEST_MEDIATYPE
The ODF package contains a \"mediatype\" file, but no mediatype its root document in the \"/META-INF/manifest.xml\" file of ODF package! -
MANIFEST_WITH_EMPTY_PATH
The root document shall be listed in the \"/META-INF/manifest.xml\" file using a '/' as path within the ODF package. -
MIMETYPE_HAS_EXTRA_FIELD
There shall be no extra field for the \"mediatype\" file of ODF package. -
MIMETYPE_IS_COMPRESSED
The file \"mediatype\" shall not be compressed in the ODF package. -
MIMETYPE_NOT_FIRST_IN_PACKAGE
The file \"mediatype\" is not the first file in the ODF package. -
MIMETYPE_NOT_IN_PACKAGE
The ODF package contains no \"mediatype\" file. -
PACKAGE_IS_NO_ZIP
The ODF package shall be a ZIP file.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getLocalizedMessage
Creates a localized description of a Constraint. Subclasses may override this method in order to produce a locale-specific message. For subclasses that do not override this method, the default implementation returns the same result asgetMessage()
.- Specified by:
getLocalizedMessage
in interfaceValidationConstraint
- Returns:
- The localized description of this constraint.
-
getMessage
Returns the detail message string of this Constraint.- Specified by:
getMessage
in interfaceValidationConstraint
- Returns:
- the detail message string of this Constraint instance (which may be null).
-