Class ReassignmentIndexer
- java.lang.Object
-
- gov.nist.secauto.oscal.lib.profile.resolver.support.BasicIndexer
-
- gov.nist.secauto.oscal.lib.profile.resolver.support.ReassignmentIndexer
-
- All Implemented Interfaces:
IIndexer
public class ReassignmentIndexer extends BasicIndexer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gov.nist.secauto.oscal.lib.profile.resolver.support.IIndexer
IIndexer.SelectionStatus
-
-
Field Summary
-
Fields inherited from interface gov.nist.secauto.oscal.lib.profile.resolver.support.IIndexer
HAS_PROP_KEEP_METAPATH, KEEP_ENTITY_PREDICATE
-
-
Constructor Summary
Constructors Constructor Description ReassignmentIndexer(IIdentifierMapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IEntityItem
getEntity(IEntityItem.ItemType itemType, String identifier, boolean normalize)
Lookup an item of the givenitemType
having the givenidentifier
.protected IIdentifierMapper
getMapper()
protected gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractEntityItem.Builder
newBuilder(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, IEntityItem.ItemType itemType, String identifier)
Create a new builder with the provided info.-
Methods inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.BasicIndexer
addControl, addGroup, addItem, addItem, addLocation, addParameter, addPart, addParty, addResource, addRole, append, getEntities, getEntitiesByItemType, getSelectionStatus, getSelectionStatusMap, isSelected, newBuilder, normalizeIdentifier, removeItem, resetSelectionStatus, setSelectionStatus
-
-
-
-
Constructor Detail
-
ReassignmentIndexer
public ReassignmentIndexer(@NonNull IIdentifierMapper mapper)
-
-
Method Detail
-
getMapper
@NonNull protected IIdentifierMapper getMapper()
-
newBuilder
protected gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractEntityItem.Builder newBuilder(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, IEntityItem.ItemType itemType, String identifier)
Description copied from class:BasicIndexer
Create a new builder with the provided info.This method can be overloaded to support applying additional data to the returned builder.
When working with identifiers that are case insensitve, it is important to ensure that the identifiers are normalized to lower case.
- Overrides:
newBuilder
in classBasicIndexer
- Parameters:
item
- the Metapath node to associate with the entityitemType
- the type of entityidentifier
- the entity's identifier- Returns:
- the entity builder
-
getEntity
public IEntityItem getEntity(IEntityItem.ItemType itemType, String identifier, boolean normalize)
Description copied from interface:IIndexer
Lookup an item of the givenitemType
having the givenidentifier
.Will normalize the case of a UUID-based the identifier when requested.
- Specified by:
getEntity
in interfaceIIndexer
- Overrides:
getEntity
in classBasicIndexer
- Parameters:
itemType
- the type of item to search foridentifier
- the identifier to lookupnormalize
-true
if the identifier case should be normalized orfalse
otherwise- Returns:
- the matching item or
null
if no match was found
-
-