public class LocationMapper extends Object
FileManager
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PATH
The default path for searching for the location mapper
|
static String |
GlobalMapperSystemProperty1 |
static String |
GlobalMapperSystemProperty2 |
Constructor and Description |
---|
LocationMapper()
Create a LocationMapper with no mapping yet
|
LocationMapper(LocationMapper locMapper)
Create a LocationMapper made like another one
This is a deep copy of the location and prefix maps..
|
LocationMapper(Model model)
Create a LocationMapper from an existing model
|
LocationMapper(String config)
Create a LocationMapper from a config file
|
Modifier and Type | Method and Description |
---|---|
void |
addAltEntry(String uri,
String alt) |
void |
addAltPrefix(String uriPrefix,
String altPrefix) |
String |
altMapping(String uri) |
String |
altMapping(String uri,
String otherwise)
Apply mappings: first try for an exact alternative location, then
try to remap by prefix, finally, try the special case of filenames
in a specific base directory.
|
boolean |
equals(Object obj) |
static LocationMapper |
get()
Get the global LocationMapper
|
String |
getAltEntry(String uri) |
String |
getAltPrefix(String uriPrefix) |
int |
hashCode() |
Iterator<String> |
listAltEntries()
Iterate over all the entries registered
|
Iterator<String> |
listAltPrefixes()
Iterate over all the prefixes registered
|
static LocationMapper |
makeGlobal()
Make a location mapper from the path settings
|
void |
processConfig(Model m) |
void |
removeAltEntry(String uri) |
void |
removeAltPrefix(String uriPrefix) |
static void |
setGlobalLocationMapper(LocationMapper globalLocationMapper)
Set the global lcoation mapper.
|
Model |
toModel() |
void |
toModel(Model model) |
String |
toString() |
public static final String DEFAULT_PATH
public static final String GlobalMapperSystemProperty1
public static final String GlobalMapperSystemProperty2
public LocationMapper()
public LocationMapper(LocationMapper locMapper)
public LocationMapper(Model model)
LocationMappingVocab
public LocationMapper(String config)
public static LocationMapper get()
public static void setGlobalLocationMapper(LocationMapper globalLocationMapper)
globalLocationMapper
- public static LocationMapper makeGlobal()
public String altMapping(String uri, String otherwise)
uri
- otherwise
- public void removeAltEntry(String uri)
public void removeAltPrefix(String uriPrefix)
public Model toModel()
public void toModel(Model model)
public void processConfig(Model m)
Licenced under the Apache License, Version 2.0