java.lang.Object
org.apache.jena.util.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}.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.LocationMapper(String config) Deprecated.UseStreamManagerandLocationMapperfromorg.apache.jena.riot.system.stream.LocationMapper(Model model) Deprecated.UseStreamManagerandLocationMapperfromorg.apache.jena.riot.system.stream.LocationMapper(LocationMapper locMapper) Deprecated.UseStreamManagerandLocationMapperfromorg.apache.jena.riot.system.stream. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAltEntry(String uri, String alt) voidaddAltPrefix(String uriPrefix, String altPrefix) altMapping(String uri) 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.booleanstatic LocationMapperget()Deprecated.UseStreamManagerandLocationMapperfromorg.apache.jena.riot.system.stream.getAltEntry(String uri) getAltPrefix(String uriPrefix) static LocationMapperFor use within Jena libraries only.inthashCode()Iterate over all the entries registeredIterate over all the prefixes registeredstatic LocationMapperMake a location mapper from the path settingsvoidvoidremoveAltEntry(String uri) voidremoveAltPrefix(String uriPrefix) static voidsetGlobalLocationMapper(LocationMapper globalLocationMapper) Set the global location mapper.toModel()voidtoString()
-
Field Details
-
DEFAULT_PATH
The default path for searching for the location mapper- See Also:
-
GlobalMapperSystemProperty1
- See Also:
-
GlobalMapperSystemProperty2
- See Also:
-
-
Constructor Details
-
LocationMapper
Deprecated.UseStreamManagerandLocationMapperfromorg.apache.jena.riot.system.stream.Create a LocationMapper with no mapping yet -
LocationMapper
Deprecated.UseStreamManagerandLocationMapperfromorg.apache.jena.riot.system.stream.Create a LocationMapper made like another one This is a deep copy of the location and prefix maps. -
LocationMapper
Deprecated.UseStreamManagerandLocationMapperfromorg.apache.jena.riot.system.stream.Create a LocationMapper from an existing model- See Also:
-
LocationMapper
Deprecated.UseStreamManagerandLocationMapperfromorg.apache.jena.riot.system.stream.Create a LocationMapper from a config file
-
-
Method Details
-
getInternal
For use within Jena libraries only. -
get
Deprecated.UseStreamManagerandLocationMapperfromorg.apache.jena.riot.system.stream.Get the global LocationMapper. -
setGlobalLocationMapper
Set the global location mapper. (as returned byget()) If called before any call to get(), then the usual default global location mapper is not created- Parameters:
globalLocationMapper-
-
makeGlobal
Make a location mapper from the path settings -
altMapping
-
altMapping
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.- Parameters:
uri-otherwise-- Returns:
- The alternative location chosen
-
addAltEntry
-
addAltPrefix
-
listAltEntries
Iterate over all the entries registered -
listAltPrefixes
Iterate over all the prefixes registered -
removeAltEntry
-
removeAltPrefix
-
getAltEntry
-
getAltPrefix
-
hashCode
public int hashCode() -
equals
-
toString
-
toModel
-
toModel
-
processConfig
-
StreamManagerandLocationMapperfromorg.apache.jena.riot.system.stream.