Enum Class Obligation

Object
Enum<Obligation>
Obligation
All Implemented Interfaces:
Serializable, Comparable<Obligation>, Constable, ControlledVocabulary

@UML(identifier="MD_ObligationCode", specification=ISO_19115) public enum Obligation extends Enum<Obligation> implements ControlledVocabulary
Whether an element is mandatory, optional or have other obligation.
Since:
2.0
  • Enum Constant Details

    • MANDATORY

      @UML(identifier="mandatory", specification=ISO_19115) public static final Obligation MANDATORY
      Element is always required.
    • OPTIONAL

      @UML(identifier="optional", specification=ISO_19115) public static final Obligation OPTIONAL
      Element is not required.
    • CONDITIONAL

      @UML(identifier="conditional", specification=ISO_19115) public static final Obligation CONDITIONAL
      Element is required when a specific condition is met.
    • FORBIDDEN

      public static final Obligation FORBIDDEN
      The element should always be null. This obligation code is used only when a sub-interface overrides an association and force it to a null value. An example is TemporalDatum.getAnchorPoint().
      Departure from OGC/ISO abstract specification:
      Departure due to constraint of the Java language ISO specifications sometimes override a parent method with a comment saying that the method is not allowed for a particular class. Since there is no construct in Java for expressing this constraint in the method signature, GeoAPI defines a FORBIDDEN obligation (not in original ISO specifications) to be used with the @UML annotation and which adds a flag in the Java documentation.
  • Method Details

    • values

      public static Obligation[] 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 Obligation 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
    • identifier

      public String identifier()
      Returns the UML identifier for this enumeration constant, or null if none.
      Specified by:
      identifier in interface ControlledVocabulary
      Returns:
      the ISO/OGC identifier for this constant, or null if none.
      Since:
      3.1
    • names

      public String[] names()
      Returns the programmatic name of this constant together with its identifier, if any.
      Specified by:
      names in interface ControlledVocabulary
      Returns:
      all names of this constant. This array is never null and never empty.
      Since:
      3.1
    • family

      public Obligation[] family()
      Returns all constants defined by this enumeration type. Invoking this method is equivalent to invoking values(), except that this method can be invoked on an instance of the ControlledVocabulary interface (i.e. the enumeration type does not need to be known at compile-time).
      Specified by:
      family in interface ControlledVocabulary
      Returns:
      all values for this enumeration.
      Since:
      3.1