Package com.streambase.sb
Enum SchemaUtil.CoercionOptions
- java.lang.Object
-
- java.lang.Enum<SchemaUtil.CoercionOptions>
-
- com.streambase.sb.SchemaUtil.CoercionOptions
-
- All Implemented Interfaces:
Serializable
,Comparable<SchemaUtil.CoercionOptions>
- Enclosing class:
- SchemaUtil
public static enum SchemaUtil.CoercionOptions extends Enum<SchemaUtil.CoercionOptions>
Coercion options
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CAPTURE_FLAT_TO_RAW
CAPTURE_NEST_TO_RAW
CAPTURE_RAW_TO_FLAT
CAPTURE_RAW_TO_NEST
ERROR_ON_MISS_IN_SCHEMA_CALC
IGNORE_METADATA_FIELDS_FOR_CAPTURE
NOTHING
STRICT_SUPERSET
SUBSET
SUPERSET
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canChangeFieldCount()
Can option change field count?static boolean
canTransformCaptures(Collection<SchemaUtil.CoercionOptions> options)
Can coercion options transform a capture field?boolean
canTransformsCaptures()
Can option transform capture fields?static SchemaUtil.CoercionOptions
findCaptureOption(Collection<SchemaUtil.CoercionOptions> options)
Find capture optionabstract SchemaUtil.CoercionOptions
getInverse()
Get inverse of optionstatic Set<SchemaUtil.CoercionOptions>
invert(Collection<SchemaUtil.CoercionOptions> options)
Invert coercion optionsstatic SchemaUtil.CoercionOptions
valueOf(String name)
Returns the enum constant of this type with the specified name.static SchemaUtil.CoercionOptions[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUBSET
public static final SchemaUtil.CoercionOptions SUBSET
-
SUPERSET
public static final SchemaUtil.CoercionOptions SUPERSET
-
STRICT_SUPERSET
public static final SchemaUtil.CoercionOptions STRICT_SUPERSET
-
CAPTURE_FLAT_TO_RAW
public static final SchemaUtil.CoercionOptions CAPTURE_FLAT_TO_RAW
-
CAPTURE_RAW_TO_NEST
public static final SchemaUtil.CoercionOptions CAPTURE_RAW_TO_NEST
-
CAPTURE_RAW_TO_FLAT
public static final SchemaUtil.CoercionOptions CAPTURE_RAW_TO_FLAT
-
CAPTURE_NEST_TO_RAW
public static final SchemaUtil.CoercionOptions CAPTURE_NEST_TO_RAW
-
ERROR_ON_MISS_IN_SCHEMA_CALC
public static final SchemaUtil.CoercionOptions ERROR_ON_MISS_IN_SCHEMA_CALC
-
IGNORE_METADATA_FIELDS_FOR_CAPTURE
public static final SchemaUtil.CoercionOptions IGNORE_METADATA_FIELDS_FOR_CAPTURE
-
NOTHING
public static final SchemaUtil.CoercionOptions NOTHING
-
-
Method Detail
-
values
public static SchemaUtil.CoercionOptions[] 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 (SchemaUtil.CoercionOptions c : SchemaUtil.CoercionOptions.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SchemaUtil.CoercionOptions 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
-
canTransformCaptures
public static boolean canTransformCaptures(Collection<SchemaUtil.CoercionOptions> options)
Can coercion options transform a capture field?- Parameters:
options
- coercion options- Returns:
- true if options can transform a capture
-
findCaptureOption
public static SchemaUtil.CoercionOptions findCaptureOption(Collection<SchemaUtil.CoercionOptions> options)
Find capture option- Parameters:
options
- options to inspect- Returns:
- capture option
-
invert
public static Set<SchemaUtil.CoercionOptions> invert(Collection<SchemaUtil.CoercionOptions> options)
Invert coercion options- Parameters:
options
- options to invert- Returns:
- inverted options
-
canChangeFieldCount
public boolean canChangeFieldCount()
Can option change field count?- Returns:
- true if field count can change
-
canTransformsCaptures
public boolean canTransformsCaptures()
Can option transform capture fields?- Returns:
- true if option can transform captures
-
getInverse
public abstract SchemaUtil.CoercionOptions getInverse()
Get inverse of option- Returns:
- inverse option value
-
-