Enum 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>
- Enclosing interface:
- TypeProjection
public static enum TypeProjection.Source extends Enum<TypeProjection.Source>
Whether aTypeProjectionwas 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 thanStringconstants for compile-time safety (unlike most other@ISPropertystring fields in this model, which hold open-ended values such as a Type name, and are therefore correctly plainStrings).FALLBACKis deliberately a third value of this same enum rather than an orthogonal boolean flag: it can only ever occur as a sub-case ofAUTO_GENERATED(aCUSTOMprojection 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()andfromString(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.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO_GENERATEDComputed by the auto-generation algorithm from the owning Type's schema.CUSTOMDefined by an admin viaPUT /types/{type-name}/projection.FALLBACKThe 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TypeProjection.SourcefromString(String value)Parses a wire value.StringtoString()static TypeProjection.SourcevalueOf(String name)Returns the enum constant of this type with the specified name.static TypeProjection.Source[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AUTO_GENERATED
public static final TypeProjection.Source AUTO_GENERATED
Computed by the auto-generation algorithm from the owning Type's schema.
-
CUSTOM
public static final TypeProjection.Source CUSTOM
Defined by an admin viaPUT /types/{type-name}/projection.
-
FALLBACK
public static final TypeProjection.Source 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 Detail
-
values
public static TypeProjection.Source[] 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 (TypeProjection.Source c : TypeProjection.Source.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeProjection.Source 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
-
toString
public String toString()
- Overrides:
toStringin classEnum<TypeProjection.Source>
-
fromString
public static TypeProjection.Source fromString(String value)
Parses a wire value.- Parameters:
value- the wire string to parse- Returns:
- the matching
TypeProjection.Source - Throws:
IllegalArgumentException- ifvaluedoes not match anyTypeProjection.Source
-
-