Enum Capability

java.lang.Object
java.lang.Enum<Capability>
org.apache.sis.internal.storage.Capability
All Implemented Interfaces:
Serializable, Comparable<Capability>, java.lang.constant.Constable

public enum Capability extends Enum<Capability>
Capabilities of a class annotated by StoreMetadata.

This is not a committed API since the way to represent data store capabilities is likely to change.

Since:
0.8
Version:
1.1
  • Enum Constant Details

    • READ

      public static final Capability READ
      The annotated implementation can read data.
    • WRITE

      public static final Capability WRITE
      The annotated implementation can write data.
    • CREATE

      public static final Capability CREATE
      The annotated implementation can create new data.
  • Field Details

    • resourceKey

      private final short resourceKey
      The Vocabulary key to use for fetching a localized name.
  • Constructor Details

    • Capability

      private Capability(short key)
      Creates a new capability item.
  • Method Details

    • values

      public static Capability[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Capability 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 name
      NullPointerException - if the argument is null
    • providers

      public static String[] providers(Locale locale, Vocabulary resources)
      Lists the capabilities of all data stores together with their name. The returned array is twice the amount of providers, with the capabilities at even indices and the format name at odd indices.

      This method is for internal usage by About only and may change without notice in any future Apache SIS version.

      Parameters:
      locale - the locale of the strings to return. Cannot be null.
      resources - the Vocabulary.getResources(locale) value.
      Returns:
      localized string representations of the capabilities of all data store providers.