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>
public class FlatteningStructuringVisitor extends AbstractCatalogEntityVisitor<IIndexer,Void>
-
-
Field Summary
-
Fields inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogEntityVisitor
CHILD_PART_METAPATH
-
-
Constructor Summary
Constructors Constructor Description FlatteningStructuringVisitor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Void
aggregateResults(Void first, Void second, IIndexer state)
static FlatteningStructuringVisitor
instance()
protected Void
newDefaultResult(IIndexer state)
Void
visitCatalog(gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem catalogItem, IIndexer index)
Void
visitControl(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, Void childResult, IIndexer index)
Called when visiting a control.Void
visitGroup(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, Void childResult, IIndexer index)
Called when visiting a group.protected void
visitLocation(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem metadataItem, IIndexer index)
Called when visiting a location in the "metadata" section of an OSCAL document.protected Void
visitParameter(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem catalogOrGroupOrControl, IIndexer index)
Called when visiting a parameter.protected void
visitParty(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem metadataItem, IIndexer index)
Called when visiting a party in the "metadata" section of an OSCAL document.protected void
visitResource(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, gov.nist.secauto.metaschema.model.common.metapath.item.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.model.common.metapath.item.IRequiredValueModelNodeItem item, gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem 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 Detail
-
FlatteningStructuringVisitor
public FlatteningStructuringVisitor()
-
-
Method Detail
-
instance
public static FlatteningStructuringVisitor instance()
-
newDefaultResult
protected Void newDefaultResult(IIndexer state)
- Specified by:
newDefaultResult
in classAbstractCatalogVisitor<IIndexer,Void>
-
aggregateResults
protected Void aggregateResults(Void first, Void second, IIndexer state)
- Specified by:
aggregateResults
in classAbstractCatalogVisitor<IIndexer,Void>
-
visitCatalog
public Void visitCatalog(@NonNull gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem catalogItem, IIndexer index)
- Overrides:
visitCatalog
in classAbstractCatalogEntityVisitor<IIndexer,Void>
-
visitGroup
public Void visitGroup(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem 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.model.common.metapath.item.IRequiredValueModelNodeItem 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.model.common.metapath.item.IRequiredValueModelNodeItem item, gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem 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.model.common.metapath.item.IRequiredValueModelNodeItem item, gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem 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 Metaschema node item which is a child of the "metadata" nodemetadataItem
- the "metadata" Metaschema node item containing the roleindex
- the calling context information
-
visitLocation
protected void visitLocation(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem 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 Metaschema node item which is a child of the "metadata" nodemetadataItem
- the "metadata" Metaschema node item containing the locationindex
- the calling context information
-
visitParty
protected void visitParty(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem 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 Metaschema node item which is a child of the "metadata" nodemetadataItem
- the "metadata" Metaschema node item containing the partyindex
- the calling context information
-
visitResource
protected void visitResource(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem item, gov.nist.secauto.metaschema.model.common.metapath.item.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 Metaschema node item which is a child of the "metadata" noderootItem
- the resource Metaschema node item containing the partyindex
- the calling context information
-
-