- 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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionElement is required when a specific condition is met.The element should always benull
.Element is always required.Element is not required. -
Method Summary
Modifier and TypeMethodDescriptionfamily()
Returns all constants defined by this enumeration type.Returns the UML identifier for this enumeration constant.static Obligation
Returns the enum constant of this class with the specified name.static Obligation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface org.opengis.util.ControlledVocabulary
name, names, ordinal
-
Enum Constant Details
-
MANDATORY
Element is always required. -
OPTIONAL
Element is not required. -
CONDITIONAL
Element is required when a specific condition is met. -
FORBIDDEN
The element should always benull
. This obligation code is used only when a sub-interface overrides an association and force it to anull
value. An example isDatum.getAnchorDefinition()
.Departure from OGC/ISO standard 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 aFORBIDDEN
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
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
-
identifier
Returns the UML identifier for this enumeration constant.- Specified by:
identifier
in interfaceControlledVocabulary
- Returns:
- the ISO/OGC identifier for this constant.
- Since:
- 3.1
-
family
Returns all constants defined by this enumeration type. Invoking this method is equivalent to invokingvalues()
, except that this method can be invoked on an instance of theControlledVocabulary
interface (i.e. the enumeration type does not need to be known at compile-time).- Specified by:
family
in interfaceControlledVocabulary
- Returns:
- all values for this enumeration.
- Since:
- 3.1
-