|
||||||||||
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(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 |
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. |
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()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, 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(LocationMapper locMapper)
public LocationMapper(Model model)
LocationMappingVocab
public LocationMapper(String config)
Method Detail |
---|
public static LocationMapper get()
public static void setGlobalLocationMapper(LocationMapper globalLocationMapper)
globalLocationMapper
- public static LocationMapper makeGlobal()
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 Iterator<String> listAltEntries()
public Iterator<String> listAltPrefixes()
public void removeAltEntry(String uri)
public void removeAltPrefix(String uriPrefix)
public String getAltEntry(String uri)
public String getAltPrefix(String uriPrefix)
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public Model toModel()
public void toModel(Model model)
public void processConfig(Model m)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |