Enum Class CaseRole

java.lang.Object
java.lang.Enum<CaseRole>
com.articulate.sigma.nlg.CaseRole
All Implemented Interfaces:
Serializable, Comparable<CaseRole>, Constable

public enum CaseRole extends Enum<CaseRole>
Identifies specific Sumo CaseRole objects. Not all Sumo CaseRoles are listed here--only those whose behavior must be defined for NLG. Any role not defined here is assumed to behave identically to the CaseRole which it is a subrelation of (except for the formatted string property). For example, because "(subrelation result patient)", we expect the "result" CaseRole to generally appear as the direct object of the sentence, just like the "patient" case role.
  • Enum Constant Details

    • AGENT

      public static final CaseRole AGENT
    • ATTENDS

      public static final CaseRole ATTENDS
    • DESTINATION

      public static final CaseRole DESTINATION
    • DIRECTION

      public static final CaseRole DIRECTION
    • EVENTPARTLYLOCATED

      public static final CaseRole EVENTPARTLYLOCATED
    • EXPERIENCER

      public static final CaseRole EXPERIENCER
    • INSTRUMENT

      public static final CaseRole INSTRUMENT
    • MOVES

      public static final CaseRole MOVES
    • ORIGIN

      public static final CaseRole ORIGIN
    • PATH

      public static final CaseRole PATH
    • PATIENT

      public static final CaseRole PATIENT
    • RESOURCE

      public static final CaseRole RESOURCE
    • OTHER

      public static final CaseRole OTHER
  • Method Details

    • values

      public static CaseRole[] 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 CaseRole 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
    • isKnownCaseRole

      public static boolean isKnownCaseRole(String input)
      Is the input string a valid case role? Note that this method is case-sensitive.
      Parameters:
      input -
      Returns:
    • getCaseRole

      public static CaseRole getCaseRole(Collection<String> list)
      From the input list, return the first string that is a valid case role.
      Parameters:
      list -
      Returns:
      a CaseRole object if its string is found in the list; else null
    • toCaseRole

      public static CaseRole toCaseRole(String input, KB kb)
      Return a valid case role based on the string input. If string does not match any case role, return OTHER.
      Parameters:
      input -
      Returns: