Package org.opensaml.core.xml.util
Class IDIndex
- java.lang.Object
-
- org.opensaml.core.xml.util.IDIndex
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderegisterIDMapping(String id)Deregister an ID-to-XMLObject mapping for one of this object's owner's children.voidderegisterIDMappings(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.booleanisEmpty()Return whether the index is currently empty.XMLObjectlookup(String id)Lookup and return the XMLObject identified by the specified ID attribute.voidregisterIDMapping(String id, XMLObject referent)Register an ID-to-XMLObject mapping for one of this object's owner's children.voidregisterIDMappings(IDIndex idIndex)Register multiple ID-to-XMLObject mappings for this object's owner's children.
-
-
-
Field Detail
-
owner
@Nonnull private final XMLObject owner
The XMLObject which owns this ID index.
-
-
Constructor Detail
-
IDIndex
public IDIndex(@Nonnull XMLObject newOwner)Constructor.- Parameters:
newOwner- the XMLObject which owns this ID-to-XMLObject index
-
-
Method Detail
-
registerIDMapping
public void registerIDMapping(@Nonnull @NotEmpty String id, @Nonnull XMLObject referent)
Register an ID-to-XMLObject mapping for one of this object's owner's children.- Parameters:
id- the XMLObject child's ID attribute valuereferent- the XMLObject child
-
registerIDMappings
public void registerIDMappings(@Nonnull IDIndex idIndex)Register multiple ID-to-XMLObject mappings for this object's owner's children.- Parameters:
idIndex- the ID-to-XMLObject mapping to register
-
deregisterIDMapping
public void deregisterIDMapping(@Nonnull @NotEmpty String id)
Deregister an ID-to-XMLObject mapping for one of this object's owner's children.- Parameters:
id- the ID attribute value of the XMLObject child to deregister
-
deregisterIDMappings
public void deregisterIDMappings(@Nonnull IDIndex idIndex)Deregister multiple ID-to-XMLObject mappings for this object's owner's children.- Parameters:
idIndex- the ID-to-XMLObject mappings to deregister
-
lookup
@Nullable public XMLObject lookup(@Nonnull @NotEmpty String id)
Lookup and return the XMLObject identified by the specified ID attribute.- Parameters:
id- the ID attribute value to lookup- Returns:
- the XMLObject identified by the ID attribute value
-
isEmpty
public boolean isEmpty()
Return whether the index is currently empty.- Returns:
- true if the index is currently empty
-
getIDs
@Nonnull public Set<String> getIDs()
Get the set of ID strings which are the index keys.- Returns:
- the set of ID strings which are keys to the index
-
-