Document
Class ImageIDnumerical

java.lang.Object
  extended by Document.ImageID
      extended by Document.ImageIDnumerical
All Implemented Interfaces:
java.lang.Comparable<ImageID>

public class ImageIDnumerical
extends ImageID

Class representing a numerical ID.


Constructor Summary
ImageIDnumerical(int id)
          Copy constructor.
ImageIDnumerical(java.lang.String id)
          Creates a new ID using a string.
 
Method Summary
 int compareTo(ImageID id)
          Compares this object with the specified object for order.
static ImageID getGlobalIdReg(ImageID idI, ImageID idR)
          Computes the global ID of a region (including the image ID).
static ImageID getIdImg(ImageID id)
          Computes the image ID from the region global ID.
static ImageID getIdReg(ImageID id)
          Computes the region (local) ID from the region global ID.
 int size()
          The number of elements in the ID.
 java.lang.String toString()
          Returns a string representation of this ID.
 
Methods inherited from class Document.ImageID
equals, equals, hashCode, isErrorDB, isErrorExtract, isErrorFile, isErrorGeneric, isErrorID, isErrorNoImageFile, isErrorPath, isErrorStream, isErrorURL, isExtrOK, isValid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageIDnumerical

public ImageIDnumerical(java.lang.String id)
Creates a new ID using a string.

Parameters:
id - String containing the ID.

ImageIDnumerical

public ImageIDnumerical(int id)
Copy constructor.

Parameters:
id - numerical ID.
Method Detail

size

public int size()
The number of elements in the ID.

Specified by:
size in class ImageID
Returns:
Number of elements.

toString

public java.lang.String toString()
Returns a string representation of this ID.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this ID.

compareTo

public int compareTo(ImageID id)
Compares this object with the specified object for order.

Specified by:
compareTo in interface java.lang.Comparable<ImageID>
Specified by:
compareTo in class ImageID
Parameters:
id - ID to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

getGlobalIdReg

public static ImageID getGlobalIdReg(ImageID idI,
                                     ImageID idR)
Computes the global ID of a region (including the image ID).

Parameters:
idI - image ID.
idR - region (local) ID.
Returns:
region global ID.

getIdImg

public static ImageID getIdImg(ImageID id)
Computes the image ID from the region global ID.

Parameters:
id - region global ID.
Returns:
image ID.

getIdReg

public static ImageID getIdReg(ImageID id)
Computes the region (local) ID from the region global ID.

Parameters:
id - region global ID.
Returns:
region (local) ID.