public enum OdfPackageConstraint extends Enum<OdfPackageConstraint> implements ValidationConstraint
ValidationException
for ODF validation.
The validation is enabled, when an ErrorHandler
was provided to the OdfPackage
.Enum Constant and Description |
---|
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_DOES_NOT_LIST_FILE
A file shall be listed in the \"/META-INF/manifest.xml\" file as it exists in the ODF package.
|
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_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_NOT_IN_PACKAGE
The ODF package shall contain the \"/META-INF/manifest.xml\" file.
|
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_DIFFERS_FROM_PACKAGE
The ODF package contains a \"mediatype\" file, which content differs from the mediatype of the root document!"
|
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.
|
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!
|
PACKAGE_ENTRY_USING_INVALID_COMPRESSION
In case a ZIP entry is using neither STORED and DEFLATED as compression method.
|
PACKAGE_IS_NO_ZIP
The ODF package shall be a ZIP file.
|
Modifier and Type | Method and Description |
---|---|
String |
getLocalizedMessage()
Creates a localized description of a Constraint.
|
String |
getMessage()
Returns the detail message string of this Constraint.
|
static OdfPackageConstraint |
valueOf(String name)
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.
|
public static final OdfPackageConstraint PACKAGE_ENTRY_USING_INVALID_COMPRESSION
public static final OdfPackageConstraint MANIFEST_NOT_IN_PACKAGE
public static final OdfPackageConstraint MANIFEST_LISTS_DIRECTORY
public static final OdfPackageConstraint MANIFEST_DOES_NOT_LIST_DIRECTORY
public static final OdfPackageConstraint MANIFEST_LISTS_NONEXISTENT_FILE
public static final OdfPackageConstraint MANIFEST_DOES_NOT_LIST_FILE
public static final OdfPackageConstraint MIMETYPE_DIFFERS_FROM_PACKAGE
public static final OdfPackageConstraint MIMETYPE_WITHOUT_MANIFEST_MEDIATYPE
public static final OdfPackageConstraint MANIFEST_WITH_EMPTY_PATH
public static final OdfPackageConstraint MIMETYPE_HAS_EXTRA_FIELD
public static final OdfPackageConstraint MIMETYPE_IS_COMPRESSED
public static final OdfPackageConstraint MIMETYPE_NOT_FIRST_IN_PACKAGE
public static final OdfPackageConstraint MIMETYPE_NOT_IN_PACKAGE
public static final OdfPackageConstraint PACKAGE_IS_NO_ZIP
public static OdfPackageConstraint[] values()
for (OdfPackageConstraint c : OdfPackageConstraint.values()) System.out.println(c);
public static OdfPackageConstraint valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getLocalizedMessage()
getMessage()
.getLocalizedMessage
in interface ValidationConstraint
public String getMessage()
getMessage
in interface ValidationConstraint
Copyright © 2008–2018 Apache Software Foundation; Copyright © 2018–2019 The Document Foundation. All rights reserved.