001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package gov.nist.secauto.oscal.lib.profile.resolver.support; 007 008import gov.nist.secauto.metaschema.core.metapath.item.node.IRootAssemblyNodeItem; 009import gov.nist.secauto.oscal.lib.profile.resolver.support.IEntityItem.ItemType; 010 011import java.util.Set; 012 013import edu.umd.cs.findbugs.annotations.NonNull; 014 015/** 016 * A visitor that walks a catalog visiting controls and parameters. 017 */ 018public class ControlIndexingVisitor 019 extends AbstractIndexingVisitor<IIndexer, Void> { 020 021 public ControlIndexingVisitor(@NonNull Set<ItemType> itemTypesToIndex) { 022 super(itemTypesToIndex); 023 } 024 025 @SuppressWarnings("null") 026 @Override 027 protected IIndexer getIndexer(IIndexer state) { 028 return state; 029 } 030 031 @Override 032 protected Void newDefaultResult(IIndexer state) { 033 return null; 034 } 035 036 @Override 037 protected Void aggregateResults(Void first, Void second, IIndexer state) { 038 return null; 039 } 040 041 public void visitProfile(@NonNull IRootAssemblyNodeItem root, @NonNull IIndexer index) { 042 visitMetadata(root, index); 043 visitBackMatter(root, index); 044 } 045}