org.xenei.jena.entities.impl
Enum ActionType

java.lang.Object
  extended by java.lang.Enum<ActionType>
      extended by org.xenei.jena.entities.impl.ActionType
All Implemented Interfaces:
Serializable, Comparable<ActionType>

public enum ActionType
extends Enum<ActionType>

An enumeration of Action types.


Enum Constant Summary
EXISTENTIAL
          Indicates a method that checks for the existance of a value
GETTER
          Indicates a method that gets a value
REMOVER
          Indicates a method that removes a value
SETTER
          Indicates a method that sets a value
 
Method Summary
 String extractName(String name)
          Extract the local name portion of the function name/
 boolean isA(String functionName)
          Test to see if the function name is of this action type.
static ActionType parse(String functionName)
          Parse the action type from the function name.
static ActionType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ActionType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GETTER

public static final ActionType GETTER
Indicates a method that gets a value


SETTER

public static final ActionType SETTER
Indicates a method that sets a value


REMOVER

public static final ActionType REMOVER
Indicates a method that removes a value


EXISTENTIAL

public static final ActionType EXISTENTIAL
Indicates a method that checks for the existance of a value

Method Detail

values

public static ActionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ActionType c : ActionType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ActionType 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

parse

public static ActionType parse(String functionName)
Parse the action type from the function name. Action types are defined from known function name prefixes. In general the function prefix will define the action type and the remaining portion of the name will define the local name for the predicate. @see @link{ org.xenei.jena.annotations.Predicate }
Function prefixActionType
get or isGETTER
set or addSETTER
removeREMOVER
hasEXISTENTIAL

Parameters:
functionName -
Returns:
ActionType
Throws:
IllegalArgumentException - if the function does not have an action type prefix.

isA

public boolean isA(String functionName)
Test to see if the function name is of this action type.

Parameters:
functionName - The name to test
Returns:
true if the function is of this type, false otherwise.

extractName

public String extractName(String name)
Extract the local name portion of the function name/

Parameters:
name - The function name to extract the local portion from.
Returns:
The local name.
Throws:
IllegalArgumentException - fur unrecognized ActionType instances.


Copyright © 2012 XENEI.com. All Rights Reserved.