|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<OdfPackageConstraint>
org.odftoolkit.odfdom.pkg.OdfPackageConstraint
public enum OdfPackageConstraint
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
.
Enum Constant Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
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
Method Detail |
---|
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 name
NullPointerException
- if the argument is nullpublic String getLocalizedMessage()
getMessage()
.
getLocalizedMessage
in interface ValidationConstraint
public String getMessage()
getMessage
in interface ValidationConstraint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |