Package org.apache.sis.metadata
Enum ModifiableMetadata.State
- Object
-
- Enum<ModifiableMetadata.State>
-
- State
-
- All Implemented Interfaces:
Serializable
,Comparable<ModifiableMetadata.State>
- Enclosing class:
- ModifiableMetadata
public static enum ModifiableMetadata.State extends Enum<ModifiableMetadata.State>
Whether the metadata is still editable or has been made final. NewModifiableMetadata
instances are initiallyEDITABLE
and can be madeFINAL
after construction by a call toModifiableMetadata.transitionTo(State)
.Note: more states may be added in future Apache SIS versions. On possible candidate isSTAGED
. See SIS-81.- Since:
- 1.0
Defined in the
sis-metadata
module
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPLETABLE
The metadata allows missing values to be set, but does not allow existing values to be modified.EDITABLE
The metadata is modifiable.FINAL
The metadata is unmodifiable.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ModifiableMetadata.State
valueOf(String name)
Returns the enum constant of this type with the specified name.static ModifiableMetadata.State[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EDITABLE
public static final ModifiableMetadata.State EDITABLE
The metadata is modifiable. This is the default state when newModifiableMetadata
instances are created. Note that a modifiable metadata instance does not imply that all properties contained in that instance are also editable.
-
COMPLETABLE
public static final ModifiableMetadata.State COMPLETABLE
The metadata allows missing values to be set, but does not allow existing values to be modified. This state is not appendable, i.e. it does not allow adding elements in a collection.
-
FINAL
public static final ModifiableMetadata.State FINAL
The metadata is unmodifiable. When a metadata is final, it can not be moved back to an editable state (but it is still possible to create a modifiable copy withMetadataCopier
). Invoking any setter method on an unmodifiable metadata cause anUnmodifiableMetadataException
to be thrown.
-
-
Method Detail
-
values
public static ModifiableMetadata.State[] 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 (ModifiableMetadata.State c : ModifiableMetadata.State.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModifiableMetadata.State 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
-
-