Enum ValidationStatus

  • All Implemented Interfaces:
    Serializable, Comparable<ValidationStatus>

    public enum ValidationStatus
    extends Enum<ValidationStatus>
    Current enum describe validation state according to validity of separated parts. This parts can separated to 4 groups:
    • Valid - if document is valid according to profile
    • Invalid metadata - if and only if according to specific list invalid only metadata. This list describes rules which provide difference between is metadata invalid or not
    • Invalid structure - if and only if [нарушает] rules other than metadata rules.
    • Invalid document - if [нарушает] as metadata rules as other than metadata rules
    According to this status MetadataFixerImpl run different handling of document.
    Author:
    Evgeniy Muravitskiy
    See Also:
    MetadataFixerImpl#fixAndSaveDocument(OutputStream, FixerConfig), ProcessedObjectsInspector
    • Method Detail

      • values

        public static ValidationStatus[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ValidationStatus c : ValidationStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ValidationStatus valueOf​(String name)
        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 name
        NullPointerException - if the argument is null
      • valueOf

        public static ValidationStatus valueOf​(int index)
        Get validation status from integer value. Value must be from 0 to 3
        Parameters:
        index - number representation of validation status
        Returns:
        corresponding validation status
      • getStatus

        public ValidationStatus getStatus​(ValidationStatus status)
        Return combination of current status and given status according to next table:
        Current value Passed value Result value
        INVALID_DOCUMENT
        INVALID_DOCUMENT INVALID_DOCUMENT
        INVALID_STRUCTURE INVALID_DOCUMENT
        INVALID_METADATA INVALID_DOCUMENT
        VALID INVALID_DOCUMENT
        INVALID_STRUCTURE
        INVALID_DOCUMENT INVALID_DOCUMENT
        INVALID_STRUCTURE INVALID_STRUCTURE
        INVALID_METADATA INVALID_DOCUMENT
        VALID INVALID_STRUCTURE
        INVALID_METADATA
        INVALID_DOCUMENT INVALID_DOCUMENT
        INVALID_STRUCTURE INVALID_DOCUMENT
        INVALID_METADATA INVALID_METADATA
        VALID INVALID_METADATA
        VALID
        INVALID_DOCUMENT INVALID_DOCUMENT
        INVALID_STRUCTURE INVALID_STRUCTURE
        INVALID_METADATA INVALID_METADATA
        VALID VALID
        Parameters:
        status - passed status argument
        Returns:
        result status