Class FlatteningStructuringVisitor
java.lang.Object
gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogVisitor<T,R>
gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogEntityVisitor<IIndexer,Void>
gov.nist.secauto.oscal.lib.profile.resolver.merge.FlatteningStructuringVisitor
- All Implemented Interfaces:
ICatalogVisitor<IIndexer,
Void>
-
Field Summary
Fields inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogEntityVisitor
CHILD_PART_METAPATH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Void
aggregateResults
(Void first, Void second, IIndexer state) static FlatteningStructuringVisitor
instance()
protected Void
newDefaultResult
(IIndexer state) visitCatalog
(gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogItem, IIndexer index) visitControl
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, Void childResult, IIndexer index) Called when visiting a control.visitGroup
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, Void childResult, IIndexer index) Called when visiting a group.protected void
visitLocation
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem metadataItem, IIndexer index) Called when visiting a location in the "metadata" section of an OSCAL document.protected Void
visitParameter
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem catalogOrGroupOrControl, IIndexer index) Called when visiting a parameter.protected void
visitParty
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem metadataItem, IIndexer index) Called when visiting a party in the "metadata" section of an OSCAL document.protected void
visitResource
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IRootAssemblyNodeItem rootItem, IIndexer index) Called when visiting a resource in the "back-matter" section of an OSCAL document.protected void
visitRole
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem metadataItem, IIndexer index) Called when visiting a role in the "metadata" section of an OSCAL document.Methods inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogEntityVisitor
getItemTypesToVisit, isVisitedItemType, visitBackMatter, visitControlContainer, visitControlInternal, visitGroupContainer, visitGroupInternal, visitMetadata, visitPart, visitParts
Methods inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogVisitor
visitControlItem, visitGroupItem
-
Constructor Details
-
FlatteningStructuringVisitor
public FlatteningStructuringVisitor()
-
-
Method Details
-
instance
-
newDefaultResult
- Specified by:
newDefaultResult
in classAbstractCatalogVisitor<IIndexer,
Void>
-
aggregateResults
- Specified by:
aggregateResults
in classAbstractCatalogVisitor<IIndexer,
Void>
-
visitCatalog
public Void visitCatalog(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogItem, IIndexer index) - Overrides:
visitCatalog
in classAbstractCatalogEntityVisitor<IIndexer,
Void>
-
visitGroup
public Void visitGroup(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, Void childResult, IIndexer index) Description copied from interface:ICatalogVisitor
Called when visiting a group.Can be overridden by classes extending this interface to support processing of the visited object.
- Parameters:
item
- the Metapath item for the groupchildResult
- the result of evaluating the group's childrenindex
- 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, IIndexer index) Description copied from interface:ICatalogVisitor
Called when visiting a control.Can be overridden by classes extending this interface to support processing of the visited object.
- Parameters:
item
- the Metapath item for the controlchildResult
- the result of evaluating the control's childrenindex
- the calling context information- Returns:
- a meaningful result of the given type
-
visitParameter
protected Void visitParameter(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem catalogOrGroupOrControl, IIndexer index) Description copied from class:AbstractCatalogEntityVisitor
Called when visiting a parameter.Can be overridden by classes extending this interface to support processing of the visited object.
- Overrides:
visitParameter
in classAbstractCatalogEntityVisitor<IIndexer,
Void> - Parameters:
item
- the Metapath item for the parametercatalogOrGroupOrControl
- the parameter's parent Metapath itemindex
- the calling context information- Returns:
- a meaningful result of the given type
-
visitRole
protected void visitRole(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem metadataItem, IIndexer index) Description copied from class:AbstractCatalogEntityVisitor
Called when visiting a role in the "metadata" section of an OSCAL document.Can be overridden by classes extending this interface to support processing of the visited object.
- Overrides:
visitRole
in classAbstractCatalogEntityVisitor<IIndexer,
Void> - Parameters:
item
- the role Module node item which is a child of the "metadata" nodemetadataItem
- the "metadata" Module node item containing the roleindex
- the calling context information
-
visitLocation
protected void visitLocation(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem metadataItem, IIndexer index) Description copied from class:AbstractCatalogEntityVisitor
Called when visiting a location in the "metadata" section of an OSCAL document.Can be overridden by classes extending this interface to support processing of the visited object.
- Overrides:
visitLocation
in classAbstractCatalogEntityVisitor<IIndexer,
Void> - Parameters:
item
- the location Module node item which is a child of the "metadata" nodemetadataItem
- the "metadata" Module node item containing the locationindex
- the calling context information
-
visitParty
protected void visitParty(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem metadataItem, IIndexer index) Description copied from class:AbstractCatalogEntityVisitor
Called when visiting a party in the "metadata" section of an OSCAL document.Can be overridden by classes extending this interface to support processing of the visited object.
- Overrides:
visitParty
in classAbstractCatalogEntityVisitor<IIndexer,
Void> - Parameters:
item
- the party Module node item which is a child of the "metadata" nodemetadataItem
- the "metadata" Module node item containing the partyindex
- the calling context information
-
visitResource
protected void visitResource(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem item, gov.nist.secauto.metaschema.core.metapath.item.node.IRootAssemblyNodeItem rootItem, IIndexer index) Description copied from class:AbstractCatalogEntityVisitor
Called when visiting a resource in the "back-matter" section of an OSCAL document.Can be overridden by classes extending this interface to support processing of the visited object.
- Overrides:
visitResource
in classAbstractCatalogEntityVisitor<IIndexer,
Void> - Parameters:
item
- the resource Module node item which is a child of the "metadata" noderootItem
- the resource Module node item containing the partyindex
- the calling context information
-