Enum Class TypeProjection.Source
java.lang.Object
java.lang.Enum<TypeProjection.Source>
org.gcube.informationsystem.types.reference.properties.TypeProjection.Source
- All Implemented Interfaces:
Serializable,Comparable<TypeProjection.Source>,Constable
- Enclosing interface:
- TypeProjection
Whether a
TypeProjection was computed by the auto-generation algorithm,
defined by an admin, or is the minimal safety-net fallback used when the full
auto-generation computation itself fails. A closed, 3-value set — modeled as a
real enum rather than String constants for compile-time safety (unlike
most other @ISProperty string fields in this model, which hold
open-ended values such as a Type name, and are therefore correctly plain
Strings). FALLBACK is deliberately a third value of this same
enum rather than an orthogonal boolean flag: it can only ever occur as a
sub-case of AUTO_GENERATED (a CUSTOM projection is validated
at submission time and rejected outright on failure, never silently degraded),
so a separate flag would make an impossible combination — CUSTOM +
"degraded" — representable for no reason. toString() and
fromString(String) keep the wire value the hyphenated form already in
use (e.g. "auto-generated") rather than the Java constant name Jackson
would otherwise default to.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionComputed by the auto-generation algorithm from the owning Type's schema.Defined by an admin viaPUT /types/{type-name}/projection.The minimal, always-valid baseline (id + effective type only), persisted in place of the intended auto-generated default when computing the latter threw or otherwise failed — a safety net so a bug in the generation algorithm never blocks the Type create/update that triggered it. -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeProjection.SourcefromString(String value) Parses a wire value.toString()static TypeProjection.SourceReturns the enum constant of this class with the specified name.static TypeProjection.Source[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTO_GENERATED
Computed by the auto-generation algorithm from the owning Type's schema. -
CUSTOM
Defined by an admin viaPUT /types/{type-name}/projection. -
FALLBACK
The minimal, always-valid baseline (id + effective type only), persisted in place of the intended auto-generated default when computing the latter threw or otherwise failed — a safety net so a bug in the generation algorithm never blocks the Type create/update that triggered it.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<TypeProjection.Source>
-
fromString
Parses a wire value.- Parameters:
value- the wire string to parse- Returns:
- the matching
TypeProjection.Source - Throws:
IllegalArgumentException- ifvaluedoes not match anyTypeProjection.Source
-