Enum Class EdmSimpleTypeKind

java.lang.Object
java.lang.Enum<EdmSimpleTypeKind>
org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind
All Implemented Interfaces:
Serializable, Comparable<EdmSimpleTypeKind>, Constable

public enum EdmSimpleTypeKind extends Enum<EdmSimpleTypeKind>
  • Enum Constant Details

  • Method Details

    • values

      public static EdmSimpleTypeKind[] 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 EdmSimpleTypeKind 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
    • getFullQualifiedName

      public FullQualifiedName getFullQualifiedName()
      Returns the FullQualifiedName for this SimpleTypeKind.
      Returns:
      FullQualifiedName
    • getEdmSimpleTypeInstance

      public EdmSimpleType getEdmSimpleTypeInstance()
      Returns an instance for this EdmSimpleTypeKind in the form of EdmSimpleType.
      Returns:
      EdmSimpleType instance
    • parseUriLiteral

      public static EdmLiteral parseUriLiteral(String uriLiteral) throws EdmLiteralException

      Parses a URI literal and determines its EDM simple type on the way.

      If the literal is null or consists of the literal string "null", the EDM simple type Null is returned.

      The URI literal syntax of EDM simple types allows two ways of determining the type:

      • The literal has an explicit type indicator (prefix or suffix).
      • The value is of a type compatible to all other possible types, e.g., "256" could be of type Int16 or Int32 but all possible values of Int16 are also legal values of Int32 so callers could promote it to Int32 in all cases where they deem it necessary.
        For a given literal, always the narrowest possible type is chosen.

      There are two cases where it is not possible to choose unambiguously a compatible type:

      • 0 or 1 could be a number but also a boolean value; therefore, the internal (system) type Bit is used for these values.
      • Integer values between 0 and 127 (inclusive) could be of type SByte or Byte both of which are not compatible to the other; therefore, the internal (system) type Uint7 is used for these values.

      Parameters:
      uriLiteral - the literal
      Returns:
      an instance of EdmLiteral, containing the literal in default String representation and the EDM simple type
      Throws:
      EdmLiteralException - if the literal is malformed