Package org.incenp.obofoundry.sssom
Enum ValidationError
- java.lang.Object
-
- java.lang.Enum<ValidationError>
-
- org.incenp.obofoundry.sssom.ValidationError
-
- All Implemented Interfaces:
Serializable,Comparable<ValidationError>
public enum ValidationError extends Enum<ValidationError>
Represents all the post-parsing errors that can make a mapping set invalid.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DUPLICATED_RECORD_IDINVALID_PREDICATE_TYPEMISSING_JUSTIFICATIONMISSING_LICENSEMISSING_OBJECTMISSING_PREDICATEMISSING_RECORD_IDMISSING_REVIEWERMISSING_SET_IDMISSING_SUBJECTREDEFINED_BUILTIN_PREFIX
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()Gets the human-readable error message for this error.static StringgetMessage(EnumSet<ValidationError> values)Gets a human-readable error message for a set of validation errors.static ValidationErrorvalueOf(String name)Returns the enum constant of this type with the specified name.static ValidationError[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MISSING_SET_ID
public static final ValidationError MISSING_SET_ID
-
MISSING_LICENSE
public static final ValidationError MISSING_LICENSE
-
REDEFINED_BUILTIN_PREFIX
public static final ValidationError REDEFINED_BUILTIN_PREFIX
-
MISSING_SUBJECT
public static final ValidationError MISSING_SUBJECT
-
MISSING_OBJECT
public static final ValidationError MISSING_OBJECT
-
MISSING_PREDICATE
public static final ValidationError MISSING_PREDICATE
-
MISSING_JUSTIFICATION
public static final ValidationError MISSING_JUSTIFICATION
-
INVALID_PREDICATE_TYPE
public static final ValidationError INVALID_PREDICATE_TYPE
-
MISSING_RECORD_ID
public static final ValidationError MISSING_RECORD_ID
-
DUPLICATED_RECORD_ID
public static final ValidationError DUPLICATED_RECORD_ID
-
MISSING_REVIEWER
public static final ValidationError MISSING_REVIEWER
-
-
Method Detail
-
values
public static ValidationError[] 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 (ValidationError c : ValidationError.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValidationError 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 nameNullPointerException- if the argument is null
-
getMessage
public String getMessage()
Gets the human-readable error message for this error.- Returns:
- The error message.
-
getMessage
public static String getMessage(EnumSet<ValidationError> values)
Gets a human-readable error message for a set of validation errors.- Parameters:
values- A set of validation errors.- Returns:
- An error message listing all the individual errors.
-
-