Enum KeyNamePolicy

All Implemented Interfaces:
Serializable, Comparable<Key­Name­Policy>, Constable

public enum KeyNamePolicy extends Enum<KeyNamePolicy>
The name of the keys included in a Map of metadata. Those maps are created by the Abstract­Metadata​.as­Map() method. The keys in those map are Strings which can be inferred from the UML identifier, the name of the Javabeans property, or the method name.

In GeoAPI implementation of ISO 19115, UML_IDENTIFIER and JAVA_PROPERTY names are usually identical except for collections: JAVA_PROPERTY names are plural when the property is a collection while UML_IDENTIFIER usually stay singular no matter the property multiplicity.

See Also:

Defined in the sis-metadata module

  • Enum Constant Details


      public static final KeyNamePolicy UML_IDENTIFIER
      The keys in the map are the UML identifier of the metadata properties. If a property has no UML annotation, then the Javabeans property name is used as a fallback.

      public static final KeyNamePolicy JAVABEANS_PROPERTY
      The keys in the map are the Javabeans property names. This is the method name with the get or is prefix removed, and the first letter made lower-case.

      This is the default type of names returned by Abstract­Metadata​.as­Map().


      public static final KeyNamePolicy METHOD_NAME
      The keys in the map are the plain method names.

      public static final KeyNamePolicy SENTENCE
      The keys in the map are sentences inferred from the UML identifiers. This policy starts with the same names than UML_IDENTIFIER, searches for word boundaries (defined as a lower case letter followed by a upper case letter) and inserts a space between the words found. The first letter in the sentence is made upper-case. The first letters of following words are made lower-case.
  • Method Details

    • values

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

      public static KeyNamePolicy 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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      Illegal­Argument­Exception - if this enum type has no constant with the specified name
      Null­Pointer­Exception - if the argument is null