|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jena.riot.stream.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}.
| Constructor Summary | |
|---|---|
LocationMapper()
Create a LocationMapper with no mapping yet |
|
| 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. |
LocationMapper |
clone()
Deep copy of location and prefix maps |
void |
copyFrom(LocationMapper lmap2)
|
boolean |
equals(Object obj)
|
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 |
void |
removeAltEntry(String uri)
|
void |
removeAltPrefix(String uriPrefix)
|
Model |
toModel()
|
void |
toModel(Model model)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LocationMapper()
| Method Detail |
|---|
public LocationMapper clone()
clone in class Objectpublic void copyFrom(LocationMapper lmap2)
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 Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic Model toModel()
public void toModel(Model model)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||