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:
java.io.Serializable,java.lang.Comparable
- Enclosing class:
- JDFElement
public static final class JDFElement.EnumValidationLevel extends org.apache.commons.lang.enums.ValuedEnumEnumeration 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static JDFElement.EnumValidationLevelCompleteshow warnings and require all traitsstatic JDFElement.EnumValidationLevelIncompleteshow warnings and allow missing traitsstatic JDFElement.EnumValidationLevelNoWarnCompleteignore warnings and require all traitsstatic JDFElement.EnumValidationLevelNoWarnIncompleteignore warnings and allow missing traitsstatic JDFElement.EnumValidationLevelRecursiveCompleteshow warnings and require all traits - also recurse referenced elementsstatic JDFElement.EnumValidationLevelRecursiveIncompleteshow warnings and allow missing traits- also recurse referenced elements
-
Constructor Summary
Constructors Modifier Constructor Description protectedEnumValidationLevel(java.lang.String name)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JDFElement.EnumValidationLevelgetEnum(int enumValue)static JDFElement.EnumValidationLevelgetEnum(java.lang.String enumName)static java.util.ListgetEnumList()static java.util.MapgetEnumMap()static JDFElement.EnumValidationLevelincompleteLevel(JDFElement.EnumValidationLevel level)calculate the corresponding incomplete level based on levelstatic booleanisNoWarn(JDFElement.EnumValidationLevel vl)return true if vl is a recursvive EnumValidationLevelstatic booleanisRecursive(JDFElement.EnumValidationLevel vl)return true if vl is a recursvive EnumValidationLevelstatic booleanisRequired(JDFElement.EnumValidationLevel level)returns true if the enumeration level is either Complete, NoWarnComplete or RecursiveComplete, i.e.static java.util.Iteratoriterator()static JDFElement.EnumValidationLevelsetNoWarning(JDFElement.EnumValidationLevel level, boolean noWarning)calculate the corresponding nowarn level based on level-
Methods inherited from class org.apache.commons.lang.enums.ValuedEnum
compareTo, getEnum, getValue, toString
-
-
-
-
Field Detail
-
NoWarnIncomplete
public static final JDFElement.EnumValidationLevel NoWarnIncomplete
ignore warnings and allow missing traits
-
NoWarnComplete
public static final JDFElement.EnumValidationLevel NoWarnComplete
ignore warnings and require all traits
-
Incomplete
public static final JDFElement.EnumValidationLevel Incomplete
show warnings and allow missing traits
-
Complete
public static final JDFElement.EnumValidationLevel Complete
show warnings and require all traits
-
RecursiveIncomplete
public static final JDFElement.EnumValidationLevel RecursiveIncomplete
show warnings and allow missing traits- also recurse referenced elements
-
RecursiveComplete
public static final JDFElement.EnumValidationLevel RecursiveComplete
show warnings and require all traits - also recurse referenced elements
-
-
Method Detail
-
getEnum
public static JDFElement.EnumValidationLevel getEnum(java.lang.String enumName)
- Parameters:
enumName-- Returns:
-
getEnum
public static JDFElement.EnumValidationLevel getEnum(int enumValue)
- Parameters:
enumValue-- Returns:
-
getEnumMap
public static java.util.Map getEnumMap()
- Returns:
-
getEnumList
public static java.util.List getEnumList()
- Returns:
-
iterator
public static java.util.Iterator iterator()
- Returns:
-
isRecursive
public static boolean isRecursive(JDFElement.EnumValidationLevel vl)
return true if vl is a recursvive EnumValidationLevel- Parameters:
vl- the EnumValidationLevel to check- Returns:
- true if vl is recursive
-
isNoWarn
public static boolean isNoWarn(JDFElement.EnumValidationLevel vl)
return true if vl is a recursvive EnumValidationLevel- Parameters:
vl- the EnumValidationLevel to check- Returns:
- true if vl is recursive
-
isRequired
public static boolean isRequired(JDFElement.EnumValidationLevel level)
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
public static JDFElement.EnumValidationLevel incompleteLevel(JDFElement.EnumValidationLevel level)
calculate the corresponding incomplete level based on level- Parameters:
level- the level to test- Returns:
- EnumValidationLevel - the modified level
-
-