java.lang.Object
org.apache.jena.riot.system.stream.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{StreamManager}.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.clone()Deep copy of location and prefix mapsbooleancontainsMapping(String uri) voidcopyFrom(LocationMapper lmap2) booleangetAltEntry(String uri) getAltPrefix(String uriPrefix) inthashCode()booleanisEmpty()Iterate over all the entries registeredIterate over all the entries registeredIterate over all the prefixes registeredvoidremoveAltEntry(String uri) voidremoveAltPrefix(String uriPrefix) org.apache.jena.rdf.model.ModeltoModel()voidtoModel(org.apache.jena.rdf.model.Model model) toString()
- 
Constructor Details- 
LocationMapperpublic LocationMapper()Create a LocationMapper with no mapping yet
 
- 
- 
Method Details- 
cloneDeep copy of location and prefix maps
- 
copyFrom
- 
containsMapping
- 
altMapping
- 
altMappingApply 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
- 
listAltEntriesIterate over all the entries registered
- 
listAltPrefixesIterate over all the prefixes registered
- 
removeAltEntry
- 
removeAltPrefix
- 
getAltEntry
- 
getAltPrefix
- 
isEmptypublic boolean isEmpty()Iterate over all the entries registered
- 
hashCodepublic int hashCode()
- 
equals
- 
toString
- 
toModelpublic org.apache.jena.rdf.model.Model toModel()
- 
toModelpublic void toModel(org.apache.jena.rdf.model.Model model) 
 
-