public class SourceHabitats extends Object
SourceHabitats.SourceHabitat
is maintained which will
be searched for a file, ie. a data source with a certain file name.
Currently this can be a SourceHabitats.SourceHabitat_file
as a pointer
into the file system, or a SourceHabitats.SourceHabitat_resource
as a class
which cames with "resources", eg. in a ".jar" file.
Modifier and Type | Class and Description |
---|---|
class |
SourceHabitats.FoundSource
Represents the only one data source which has been successfully found
for one particular resource name (mostly a "file name stem").
|
class |
SourceHabitats.SourceHabitat
Represents one of many potential sources which have
to be searched for library modules, etc.
|
protected class |
SourceHabitats.SourceHabitat_file
Represents a source habitat which is a directory in the file system.
|
protected class |
SourceHabitats.SourceHabitat_resource
Represents a source habitat which points to a directory, relative to the
position of a loaded java class.
|
Modifier and Type | Field and Description |
---|---|
protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> |
msg |
static String |
PREFIX_FILE |
static String |
PREFIX_RESOURCE |
static String |
RELATIVE_PATH_SEPARATOR |
protected static Function<SourceHabitats.SourceHabitat,String> |
SourceHabitat_get_name |
protected List<SourceHabitats.SourceHabitat> |
sourceList |
Constructor and Description |
---|
SourceHabitats(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg) |
Modifier and Type | Method and Description |
---|---|
String |
allPlaces_toString() |
void |
appendNewHabitat(String s,
@Opt String additionalErrorText)
Service access point for adding a habitat to the end of the search list.
|
protected void |
ERROR(String txt) |
protected void |
LOG(String txt) |
protected @Opt SourceHabitats.SourceHabitat |
makeHabitat(String name,
@Opt String additionalErrorText)
Internal method to check whether the input to
appendNewHabitat(String,String)
is consistent. |
@Opt SourceHabitats.FoundSource |
searchAllPlaces(String name,
boolean verbose,
String... suffices)
Service access point for searching all habitats, for the name of the resources,
tested with all suffixed.
|
public static final String PREFIX_FILE
public static final String PREFIX_RESOURCE
public static final String RELATIVE_PATH_SEPARATOR
protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg
protected List<SourceHabitats.SourceHabitat> sourceList
protected static Function<SourceHabitats.SourceHabitat,String> SourceHabitat_get_name
public SourceHabitats(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
public String allPlaces_toString()
@Opt public @Opt SourceHabitats.FoundSource searchAllPlaces(String name, boolean verbose, String... suffices)
public void appendNewHabitat(String s, @Opt @Opt String additionalErrorText)
s
- name of the habitat according to the defined prefices, see class docu text.protected void ERROR(String txt)
protected void LOG(String txt)
@Opt protected @Opt SourceHabitats.SourceHabitat makeHabitat(String name, @Opt @Opt String additionalErrorText)
appendNewHabitat(String,String)
is consistent.see also the complete user documentation .