org.stanwood.media.actions.rename
Enum Token

java.lang.Object
  extended by java.lang.Enum<Token>
      extended by org.stanwood.media.actions.rename.Token
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Token>

public enum Token
extends java.lang.Enum<Token>

This enum contains all the tokens that are allowed in a pattern


Enum Constant Summary
EPISODE
          the token for "episode number"
EXT
          the token for "extension"
HIGH_DEFINITION
          The token for high definition
ID
          the token for "show Id"
IMAGE
          the token for the show or film image URL
PART
          the token for "part number"
PERCENT
          add a % char
SEASON
          the token for "season number"
SHOW_NAME
          the token for "show name"
SUMMARY
          the token for the show or film short summary
TITLE
          the token for "episode or film title"
WIDESCREEN
          The token for wide screen
YEAR
          the token for the "year"
 
Method Summary
static Token fromFull(java.lang.String s)
          Used to get the token from it's full name
static Token fromToken(char c)
          Used to get the token from a character
 java.lang.String getFull()
          Get the full token name
 java.lang.String getPattern()
          Get the regexp pattern that matches the token
 char getToken()
          Get the token character
 ValueType getType()
          Get the type of the token
static Token valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Token[] 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

SHOW_NAME

public static final Token SHOW_NAME
the token for "show name"


EPISODE

public static final Token EPISODE
the token for "episode number"


SEASON

public static final Token SEASON
the token for "season number"


EXT

public static final Token EXT
the token for "extension"


TITLE

public static final Token TITLE
the token for "episode or film title"


PERCENT

public static final Token PERCENT
add a % char


ID

public static final Token ID
the token for "show Id"


PART

public static final Token PART
the token for "part number"


YEAR

public static final Token YEAR
the token for the "year"


IMAGE

public static final Token IMAGE
the token for the show or film image URL


SUMMARY

public static final Token SUMMARY
the token for the show or film short summary


HIGH_DEFINITION

public static final Token HIGH_DEFINITION
The token for high definition


WIDESCREEN

public static final Token WIDESCREEN
The token for wide screen

Method Detail

values

public static Token[] 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 (Token c : Token.values())
    System.out.println(c);

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

valueOf

public static Token valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getFull

public java.lang.String getFull()
Get the full token name

Returns:
The full token name

getToken

public char getToken()
Get the token character

Returns:
The token character

getPattern

public java.lang.String getPattern()
Get the regexp pattern that matches the token

Returns:
the regexp pattern that matches the token

getType

public ValueType getType()
Get the type of the token

Returns:
The type of the token

fromToken

public static Token fromToken(char c)
Used to get the token from a character

Parameters:
c - The token character
Returns:
The token or null if it's not found

fromFull

public static Token fromFull(java.lang.String s)
Used to get the token from it's full name

Parameters:
s - The full name
Returns:
The token or null if it's not found