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
  • Constructor Details

  • Method Details

    • getMapper

      @NonNull protected IIdentifierMapper getMapper()
    • newBuilder

      protected gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractEntityItem.Builder newBuilder(gov.nist.secauto.metaschema.core.metapath.item.node.IModelNodeItem<?,?> 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 class BasicIndexer
      Parameters:
      item - the Metapath node to associate with the entity
      itemType - the type of entity
      identifier - 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 given itemType having the given identifier.

      Will normalize the case of a UUID-based the identifier when requested.

      Specified by:
      getEntity in interface IIndexer
      Overrides:
      getEntity in class BasicIndexer
      Parameters:
      itemType - the type of item to search for
      identifier - the identifier to lookup
      normalize - true if the identifier case should be normalized or false otherwise
      Returns:
      the matching item or null if no match was found