public class URIPrefixes
extends java.lang.Object
resolve(String) is called.| Constructor and Description |
|---|
URIPrefixes()
Creates a simple URIPrefixes object.
|
URIPrefixes(java.io.File extraPrefixes)
Creates a URIPrefixes object with a given file where custom prefixes are stored.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.util.Map<java.lang.String,java.lang.String> map)
Adds a collection of uri/prefix to this object.
|
void |
addExtra(java.io.File inputFile)
Adds prefixes from a given properties file.
|
void |
doAutoLoads()
Performs the auto-loading steps: load the defaults,
then adds the custom prefixes if a file for them is set.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
get()
Gets the current mapping of prefixes.
|
void |
loadDefaults()
Loads the default prefixes from the default properties file.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
loadFromRegistry() |
java.util.List<java.lang.String> |
resolve(java.lang.String prefix)
Resolves a given prefix.
|
public URIPrefixes()
public URIPrefixes(java.io.File extraPrefixes)
extraPrefixes - the properties file where the custom prefixes are stored (can be null)public void loadDefaults()
resolve(String).public void add(java.util.Map<java.lang.String,java.lang.String> map)
doAutoLoads() if no mapping is loaded yet.map - the map to add.public void addExtra(java.io.File inputFile)
inputFile - the properties file where to get the extra prefixes from.public java.util.List<java.lang.String> resolve(java.lang.String prefix)
doAutoLoads() if no mapping is loaded yet.prefix - the prefix to look-up.public java.util.Map<java.lang.String,java.util.List<java.lang.String>> get()
doAutoLoads() if no mapping is loaded yet.public void doAutoLoads()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> loadFromRegistry()