|
|||||||||
PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.emf.common.util.BasicEMap | +--org.eclipse.emf.ecore.resource.impl.URIMappingRegistryImpl
An extensible implementation of a URI mapping registry.
Inner Class Summary | |
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 URIConverterImpl.URIMap . |
Inner classes inherited from class org.eclipse.emf.common.util.BasicEMap |
BasicEMap.BasicEMapIterator, BasicEMap.BasicEMapKeyIterator, BasicEMap.BasicEMapValueIterator, BasicEMap.DelegatingMap, BasicEMap.Entry, BasicEMap.EntryImpl, BasicEMap.View |
Field Summary | |
static URIMappingRegistryImpl |
INSTANCE
The implementation of the global mapping registry. |
protected BasicEList |
prefixMaps
A list of lists of prefix URIs; it is indexed by segment count to yield a list of prefixes of that length. |
Fields inherited from class org.eclipse.emf.common.util.BasicEMap |
delegateEList, entryData, modCount, size, view |
Constructor Summary | |
URIMappingRegistryImpl()
Creates an instance. |
Method Summary | |
protected URI |
delegatedGetURI(URI uri)
Returns the mapped URI for the given URI, when standard alternatives fail. |
protected void |
didAdd(BasicEMap.Entry entry)
Checks for folder mappings to populate the prefix maps . |
protected void |
didClear(BasicEList[] oldEntryData)
Discards all the prefix maps . |
protected void |
didModify(BasicEMap.Entry entry,
java.lang.Object oldValue)
Checks for folder mappings to update the prefix maps . |
protected void |
didRemove(BasicEMap.Entry 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 |
map()
Returns a map view that implements URIConverterImpl.URIMap . |
protected BasicEMap.Entry |
newEntry(int hash,
java.lang.Object key,
java.lang.Object value)
Creates an URIMappingRegistryImpl.MappingEntryImpl . |
protected void |
validateKey(java.lang.Object key)
Validates that the key is a URI. |
protected void |
validateValue(java.lang.Object value)
Validates that the value is a URI. |
Methods inherited from class org.eclipse.emf.common.util.BasicEMap |
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, putEntry, remove, remove, removeAll, removeEntry, removeKey, resolve, retainAll, set, size, subList, toArray, toArray, toString, useEqualsForKey, useEqualsForValue, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final URIMappingRegistryImpl INSTANCE
URIConverter.URI_MAP
protected BasicEList prefixMaps
Constructor Detail |
public URIMappingRegistryImpl()
Method Detail |
protected BasicEMap.Entry newEntry(int hash, java.lang.Object key, java.lang.Object value)
URIMappingRegistryImpl.MappingEntryImpl
.newEntry
in class BasicEMap
org.eclipse.emf.common.util.BasicEMap
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 map()
URIConverterImpl.URIMap
.map
in class BasicEMap
org.eclipse.emf.common.util.EMap
protected void validateKey(java.lang.Object key)
validateKey
in class BasicEMap
org.eclipse.emf.common.util.BasicEMap
key
- the new key.java.lang.IllegalArgumentException
- if a constraint prevents the object from being added.protected void validateValue(java.lang.Object value)
validateValue
in class BasicEMap
org.eclipse.emf.common.util.BasicEMap
value
- the new value.java.lang.IllegalArgumentException
- if a constraint prevents the object from being added.protected void didAdd(BasicEMap.Entry entry)
prefix maps
.didAdd
in class BasicEMap
org.eclipse.emf.common.util.BasicEMap
entry
- the added entry.protected void didModify(BasicEMap.Entry entry, java.lang.Object oldValue)
prefix maps
.didModify
in class BasicEMap
org.eclipse.emf.common.util.BasicEMap
entry
- the new entry.protected void didRemove(BasicEMap.Entry entry)
prefix maps
.didRemove
in class BasicEMap
org.eclipse.emf.common.util.BasicEMap
entry
- the removed entry.protected void didClear(BasicEList[] oldEntryData)
prefix maps
.didClear
in class BasicEMap
org.eclipse.emf.common.util.BasicEMap
entry
- the removed entry.
|
Copyright 2001-2002 IBM Corporation and others. All Rights Reserved. |
||||||||
PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |