Enum XLink.Type

java.lang.Object
java.lang.Enum<XLink.Type>
org.apache.sis.xml.XLink.Type
All Implemented Interfaces:
Serializable, Comparable<XLink.Type>, java.lang.constant.Constable
Enclosing class:
XLink

public static enum XLink.Type extends Enum<XLink.Type>
The type of a xlink. This type can be determined from the set of non-null attribute values in a XLink instance.
Since:
0.3
Version:
0.3
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A traversal rule between resources.
    A special value for computing the type automatically from the XLink attributes.
    An extended, possibly multi-resource, link.
    A pointer to an external resource.
    An internal resource.
    A simple link.
    A descriptive title for another linking element.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final int
    A bitmask which specified the non-null fields expected for a given type.
    (package private) final int
    A bitmask which specified the non-null fields expected for a given type.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Type(int mask, int mandatory)
    Creates a new type which allows the fields specified by the given mask.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) final String
    Returns the attribute name for this type.
    static XLink.Type
    Returns the enum constant of this type with the specified name.
    static XLink.Type[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SIMPLE

      public static final XLink.Type SIMPLE
      A simple link. Allows the href, role, arcrole, title, show and actuate attributes, all of them being optional.
    • EXTENDED

      public static final XLink.Type EXTENDED
      An extended, possibly multi-resource, link. Allows the role and title attributes, all of them being optional.
    • LOCATOR

      public static final XLink.Type LOCATOR
      A pointer to an external resource. Allows the href, role, title and label attributes, where href is mandatory and all other are optional.
    • RESOURCE

      public static final XLink.Type RESOURCE
      An internal resource. Allows the role, title and label attributes, all of them being optional.
    • ARC

      public static final XLink.Type ARC
      A traversal rule between resources. Allows the arcrole, title, show, actuate from and to attributes, all of them being optional.
    • TITLE

      public static final XLink.Type TITLE
      A descriptive title for another linking element.
    • AUTO

      public static final XLink.Type AUTO
      A special value for computing the type automatically from the XLink attributes. After a call to XLink.setType(AUTO), any call to XLink.getType() will infer the type from the non-null attributes as according the table documented in the XLink javadoc.
  • Field Details

    • fieldMask

      final int fieldMask
      A bitmask which specified the non-null fields expected for a given type. The bit values are:
      • type: 0x1
      • href: 0x2
      • role: 0x4
      • arcrole: 0x8
      • title: 0x10
      • show: 0x20
      • actuate: 0x40
      • label: 0x80
      • from: 0x100
      • to: 0x200
    • mandatory

      final int mandatory
      A bitmask which specified the non-null fields expected for a given type. The bit values are:
      • type: 0x1
      • href: 0x2
      • role: 0x4
      • arcrole: 0x8
      • title: 0x10
      • show: 0x20
      • actuate: 0x40
      • label: 0x80
      • from: 0x100
      • to: 0x200
  • Constructor Details

    • Type

      private Type(int mask, int mandatory)
      Creates a new type which allows the fields specified by the given mask.
  • Method Details

    • values

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

      public static XLink.Type 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 name
      NullPointerException - if the argument is null
    • identifier

      final String identifier()
      Returns the attribute name for this type.