Enum Class GonType

java.lang.Object
java.lang.Enum<GonType>
org.aksw.jenax.graphql.sparql.v2.gon.meta.GonType
All Implemented Interfaces:
Serializable, Comparable<GonType>, Constable

public enum GonType extends Enum<GonType>
Enum to capture what types of parents are valid for a given gon element.
  • NonObject category members:
    • Array (parent must be NonObject)
    • Entry (parent must be Object)
    • Root (does not have a parent)
  • Node category members: (parent must be of NonObject)
    • Literal
    • Object
    • Array
Note, that Array exists in both categories. The non-object category is relevant to describe the set of valid parent types of a gon type. Node category is for constructs that "can exist by themselves" (in contrast to an entry which can't exist without an enclosing object).
  • Enum Constant Details

    • ARRAY

      public static final GonType ARRAY
    • ENTRY

      public static final GonType ENTRY
    • ROOT

      public static final GonType ROOT
    • LITERAL

      public static final GonType LITERAL
    • OBJECT

      public static final GonType OBJECT
    • UNKNOWN

      public static final GonType UNKNOWN
  • Method Details

    • values

      public static GonType[] 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 GonType 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
    • getRawType

      public RawGonType getRawType()
    • isNodeType

      public boolean isNodeType()
      Convenience method. True iff this' category is NODE_TYPE, which stands for literal, object or array.
    • getCategory

      public GonCategory getCategory()
    • getValidParentCategory

      public GonCategory getValidParentCategory()
    • isValidChildOf

      public boolean isValidChildOf(GonType parentType)
      The given type must be in this type's valid parent category.