org.ath.converters
Enum ScriptLineCounter.FileFormats

java.lang.Object
  extended by java.lang.Enum<ScriptLineCounter.FileFormats>
      extended by org.ath.converters.ScriptLineCounter.FileFormats
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ScriptLineCounter.FileFormats>
Enclosing class:
ScriptLineCounter

public static enum ScriptLineCounter.FileFormats
extends java.lang.Enum<ScriptLineCounter.FileFormats>

Enumeration of the file formats supported. Return static methods for the Regular Expressions used to classify the file-content,
and normal methods for other parameters.
Auto-detect is the first 'format' and doesn't have a specific format, just for display purposes.

Author:
Ath

Enum Constant Summary
Format0
           
Format1
           
Format2
           
Format3
           
Format4
           
Format5
           
Format6
           
 
Method Summary
 java.lang.String getCharSplitRegex()
          The regex to split a group of characters
static java.lang.String getDenyRegex(ScriptLineCounter.FileFormats ff)
          The regex to deny a character
static java.lang.String getLineRegex(ScriptLineCounter.FileFormats ff)
          The regular expression the recognize a proper line
 int getMinimalMatch()
          Minimal percentage of lines that must match to be recognized.
static java.lang.String getPrescanRegex(ScriptLineCounter.FileFormats ff)
          The regex to perform a pre-scan for collecting valid character names
static java.lang.String getReactsRegex(ScriptLineCounter.FileFormats ff)
           
static java.lang.String getRemoveRegex(ScriptLineCounter.FileFormats ff)
          The regex to remove from a character name
static java.lang.String getSplitRegex(ScriptLineCounter.FileFormats ff)
          The regex to split a line
 int getVoiceOverGroup()
          Define the matcher group index to fetch the character name instead of the VoiceOver generic name
 java.lang.String getVoiceOverRegex()
          Get the regex to detect a voice-over, then use getVoiceOverGroup to get the matcher Group index
 boolean isAMatcher()
          Is this FileFormat a matcher or a dummy?
 boolean isCountWithEmpty()
          Count dialogues if a blank line is after the character name
 boolean isMultiLine()
          Can dialogue be multiple lines?
 boolean isSeparateLineCounter()
          Is this FileFormat optionally counting separate lines?
 boolean isSplitMatch()
          Should use line split to check for match
 java.lang.String toString()
           
static ScriptLineCounter.FileFormats valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ScriptLineCounter.FileFormats[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Format0

public static final ScriptLineCounter.FileFormats Format0

Format1

public static final ScriptLineCounter.FileFormats Format1

Format2

public static final ScriptLineCounter.FileFormats Format2

Format3

public static final ScriptLineCounter.FileFormats Format3

Format4

public static final ScriptLineCounter.FileFormats Format4

Format5

public static final ScriptLineCounter.FileFormats Format5

Format6

public static final ScriptLineCounter.FileFormats Format6
Method Detail

values

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

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

valueOf

public static ScriptLineCounter.FileFormats 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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<ScriptLineCounter.FileFormats>

getLineRegex

public static java.lang.String getLineRegex(ScriptLineCounter.FileFormats ff)
The regular expression the recognize a proper line

Parameters:
ff - the FileFormat
Returns:
Regular expression or ""

getReactsRegex

public static java.lang.String getReactsRegex(ScriptLineCounter.FileFormats ff)

getSplitRegex

public static java.lang.String getSplitRegex(ScriptLineCounter.FileFormats ff)
The regex to split a line

Parameters:
ff - requested file-format
Returns:
regex

getDenyRegex

public static java.lang.String getDenyRegex(ScriptLineCounter.FileFormats ff)
The regex to deny a character

Parameters:
ff - requested file-format
Returns:
regex

getCharSplitRegex

public java.lang.String getCharSplitRegex()
The regex to split a group of characters

Returns:
regex

getRemoveRegex

public static java.lang.String getRemoveRegex(ScriptLineCounter.FileFormats ff)
The regex to remove from a character name

Parameters:
ff - requested file-format
Returns:
regex

getPrescanRegex

public static java.lang.String getPrescanRegex(ScriptLineCounter.FileFormats ff)
The regex to perform a pre-scan for collecting valid character names

Parameters:
ff - requested file-format
Returns:
regex

getVoiceOverRegex

public java.lang.String getVoiceOverRegex()
Get the regex to detect a voice-over, then use getVoiceOverGroup to get the matcher Group index

Returns:

getVoiceOverGroup

public int getVoiceOverGroup()
Define the matcher group index to fetch the character name instead of the VoiceOver generic name

Returns:

isAMatcher

public boolean isAMatcher()
Is this FileFormat a matcher or a dummy?

Returns:
state

isSeparateLineCounter

public boolean isSeparateLineCounter()
Is this FileFormat optionally counting separate lines?

Returns:
state

isMultiLine

public boolean isMultiLine()
Can dialogue be multiple lines?

Returns:
state

isSplitMatch

public boolean isSplitMatch()
Should use line split to check for match

Returns:
state

getMinimalMatch

public int getMinimalMatch()
Minimal percentage of lines that must match to be recognized.

Returns:
percentage 0..100

isCountWithEmpty

public boolean isCountWithEmpty()
Count dialogues if a blank line is after the character name

Returns: