Skip to content

Commit

Permalink
This fixes usnistgov/oscal-cli#216 by ensuring that the document node…
Browse files Browse the repository at this point in the history
… returns the root node when getValue is called.
  • Loading branch information
david-waltermire committed May 28, 2024
1 parent 215388a commit 879e58d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,9 @@ public URI getDocumentUri() {
public ModelContainer getModel() {
return model.get();
}

@Override
public Object getValue() {
return getRootAssemblyNodeItem().getValue();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;

public interface IDocumentNodeItem extends INodeItem, IFeatureNoDataItem {
public interface IDocumentNodeItem extends INodeItem {
@Override
default NodeItemType getNodeItemType() {
return NodeItemType.DOCUMENT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* All definitions in the {@link ModuleScopeEnum#INHERITED} scope. This allows
* the exported structure of the Metaschema module to be queried.
*/
public interface IModuleNodeItem extends IDocumentNodeItem {
public interface IModuleNodeItem extends IDocumentNodeItem, IFeatureNoDataItem {

/**
* The Metaschema module this item is based on.
Expand Down

0 comments on commit 879e58d

Please sign in to comment.