001/**
002 * Java Web Archive Toolkit - Software to read and validate ARC, WARC
003 * and GZip files. (http://jwat.org/)
004 * Copyright 2011-2012 Netarkivet.dk (http://netarkivet.dk/)
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.jwat.common;
019
020/**
021 * Class defining different diagnosis types used for reporting problems.
022 *
023 * @author nicl
024 */
025public enum DiagnosisType {
026
027    /** An entity has more than one value definition. */
028    DUPLICATE(1),
029
030    /** Empty entity value. */
031    EMPTY(0),
032
033    /** Entity is erroneous. */
034    ERROR(1),
035
036    /** Entity is erroneous and something else was expected. */
037    ERROR_EXPECTED(1),
038
039    /** Invalid circumstance surrounding entity. */
040    INVALID(0),
041
042    /** Invalid data encountered. */
043    INVALID_DATA(1),
044
045    /** Invalid encoding encountered. */
046    INVALID_ENCODING(2),
047
048    /** Invalid data, expected something else. */
049    INVALID_EXPECTED(2),
050
051    /** Entity value differs from recommended value. */
052    RECOMMENDED(2),
053
054    /** Entity value missing but is recommended. */
055    RECOMMENDED_MISSING(0),
056
057    /** Required entity has an invalid value. */
058    REQUIRED_INVALID(1),
059
060    /** Entity value missing but is required. */
061    REQUIRED_MISSING(0),
062
063    /** Something reserved is being used. */
064    RESERVED(1),
065
066    /** Entity is undesired. */
067    UNDESIRED_DATA(1),
068
069    /** Entity has an unknown value according to some specification. */
070    UNKNOWN(1);
071
072    /** Minimum number of information strings expected. */
073    public final int expected_information;
074
075    /**
076     * Enum constructor.
077     * @param expected_information minimum number of information strings expected
078     */
079    private DiagnosisType(int expected_information) {
080        this.expected_information = expected_information;
081    }
082
083}