java.lang.Object
java.lang.Enum<ResultScope>
org.gcube.informationsystem.resourceregistry.api.rest.ResultScope
All Implemented Interfaces:
Serializable, Comparable<ResultScope>, Constable

public enum ResultScope extends Enum<ResultScope>
Normative tokens emitted within the X-Result-Scope response header, signalling that a successful response was intentionally filtered or expanded beyond the standard base URI scope.

The wire format uses lowercase, kebab-case values (e.g. "state-filtered"). Use toString() to obtain the wire value and fromString(String) for case-insensitive parsing. Multiple scopes are combined into a single header value as a comma-separated list (e.g. "hierarchical,state-filtered"); clients should split on commas, trim whitespace, and evaluate each token independently, ignoring order.

See appendix/09-result-scope-conventions.md in the reference documentation for the full normative contract, including combination rules and examples. Declaration order below matches the canonical ordering used throughout that document (hierarchical,state-filtered,previous-path).

Author:
Luca Frosini (ISTI - CNR)
  • Enum Constant Details

    • HIERARCHICAL

      public static final ResultScope HIERARCHICAL
      The request was evaluated over the token Context and its descendants (hierarchical=true).
    • STATE_FILTERED

      public static final ResultScope STATE_FILTERED
      Response omits instances or Context memberships, or a hierarchical write skipped descendant Contexts, because the effectiveState of their Context is not ACTIVE.
    • PREVIOUS_PATH

      public static final ResultScope PREVIOUS_PATH
      Success is based on token resolution via a historical previous path rather than current path.
  • Method Details

    • values

      public static ResultScope[] 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

      public static ResultScope valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromString

      public static ResultScope fromString(String s)
      Parses a single wire token (case-insensitive). Returns null for unrecognised strings.
      Parameters:
      s - the wire token to parse (e.g. "state-filtered")
      Returns:
      the matching ResultScope, or null if unrecognised
    • toString

      public String toString()
      Returns the lowercase, kebab-case wire token (e.g. "state-filtered").
      Overrides:
      toString in class Enum<ResultScope>