public class URIMappingRegistryImpl extends BasicEMap<URI,URI>
Modifier and Type | Class and Description |
---|---|
protected class |
URIMappingRegistryImpl.MappingEntryImpl
An extended implementation that maintains a bit
indicating if the entry represents a folder to folder mapping.
|
protected class |
URIMappingRegistryImpl.URIMapImpl
A map that is a
ExtensibleURIConverterImpl.URIMap . |
BasicEMap.BasicEMapIterator<U>, BasicEMap.BasicEMapKeyIterator, BasicEMap.BasicEMapValueIterator, BasicEMap.DelegatingMap, BasicEMap.Entry<K,V>, BasicEMap.EntryImpl, BasicEMap.View<K,V>
EMap.InternalMapView<K,V>
Modifier and Type | Field and Description |
---|---|
static URIMappingRegistryImpl |
INSTANCE
The implementation of the global mapping registry.
|
protected BasicEList<java.util.List<BasicEMap.Entry<URI,URI>>> |
prefixMaps
A list of lists of prefix URIs;
it is indexed by segment count to yield a list of prefixes of that length.
|
Constructor and Description |
---|
URIMappingRegistryImpl()
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
protected URI |
delegatedGetURI(URI uri)
Returns the mapped URI for the given URI, when standard alternatives fail.
|
protected void |
didAdd(BasicEMap.Entry<URI,URI> entry)
Checks for folder mappings to populate the
prefix maps . |
protected void |
didClear(BasicEList<BasicEMap.Entry<URI,URI>>[] oldEntryData)
Discards all the
prefix maps . |
protected void |
didModify(BasicEMap.Entry<URI,URI> entry,
URI oldValue)
Checks for folder mappings to update the
prefix maps . |
protected void |
didRemove(BasicEMap.Entry<URI,URI> entry)
Checks for folder mappings to cleanup the
prefix maps . |
URI |
getURI(URI uri)
Returns the remapped URI, or the URI itself.
|
java.util.Map<URI,URI> |
map()
Returns a map view that implements
ExtensibleURIConverterImpl.URIMap . |
protected int |
modificationCount()
Provides access to the modification count for use in
URIMappingRegistryImpl.URIMapImpl.modificationCount() . |
protected BasicEMap.Entry<URI,URI> |
newEntry(int hash,
URI key,
URI value)
Creates an
URIMappingRegistryImpl.MappingEntryImpl . |
protected void |
validateKey(URI key)
Validates that the key is a URI.
|
protected void |
validateValue(URI value)
Validates that the value is a URI.
|
add, add, addAll, addAll, clear, clone, contains, containsAll, containsKey, containsValue, doClear, doMove, doPut, doRemove, ensureEntryDataExists, entryForKey, entryIndexForKey, entrySet, equals, get, get, grow, hashCode, hashOf, indexOf, indexOf, indexOfKey, initializeDelegateEList, isEmpty, iterator, keySet, lastIndexOf, listIterator, listIterator, move, move, newEntryData, newList, put, putAll, putAll, putEntry, remove, remove, removeAll, removeEntry, removeKey, resolve, retainAll, set, size, subList, toArray, toArray, toString, useEqualsForKey, useEqualsForValue, values
public static final URIMappingRegistryImpl INSTANCE
URIConverter.URI_MAP
protected BasicEList<java.util.List<BasicEMap.Entry<URI,URI>>> prefixMaps
protected BasicEMap.Entry<URI,URI> newEntry(int hash, URI key, URI value)
URIMappingRegistryImpl.MappingEntryImpl
.newEntry
in class BasicEMap<URI,URI>
hash
- the cached hash code of the key.key
- the key.value
- the value.BasicEMap.newList()
public URI getURI(URI uri)
prefixMaps
prefixes in order.
And failing that, it delegates to delegatedGetURI
.uri
- the URI to remap.protected URI delegatedGetURI(URI uri)
This implementation returns uri
.
uri
- the URI.getURI(URI)
public java.util.Map<URI,URI> map()
ExtensibleURIConverterImpl.URIMap
.protected void validateKey(URI key)
validateKey
in class BasicEMap<URI,URI>
key
- the new key.protected void validateValue(URI value)
validateValue
in class BasicEMap<URI,URI>
value
- the new value.protected void didAdd(BasicEMap.Entry<URI,URI> entry)
prefix maps
.protected void didModify(BasicEMap.Entry<URI,URI> entry, URI oldValue)
prefix maps
.protected void didRemove(BasicEMap.Entry<URI,URI> entry)
prefix maps
.protected void didClear(BasicEList<BasicEMap.Entry<URI,URI>>[] oldEntryData)
prefix maps
.protected int modificationCount()
URIMappingRegistryImpl.URIMapImpl.modificationCount()
.