Skip to content

Commit

Permalink
Updates for the latest metaschema-java development release.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed May 28, 2024
1 parent 4a6a055 commit de6d02e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

package gov.nist.secauto.oscal.lib;

import gov.nist.secauto.metaschema.core.model.xml.IModulePostProcessor;
import gov.nist.secauto.metaschema.core.model.IModuleLoader;
import gov.nist.secauto.metaschema.databind.DefaultBindingContext;
import gov.nist.secauto.oscal.lib.model.AssessmentPlan;
import gov.nist.secauto.oscal.lib.model.AssessmentResults;
Expand Down Expand Up @@ -63,7 +63,7 @@ public static OscalBindingContext instance() {
* @param modulePostProcessors
* a list of module post processors to call after loading a module
*/
public OscalBindingContext(@NonNull List<IModulePostProcessor> modulePostProcessors) {
public OscalBindingContext(@NonNull List<IModuleLoader.IModulePostProcessor> modulePostProcessors) {
super(modulePostProcessors);
registerBindingMatcher(Catalog.class);
registerBindingMatcher(Profile.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import gov.nist.secauto.metaschema.databind.io.BindingException;
import gov.nist.secauto.metaschema.databind.io.DeserializationFeature;
import gov.nist.secauto.metaschema.databind.io.IBoundLoader;
import gov.nist.secauto.metaschema.databind.model.IBoundDefinitionAssembly;
import gov.nist.secauto.metaschema.databind.model.IBoundDefinitionModelAssembly;
import gov.nist.secauto.oscal.lib.OscalBindingContext;
import gov.nist.secauto.oscal.lib.OscalUtils;
import gov.nist.secauto.oscal.lib.model.BackMatter;
Expand Down Expand Up @@ -269,7 +269,7 @@ protected IDocumentNodeItem resolveProfile(

return INodeItemFactory.instance().newDocumentNodeItem(
ObjectUtils.requireNonNull(
(IBoundDefinitionAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Catalog.class)),
(IBoundDefinitionModelAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Catalog.class)),
ObjectUtils.requireNonNull(profileItem.getBaseUri()),
resolvedCatalog);
}
Expand Down Expand Up @@ -550,7 +550,7 @@ protected void structureFlat(@NonNull Catalog resolvedCatalog, @NonNull IRootAss
// rebuild the document, since the paths have changed
IDocumentNodeItem resolvedCatalogItem = INodeItemFactory.instance().newDocumentNodeItem(
ObjectUtils.requireNonNull(
(IBoundDefinitionAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Catalog.class)),
(IBoundDefinitionModelAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Catalog.class)),
ObjectUtils.requireNonNull(profileItem.getBaseUri()),
resolvedCatalog);

Expand All @@ -562,7 +562,7 @@ protected void handleModify(@NonNull Catalog resolvedCatalog, @NonNull IRootAsse
throws ProfileResolutionException {
IDocumentNodeItem resolvedCatalogDocument = INodeItemFactory.instance().newDocumentNodeItem(
ObjectUtils.requireNonNull(
(IBoundDefinitionAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Catalog.class)),
(IBoundDefinitionModelAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Catalog.class)),
ObjectUtils.requireNonNull(profileItem.getBaseUri()),
resolvedCatalog);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem;
import gov.nist.secauto.metaschema.core.metapath.item.node.INodeItemFactory;
import gov.nist.secauto.metaschema.core.util.ObjectUtils;
import gov.nist.secauto.metaschema.databind.model.IBoundDefinitionAssembly;
import gov.nist.secauto.metaschema.databind.model.IBoundDefinitionModelAssembly;
import gov.nist.secauto.oscal.lib.OscalBindingContext;
import gov.nist.secauto.oscal.lib.model.Catalog;
import gov.nist.secauto.oscal.lib.model.control.AbstractParameter;
Expand Down Expand Up @@ -181,7 +181,7 @@ public static IDocumentNodeItem newImportedCatalog() {

return INodeItemFactory.instance().newDocumentNodeItem(
ObjectUtils.requireNonNull(
(IBoundDefinitionAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Catalog.class)),
(IBoundDefinitionModelAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Catalog.class)),
ObjectUtils.notNull(Paths.get("").toUri()),
importedCatalog);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import gov.nist.secauto.metaschema.core.metapath.item.node.IRootAssemblyNodeItem;
import gov.nist.secauto.metaschema.core.util.CollectionUtil;
import gov.nist.secauto.metaschema.core.util.ObjectUtils;
import gov.nist.secauto.metaschema.databind.model.IBoundDefinitionAssembly;
import gov.nist.secauto.metaschema.databind.model.IBoundDefinitionModelAssembly;
import gov.nist.secauto.oscal.lib.OscalBindingContext;
import gov.nist.secauto.oscal.lib.model.Catalog;
import gov.nist.secauto.oscal.lib.model.IncludeAll;
Expand Down Expand Up @@ -67,7 +67,7 @@ private static IDocumentNodeItem newImportedCatalog() {

return INodeItemFactory.instance().newDocumentNodeItem(
ObjectUtils.requireNonNull(
(IBoundDefinitionAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Catalog.class)),
(IBoundDefinitionModelAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Catalog.class)),
ObjectUtils.notNull(Paths.get("").toUri()),
importedCatalog);
}
Expand Down Expand Up @@ -95,7 +95,7 @@ void test() throws ProfileResolutionException {

IDocumentNodeItem profileDocumentItem = INodeItemFactory.instance().newDocumentNodeItem(
ObjectUtils.requireNonNull(
(IBoundDefinitionAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Profile.class)),
(IBoundDefinitionModelAssembly) OscalBindingContext.instance().getBoundDefinitionForClass(Profile.class)),
cwd,
profile);

Expand Down

0 comments on commit de6d02e

Please sign in to comment.