Class ProfileResolver
- java.lang.Object
-
- gov.nist.secauto.oscal.lib.profile.resolver.ProfileResolver
-
public class ProfileResolver extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProfileResolver.StructuringDirective
-
Constructor Summary
Constructors Constructor Description ProfileResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description gov.nist.secauto.metaschema.binding.io.IBoundLoadergetBoundLoader()Gets the configured loader or creates a new default loader if no loader was configured.gov.nist.secauto.metaschema.model.common.metapath.DynamicContextgetDynamicContext()protected EntityResolvergetEntityResolver(URI documentUri)protected voidhandleAlter(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueAssemblyNodeItem item, IIndexer indexer)protected voidhandleMerge(Catalog resolvedCatalog, gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument, IIndexer importIndex)protected voidhandleModify(Catalog resolvedCatalog, gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument)protected voidhandleSetParameter(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueAssemblyNodeItem item, IIndexer indexer)protected InputSourcenewImportSource(URI importUri, gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument)gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItemresolve(gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileOrCatalog)protected gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItemresolve(gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileOrCatalog, Stack<URI> importHistory)protected IIndexerresolveImport(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem profileImportItem, gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument, Stack<URI> importHistory, Catalog resolvedCatalog)protected gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItemresolveProfile(gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument, Stack<URI> importHistory)Resolve the profile to a catalog.gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItemresolveProfile(File file)gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItemresolveProfile(URL url)gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItemresolveProfile(Path path)voidsetBoundLoader(gov.nist.secauto.metaschema.binding.io.IBoundLoader loader)voidsetDynamicContext(gov.nist.secauto.metaschema.model.common.metapath.DynamicContext dynamicContext)protected voidstructureFlat(Catalog resolvedCatalog, gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument, IIndexer importIndex)
-
-
-
Constructor Detail
-
ProfileResolver
public ProfileResolver()
-
-
Method Detail
-
getBoundLoader
@NonNull public gov.nist.secauto.metaschema.binding.io.IBoundLoader getBoundLoader()
Gets the configured loader or creates a new default loader if no loader was configured.- Returns:
- the bound loader
-
setBoundLoader
public void setBoundLoader(@NonNull gov.nist.secauto.metaschema.binding.io.IBoundLoader loader)
-
getDynamicContext
@NonNull public gov.nist.secauto.metaschema.model.common.metapath.DynamicContext getDynamicContext()
-
setDynamicContext
public void setDynamicContext(@NonNull gov.nist.secauto.metaschema.model.common.metapath.DynamicContext dynamicContext)
-
getEntityResolver
@NonNull protected EntityResolver getEntityResolver(@NonNull URI documentUri)
-
resolveProfile
public gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem resolveProfile(@NonNull URL url) throws URISyntaxException, IOException, ProfileResolutionException
-
resolveProfile
public gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem resolveProfile(@NonNull Path path) throws IOException, ProfileResolutionException
-
resolveProfile
public gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem resolveProfile(@NonNull File file) throws IOException, ProfileResolutionException
-
resolveProfile
@NonNull protected gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem resolveProfile(@NonNull gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument, @NonNull Stack<URI> importHistory) throws IOException, ProfileResolutionException
Resolve the profile to a catalog.- Parameters:
profileDocument- aIDocumentNodeItemcontaining the profile to resolveimportHistory- the import stack for cycle detection- Returns:
- the resolved profile
- Throws:
IOException- if an error occurred while loading the profile or an importProfileResolutionException- if an error occurred while resolving the profile
-
resolve
@NonNull public gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem resolve(@NonNull gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileOrCatalog) throws IOException, ProfileResolutionException
-
resolve
@NonNull protected gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem resolve(@NonNull gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileOrCatalog, @NonNull Stack<URI> importHistory) throws IOException, ProfileResolutionException
-
resolveImport
@NonNull protected IIndexer resolveImport(@NonNull gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem profileImportItem, @NonNull gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument, @NonNull Stack<URI> importHistory, @NonNull Catalog resolvedCatalog) throws IOException, ProfileResolutionException
-
newImportSource
@NonNull protected InputSource newImportSource(@NonNull URI importUri, @NonNull gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument) throws IOException
- Throws:
IOException
-
handleMerge
protected void handleMerge(@NonNull Catalog resolvedCatalog, @NonNull gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument, @NonNull IIndexer importIndex)
-
structureFlat
protected void structureFlat(@NonNull Catalog resolvedCatalog, @NonNull gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument, @NonNull IIndexer importIndex)
-
handleModify
protected void handleModify(@NonNull Catalog resolvedCatalog, @NonNull gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument) throws ProfileResolutionException
- Throws:
ProfileResolutionException
-
handleSetParameter
protected void handleSetParameter(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueAssemblyNodeItem item, IIndexer indexer)
-
handleAlter
protected void handleAlter(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueAssemblyNodeItem item, IIndexer indexer)
-
-