|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.util.LocationMapper
public class LocationMapper
Alternative locations for URIs. Maintains two maps: single item alternatives and alternative prefixes. To suggest an alternative location, first check the single items, then check the prefixes. A LocationMapper can be configured by an RDF file. The default for this is "etc/location-mapping.n3". There is a default LocationMapper which is used by the global @link{FileManager}.
FileManager
Field Summary | |
---|---|
static String |
DEFAULT_PATH
The default path for searching for the location mapper |
static String |
GlobalMapperSystemProperty1
|
static String |
GlobalMapperSystemProperty2
|
Constructor Summary | |
---|---|
LocationMapper()
Create a LocationMApper with no mapping yet |
|
LocationMapper(String config)
Create a LocationMapper from a config file |
Method Summary | |
---|---|
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. |
static LocationMapper |
get()
Get the global LocationMapper |
String |
getAltEntry(String uri,
String alt)
|
String |
getAltPrefix(String uriPrefix,
String altPrefix)
|
void |
removeAltEntry(String uri)
|
void |
removeAltPrefix(String uriPrefix)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_PATH
public static final String GlobalMapperSystemProperty1
public static final String GlobalMapperSystemProperty2
Constructor Detail |
---|
public LocationMapper()
public LocationMapper(String config)
Method Detail |
---|
public static LocationMapper get()
public String altMapping(String uri)
public String altMapping(String uri, String otherwise)
uri
- otherwise
-
public void addAltEntry(String uri, String alt)
public void addAltPrefix(String uriPrefix, String altPrefix)
public void removeAltEntry(String uri)
public void removeAltPrefix(String uriPrefix)
public String getAltEntry(String uri, String alt)
public String getAltPrefix(String uriPrefix, String altPrefix)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |