Package org.cip4.jdflib.core
Class JDFElement.EnumValidationLevel
java.lang.Object
org.apache.commons.lang.enums.Enum
org.apache.commons.lang.enums.ValuedEnum
org.cip4.jdflib.core.JDFElement.EnumValidationLevel
- All Implemented Interfaces:
Serializable,Comparable
- Enclosing class:
- JDFElement
Enumeration for validation level
- level ValidationLevel_NoWarnIncomplete: Ignore warnings and don't require all required parameters
- level ValidationLevel_NoWarnComplete: Ignore warnings and require all required parameters
- level ValidationLevel_Incomplete: incomplete elements are valid
- level ValidationLevel_Complete: full validation of an individual resource
- level ValidationLevel_RecursiveIncomplete: incomplete validation of an individual resource and all of its child elements - e.g. for pools
- level ValidationLevel_RecursiveComplete: full validation of an individual resource and all of its child elements - e.g. for pools
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JDFElement.EnumValidationLevelshow warnings and require all traitsstatic final JDFElement.EnumValidationLevelshow warnings and allow missing traitsstatic final JDFElement.EnumValidationLevelignore warnings and require all traitsstatic final JDFElement.EnumValidationLevelignore warnings and allow missing traitsstatic final JDFElement.EnumValidationLevelshow warnings and require all traits - also recurse referenced elementsstatic final JDFElement.EnumValidationLevelshow warnings and allow missing traits- also recurse referenced elements -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnum(int enumValue) static Liststatic Mapcalculate the corresponding incomplete level based on levelstatic booleanreturn true if vl is a recursvive EnumValidationLevelstatic booleanreturn true if vl is a recursvive EnumValidationLevelstatic booleanreturns true if the enumeration level is either Complete, NoWarnComplete or RecursiveComplete, i.e.static Iteratoriterator()setNoWarning(JDFElement.EnumValidationLevel level, boolean noWarning) calculate the corresponding nowarn level based on levelMethods inherited from class org.apache.commons.lang.enums.ValuedEnum
compareTo, getEnum, getValue, toStringMethods inherited from class org.apache.commons.lang.enums.Enum
equals, getEnum, getEnumClass, getEnumList, getEnumMap, getName, hashCode, iterator, readResolve
-
Field Details
-
NoWarnIncomplete
ignore warnings and allow missing traits -
NoWarnComplete
ignore warnings and require all traits -
Incomplete
show warnings and allow missing traits -
Complete
show warnings and require all traits -
RecursiveIncomplete
show warnings and allow missing traits- also recurse referenced elements -
RecursiveComplete
show warnings and require all traits - also recurse referenced elements
-
-
Constructor Details
-
EnumValidationLevel
-
-
Method Details
-
getEnum
- Parameters:
enumName-- Returns:
-
getEnum
- Parameters:
enumValue-- Returns:
-
getEnumMap
- Returns:
-
getEnumList
- Returns:
-
iterator
- Returns:
-
isRecursive
return true if vl is a recursvive EnumValidationLevel- Parameters:
vl- the EnumValidationLevel to check- Returns:
- true if vl is recursive
-
isNoWarn
return true if vl is a recursvive EnumValidationLevel- Parameters:
vl- the EnumValidationLevel to check- Returns:
- true if vl is recursive
-
isRequired
returns true if the enumeration level is either Complete, NoWarnComplete or RecursiveComplete, i.e. if the parameter is required- Parameters:
level- the level to check- Returns:
- true if required
-
setNoWarning
public static JDFElement.EnumValidationLevel setNoWarning(JDFElement.EnumValidationLevel level, boolean noWarning) calculate the corresponding nowarn level based on level- Parameters:
level- the level to strip warnings fromnoWarning- if true, set to nowarne, else set to standard- Returns:
- the validationlevel withot warnings
-
incompleteLevel
calculate the corresponding incomplete level based on level- Parameters:
level- the level to test- Returns:
- EnumValidationLevel - the modified level
-