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
-
Constructor Summary
ConstructorDescriptionDeprecated.LocationMapper
(String config) Deprecated.UseStreamManager
andLocationMapper
fromorg.apache.jena.riot.system.stream
.LocationMapper
(Model model) Deprecated.UseStreamManager
andLocationMapper
fromorg.apache.jena.riot.system.stream
.LocationMapper
(LocationMapper locMapper) Deprecated.UseStreamManager
andLocationMapper
fromorg.apache.jena.riot.system.stream
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAltEntry
(String uri, String alt) void
addAltPrefix
(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.boolean
static LocationMapper
get()
Deprecated.UseStreamManager
andLocationMapper
fromorg.apache.jena.riot.system.stream
.getAltEntry
(String uri) getAltPrefix
(String uriPrefix) static LocationMapper
For use within Jena libraries only.int
hashCode()
Iterate over all the entries registeredIterate over all the prefixes registeredstatic LocationMapper
Make a location mapper from the path settingsvoid
void
removeAltEntry
(String uri) void
removeAltPrefix
(String uriPrefix) static void
setGlobalLocationMapper
(LocationMapper globalLocationMapper) Set the global location mapper.toModel()
void
toString()
-
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.UseStreamManager
andLocationMapper
fromorg.apache.jena.riot.system.stream
.Create a LocationMapper with no mapping yet -
LocationMapper
Deprecated.UseStreamManager
andLocationMapper
fromorg.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.UseStreamManager
andLocationMapper
fromorg.apache.jena.riot.system.stream
.Create a LocationMapper from an existing model- See Also:
-
LocationMapper
Deprecated.UseStreamManager
andLocationMapper
fromorg.apache.jena.riot.system.stream
.Create a LocationMapper from a config file
-
-
Method Details
-
getInternal
For use within Jena libraries only. -
get
Deprecated.UseStreamManager
andLocationMapper
fromorg.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
-
StreamManager
andLocationMapper
fromorg.apache.jena.riot.system.stream
.