Class ReferenceCountingVisitor
java.lang.Object
gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogVisitor<T,R>
gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogEntityVisitor<ReferenceCountingVisitor.Context,Void>
gov.nist.secauto.oscal.lib.profile.resolver.policy.ReferenceCountingVisitor
- All Implemented Interfaces:
IReferenceVisitor<ReferenceCountingVisitor.Context>
,ICatalogVisitor<ReferenceCountingVisitor.Context,
Void>
public final class ReferenceCountingVisitor
extends AbstractCatalogEntityVisitor<ReferenceCountingVisitor.Context,Void>
implements IReferenceVisitor<ReferenceCountingVisitor.Context>
-
Nested Class Summary
-
Field Summary
Fields inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogEntityVisitor
CHILD_PART_METAPATH
-
Method Summary
Modifier and TypeMethodDescriptionprotected Void
aggregateResults
(Void first, Void second, ReferenceCountingVisitor.Context context) protected void
entityDispatch
(IEntityItem entity, ReferenceCountingVisitor.Context context) static ReferenceCountingVisitor
instance()
protected Void
protected void
resolveControl
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, ReferenceCountingVisitor.Context context) void
resolveEntity
(IEntityItem entity, ReferenceCountingVisitor.Context context) protected static void
resolveEntity
(IEntityItem entity, ReferenceCountingVisitor.Context context, BiConsumer<IEntityItem, ReferenceCountingVisitor.Context> handler) protected void
resolveGroup
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, ReferenceCountingVisitor.Context context) static void
resolveLocation
(IEntityItem entity, ReferenceCountingVisitor.Context context) static void
resolveParameter
(IEntityItem entity, ReferenceCountingVisitor.Context context) static void
resolveResource
(IEntityItem entity, ReferenceCountingVisitor.Context context) void
visitCatalog
(gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogItem, IIndexer indexer, URI baseUri) visitControl
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, Void childResult, ReferenceCountingVisitor.Context context) Visit the provideditem
representing an OSCALControl
and handle any enclosed references.visitGroup
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, Void childResult, ReferenceCountingVisitor.Context context) Visit the provideditem
representing an OSCALCatalogGroup
and handle any enclosed references.protected void
visitPart
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem groupOrControlItem, ReferenceCountingVisitor.Context context) Called when visiting a part.protected void
visitParts
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem groupOrControlItem, ReferenceCountingVisitor.Context context) Methods inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogEntityVisitor
getItemTypesToVisit, isVisitedItemType, visitBackMatter, visitCatalog, visitControlContainer, visitControlInternal, visitGroupContainer, visitGroupInternal, visitLocation, visitMetadata, visitParameter, visitParty, visitResource, visitRole
Methods inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogVisitor
visitControlItem, visitGroupItem
-
Method Details
-
instance
-
newDefaultResult
- Specified by:
newDefaultResult
in classAbstractCatalogVisitor<ReferenceCountingVisitor.Context,
Void>
-
aggregateResults
- Specified by:
aggregateResults
in classAbstractCatalogVisitor<ReferenceCountingVisitor.Context,
Void>
-
visitCatalog
public void visitCatalog(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogItem, @NonNull IIndexer indexer, @NonNull URI baseUri) -
visitGroup
public Void visitGroup(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, Void childResult, ReferenceCountingVisitor.Context context) Description copied from interface:IReferenceVisitor
Visit the provideditem
representing an OSCALCatalogGroup
and handle any enclosed references.- Specified by:
visitGroup
in interfaceICatalogVisitor<ReferenceCountingVisitor.Context,
Void> - Specified by:
visitGroup
in interfaceIReferenceVisitor<ReferenceCountingVisitor.Context>
- Parameters:
item
- the Metapath node item containing reference nodeschildResult
- the result of evaluating the group's childrencontext
- the calling context information- Returns:
- a meaningful result of the given type
-
visitControl
public Void visitControl(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, Void childResult, ReferenceCountingVisitor.Context context) Description copied from interface:IReferenceVisitor
Visit the provideditem
representing an OSCALControl
and handle any enclosed references.- Specified by:
visitControl
in interfaceICatalogVisitor<ReferenceCountingVisitor.Context,
Void> - Specified by:
visitControl
in interfaceIReferenceVisitor<ReferenceCountingVisitor.Context>
- Parameters:
item
- the Metapath node item containing reference nodeschildResult
- the result of evaluating the control's childrencontext
- the calling context information- Returns:
- a meaningful result of the given type
-
visitParts
protected void visitParts(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem groupOrControlItem, ReferenceCountingVisitor.Context context) - Overrides:
visitParts
in classAbstractCatalogEntityVisitor<ReferenceCountingVisitor.Context,
Void>
-
visitPart
protected void visitPart(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem groupOrControlItem, ReferenceCountingVisitor.Context context) Description copied from class:AbstractCatalogEntityVisitor
Called when visiting a part.Can be overridden by classes extending this interface to support processing of the visited object.
- Overrides:
visitPart
in classAbstractCatalogEntityVisitor<ReferenceCountingVisitor.Context,
Void> - Parameters:
item
- the Metapath item for the partgroupOrControlItem
- the part's parent Metapath itemcontext
- the calling context information
-
resolveGroup
protected void resolveGroup(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, @NonNull ReferenceCountingVisitor.Context context) -
resolveControl
protected void resolveControl(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, @NonNull ReferenceCountingVisitor.Context context) -
resolveLocation
public static void resolveLocation(@NonNull IEntityItem entity, @NonNull ReferenceCountingVisitor.Context context) -
resolveResource
public static void resolveResource(@NonNull IEntityItem entity, @NonNull ReferenceCountingVisitor.Context context) -
resolveParameter
public static void resolveParameter(@NonNull IEntityItem entity, @NonNull ReferenceCountingVisitor.Context context) -
resolveEntity
protected static void resolveEntity(@NonNull IEntityItem entity, @NonNull ReferenceCountingVisitor.Context context, @NonNull BiConsumer<IEntityItem, ReferenceCountingVisitor.Context> handler) -
resolveEntity
public void resolveEntity(@NonNull IEntityItem entity, @NonNull ReferenceCountingVisitor.Context context) -
entityDispatch
protected void entityDispatch(@NonNull IEntityItem entity, @NonNull ReferenceCountingVisitor.Context context)
-