@NotThreadSafe public class IDIndex extends Object
XMLObject
.Modifier and Type | Field and Description |
---|---|
private Map<String,XMLObject> |
idMappings
Mapping of ID attributes to XMLObjects in the subtree rooted at this object's owner.
|
private XMLObject |
owner
The XMLObject which owns this ID index.
|
Constructor and Description |
---|
IDIndex(XMLObject newOwner)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
deregisterIDMapping(String id)
Deregister an ID-to-XMLObject mapping for one of this object's owner's children.
|
void |
deregisterIDMappings(IDIndex idIndex)
Deregister multiple ID-to-XMLObject mappings for this object's owner's children.
|
protected Map<String,XMLObject> |
getIDMappings()
Get the ID-to-XMLObject mappings for this object's owner's children.
|
Set<String> |
getIDs()
Get the set of ID strings which are the index keys.
|
boolean |
isEmpty()
Return whether the index is currently empty.
|
XMLObject |
lookup(String id)
Lookup and return the XMLObject identified by the specified ID attribute.
|
void |
registerIDMapping(String id,
XMLObject referent)
Register an ID-to-XMLObject mapping for one of this object's owner's children.
|
void |
registerIDMappings(IDIndex idIndex)
Register multiple ID-to-XMLObject mappings for this object's owner's children.
|
public void registerIDMapping(@Nonnull@NotEmpty String id, @Nonnull XMLObject referent)
id
- the XMLObject child's ID attribute valuereferent
- the XMLObject childpublic void registerIDMappings(@Nonnull IDIndex idIndex)
idIndex
- the ID-to-XMLObject mapping to registerpublic void deregisterIDMapping(@Nonnull@NotEmpty String id)
id
- the ID attribute value of the XMLObject child to deregisterpublic void deregisterIDMappings(@Nonnull IDIndex idIndex)
idIndex
- the ID-to-XMLObject mappings to deregister@Nullable public XMLObject lookup(@Nonnull@NotEmpty String id)
id
- the ID attribute value to lookuppublic boolean isEmpty()
@Nonnull public Set<String> getIDs()
Copyright © 1999–2019 Shibboleth Consortium. All rights reserved.