public class ResourceNamer
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
private static int | 
ALPHABET_LENGTH  | 
static java.lang.String | 
DOT  | 
static java.lang.String | 
FAKE_EXT  | 
static java.lang.String | 
FIELD  | 
private char | 
letter  | 
static java.lang.String | 
PLATE  | 
private int | 
resourceCount  | 
static java.lang.String | 
RUN  | 
private char | 
tmpLetter  | 
static java.lang.String | 
WELL  | 
| Constructor and Description | 
|---|
ResourceNamer(int resourceCount)  | 
| Modifier and Type | Method and Description | 
|---|---|
static int | 
alphabeticIndexCount(java.lang.String index)  | 
java.lang.String | 
getLetter()
Returns a  
String representing a single letter (in the case
 where the class instance has been initialized with a resource count lower
 than 26) or a concatenation of two letters (if resource count is higher
 than 26). | 
loci.common.Location | 
getLocationFromResourceName(loci.common.Location resourceParentPath,
                           java.lang.String resourceName,
                           int nameIndex,
                           java.lang.String resourceExtension)
Creates a new  
Location instance using the provided parent path and
 child node name. | 
void | 
nextLetter()
Increments the internal alphabet pointer to the next element of the
 alphabet. 
 | 
void | 
restartAlphabet()
Resets the internal state of the class so that it starts alphabet
 generation from the first letter (ASCII A). 
 | 
public static final java.lang.String PLATE
public static final java.lang.String RUN
public static final java.lang.String WELL
public static final java.lang.String FIELD
public static final java.lang.String FAKE_EXT
public static final java.lang.String DOT
private static final int ALPHABET_LENGTH
private int resourceCount
private char letter
private char tmpLetter
public loci.common.Location getLocationFromResourceName(loci.common.Location resourceParentPath,
                                                        java.lang.String resourceName,
                                                        int nameIndex,
                                                        java.lang.String resourceExtension)
Location instance using the provided parent path and
 child node name. Concatenates the child name with a numerical index that
 acts as an incrementing counter of node elements.resourceParentPath - Path to the parent element.resourceName - Template string used for naming the child resource.nameIndex - Numerical value used for naming the child resource.resourceExtension - Optional extension (if the child resource is a file) or path
          separator (if folder).Location New instance representing the parent and child
          resources.public void restartAlphabet()
public void nextLetter()
public java.lang.String getLetter()
String representing a single letter (in the case
 where the class instance has been initialized with a resource count lower
 than 26) or a concatenation of two letters (if resource count is higher
 than 26).public static int alphabeticIndexCount(java.lang.String index)
Copyright © 2021 Open Microscopy Environment