public class ResourceNamer extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DOT |
static String |
FAKE_EXT |
static String |
FIELD |
static String |
PLATE |
static String |
RUN |
static String |
WELL |
Constructor and Description |
---|
ResourceNamer(int resourceCount) |
Modifier and Type | Method and Description |
---|---|
static int |
alphabeticIndexCount(String index) |
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). |
Location |
getLocationFromResourceName(Location resourceParentPath,
String resourceName,
int nameIndex,
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 String PLATE
public static final String RUN
public static final String WELL
public static final String FIELD
public static final String FAKE_EXT
public static final String DOT
public Location getLocationFromResourceName(Location resourceParentPath, String resourceName, int nameIndex, 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 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(String index)
Copyright © 2014 Open Microscopy Environment