public class URIPrefixes extends Object
resolve(String) is called.| Constructor and Description |
|---|
URIPrefixes()
Creates a simple URIPrefixes object.
|
URIPrefixes(File extraPrefixes)
Creates a URIPrefixes object with a given file where custom prefixes are stored.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Map<String,String> map)
Adds a collection of uri/prefix to this object.
|
void |
addExtra(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.
|
Map<String,List<String>> |
get()
Gets the current mapping of prefixes.
|
void |
loadDefaults()
Loads the default prefixes from the default properties file.
|
Map<String,List<String>> |
loadFromRegistry() |
List<String> |
resolve(String prefix)
Resolves a given prefix.
|
public URIPrefixes()
public URIPrefixes(File extraPrefixes)
extraPrefixes - the properties file where the custom prefixes are stored (can be null)public void loadDefaults()
resolve(String).public void add(Map<String,String> map)
doAutoLoads() if no mapping is loaded yet.map - the map to add.public void addExtra(File inputFile)
inputFile - the properties file where to get the extra prefixes from.public List<String> resolve(String prefix)
doAutoLoads() if no mapping is loaded yet.prefix - the prefix to look-up.public Map<String,List<String>> get()
doAutoLoads() if no mapping is loaded yet.public void doAutoLoads()
Copyright © 2020. All rights reserved.