net.sf.jomic.tools
Class NumberedName

java.lang.Object
  extended by net.sf.jomic.tools.NumberedName

public class NumberedName
extends java.lang.Object

Representation of a name with a optional path, prefix, number and suffix. Examples:

Author:
Thomas Aglassinger

Field Summary
static java.lang.String DOUBLE_PAGE_SEPARATORS
          Possible separators for double pages.
static java.lang.String PATH_SEPARATORS
           
 
Constructor Summary
NumberedName(java.lang.String newFullName)
           
 
Method Summary
 java.lang.String getFullName()
          Get theoriginal full name.
 java.lang.String getName(boolean demoronized)
          Get the name (without the path).
 java.lang.String getPage()
          Get the page of the name.
 java.lang.String getPath()
          Get the path of the name.
 java.lang.String getPrefix()
          Get the prefix before the page of the name.
 java.lang.String getSuffix()
          Get the suffix after the page of the name.
 boolean usesPotentiallyMoronicNumbering()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOUBLE_PAGE_SEPARATORS

public static final java.lang.String DOUBLE_PAGE_SEPARATORS
Possible separators for double pages.

See Also:
Constant Field Values

PATH_SEPARATORS

public static final java.lang.String PATH_SEPARATORS
See Also:
Constant Field Values
Constructor Detail

NumberedName

public NumberedName(java.lang.String newFullName)
Method Detail

getFullName

public java.lang.String getFullName()
Get theoriginal full name.


getName

public java.lang.String getName(boolean demoronized)
Get the name (without the path).

Parameters:
demoronized - if true, page numbers like "1718" are converted to "17+18".

getPage

public java.lang.String getPage()
Get the page of the name. Example: "path/name0023.png" yields "0023".


getPath

public java.lang.String getPath()
Get the path of the name. Example: "path/name0023.png" yields "path/".


getPrefix

public java.lang.String getPrefix()
Get the prefix before the page of the name. Example: "path/name0023.png" yields "name".


getSuffix

public java.lang.String getSuffix()
Get the suffix after the page of the name. Example: "path/name0023.png" yields ".png".


usesPotentiallyMoronicNumbering

public boolean usesPotentiallyMoronicNumbering()