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 class
ProfileResolver.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.IBoundLoader
getBoundLoader()
Gets the configured loader or creates a new default loader if no loader was configured.gov.nist.secauto.metaschema.model.common.metapath.DynamicContext
getDynamicContext()
protected EntityResolver
getEntityResolver(URI documentUri)
protected void
handleAlter(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueAssemblyNodeItem item, IIndexer indexer)
protected void
handleMerge(Catalog resolvedCatalog, gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument, IIndexer importIndex)
protected void
handleModify(Catalog resolvedCatalog, gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument)
protected void
handleSetParameter(gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueAssemblyNodeItem item, IIndexer indexer)
protected InputSource
newImportSource(URI importUri, gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileDocument)
gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem
resolve(gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileOrCatalog)
protected gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem
resolve(gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem profileOrCatalog, Stack<URI> importHistory)
protected IIndexer
resolveImport(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.IDocumentNodeItem
resolveProfile(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.IDocumentNodeItem
resolveProfile(File file)
gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem
resolveProfile(URL url)
gov.nist.secauto.metaschema.model.common.metapath.item.IDocumentNodeItem
resolveProfile(Path path)
void
setBoundLoader(gov.nist.secauto.metaschema.binding.io.IBoundLoader loader)
void
setDynamicContext(gov.nist.secauto.metaschema.model.common.metapath.DynamicContext dynamicContext)
protected void
structureFlat(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
- aIDocumentNodeItem
containing 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)
-
-