org.cip4.jdflib.core
Class JDFElement.EnumValidationLevel

java.lang.Object
  extended by org.apache.commons.lang.enums.Enum
      extended by org.apache.commons.lang.enums.ValuedEnum
          extended by org.cip4.jdflib.core.JDFElement.EnumValidationLevel
All Implemented Interfaces:
Serializable, Comparable
Enclosing class:
JDFElement

public static final class JDFElement.EnumValidationLevel
extends org.apache.commons.lang.enums.ValuedEnum

Enumeration for validation level

See Also:
Serialized Form

Field Summary
static JDFElement.EnumValidationLevel Complete
          show warnings and require all traits
static JDFElement.EnumValidationLevel Incomplete
          show warnings and allow missing traits
static JDFElement.EnumValidationLevel NoWarnComplete
          ignore warnings and require all traits
static JDFElement.EnumValidationLevel NoWarnIncomplete
          ignore warnings and allow missing traits
static JDFElement.EnumValidationLevel RecursiveComplete
          show warnings and require all traits - also recurse referenced elements
static JDFElement.EnumValidationLevel RecursiveIncomplete
          show warnings and allow missing traits- also recurse referenced elements
 
Fields inherited from class org.apache.commons.lang.enums.Enum
iToString
 
Constructor Summary
protected JDFElement.EnumValidationLevel(String name)
           
 
Method Summary
static JDFElement.EnumValidationLevel getEnum(int enumValue)
           
static JDFElement.EnumValidationLevel getEnum(String enumName)
           
static List getEnumList()
           
static Map getEnumMap()
           
static JDFElement.EnumValidationLevel incompleteLevel(JDFElement.EnumValidationLevel level)
          calculate the corresponding incomplete level based on level
static boolean isNoWarn(JDFElement.EnumValidationLevel vl)
          return true if vl is a recursvive EnumValidationLevel
static boolean isRecursive(JDFElement.EnumValidationLevel vl)
          return true if vl is a recursvive EnumValidationLevel
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
static Iterator iterator()
           
static JDFElement.EnumValidationLevel setNoWarning(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
 
Methods inherited from class org.apache.commons.lang.enums.Enum
equals, getEnum, getEnumClass, getEnumList, getEnumMap, getName, hashCode, iterator, readResolve
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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

Constructor Detail

JDFElement.EnumValidationLevel

protected JDFElement.EnumValidationLevel(String name)
Method Detail

getEnum

public static JDFElement.EnumValidationLevel getEnum(String enumName)
Parameters:
enumName -
Returns:

getEnum

public static JDFElement.EnumValidationLevel getEnum(int enumValue)
Parameters:
enumValue -
Returns:

getEnumMap

public static Map getEnumMap()
Returns:

getEnumList

public static List getEnumList()
Returns:

iterator

public static 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 from
noWarning - 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


Copyright © 2013. All Rights Reserved.