diff --git a/core/metaschema b/core/metaschema index e82dbcc24..eae19ab94 160000 --- a/core/metaschema +++ b/core/metaschema @@ -1 +1 @@ -Subproject commit e82dbcc240ac903240740ec5743996938ed92518 +Subproject commit eae19ab94dfc8d1557c849a069995fa3bfe4b762 diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/binding/metaschema/MetapathContext.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/binding/metaschema/MetapathContext.java index 8f50cf5e8..41adadc2d 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/binding/metaschema/MetapathContext.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/binding/metaschema/MetapathContext.java @@ -64,10 +64,10 @@ public final class MetapathContext implements IBoundObject { private AssemblyConstraints _constraints; @BoundAssembly( - useName = "metapath-context", + useName = "context", maxOccurs = -1, - groupAs = @GroupAs(name = "metapath-contexts", inJson = JsonGroupAsBehavior.LIST)) - private List _metapathContexts; + groupAs = @GroupAs(name = "contexts", inJson = JsonGroupAsBehavior.LIST)) + private List _contexts; @BoundField( formalName = "Remarks", @@ -132,12 +132,12 @@ public void setConstraints(AssemblyConstraints value) { _constraints = value; } - public List getMetapathContexts() { - return _metapathContexts; + public List getContexts() { + return _contexts; } - public void setMetapathContexts(List value) { - _metapathContexts = value; + public void setContexts(List value) { + _contexts = value; } /** @@ -147,12 +147,12 @@ public void setMetapathContexts(List value) { * the item to add * @return {@code true} */ - public boolean addMetapathContext(MetapathContext item) { + public boolean addContext(MetapathContext item) { MetapathContext value = ObjectUtils.requireNonNull(item, "item cannot be null"); - if (_metapathContexts == null) { - _metapathContexts = new LinkedList<>(); + if (_contexts == null) { + _contexts = new LinkedList<>(); } - return _metapathContexts.add(value); + return _contexts.add(value); } /** @@ -163,9 +163,9 @@ public boolean addMetapathContext(MetapathContext item) { * the item to remove * @return {@code true} if the item was removed or {@code false} otherwise */ - public boolean removeMetapathContext(MetapathContext item) { + public boolean removeContext(MetapathContext item) { MetapathContext value = ObjectUtils.requireNonNull(item, "item cannot be null"); - return _metapathContexts != null && _metapathContexts.remove(value); + return _contexts != null && _contexts.remove(value); } public Remarks getRemarks() { diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/binding/metaschema/MetaschemaMetaConstraints.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/binding/metaschema/MetaschemaMetaConstraints.java index aaa2d0734..71e4c8bc8 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/binding/metaschema/MetaschemaMetaConstraints.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/binding/metaschema/MetaschemaMetaConstraints.java @@ -67,11 +67,11 @@ public final class MetaschemaMetaConstraints implements IBoundObject { private DefinitionContext _definitionContext; @BoundAssembly( - useName = "metapath-context", + useName = "context", minOccurs = 1, maxOccurs = -1, - groupAs = @GroupAs(name = "metapath-contexts", inJson = JsonGroupAsBehavior.LIST)) - private List _metapathContexts; + groupAs = @GroupAs(name = "contexts", inJson = JsonGroupAsBehavior.LIST)) + private List _contexts; public MetaschemaMetaConstraints() { this(null); @@ -94,12 +94,12 @@ public void setDefinitionContext(DefinitionContext value) { _definitionContext = value; } - public List getMetapathContexts() { - return _metapathContexts; + public List getContexts() { + return _contexts; } - public void setMetapathContexts(List value) { - _metapathContexts = value; + public void setContexts(List value) { + _contexts = value; } /** @@ -109,12 +109,12 @@ public void setMetapathContexts(List value) { * the item to add * @return {@code true} */ - public boolean addMetapathContext(MetapathContext item) { + public boolean addContext(MetapathContext item) { MetapathContext value = ObjectUtils.requireNonNull(item, "item cannot be null"); - if (_metapathContexts == null) { - _metapathContexts = new LinkedList<>(); + if (_contexts == null) { + _contexts = new LinkedList<>(); } - return _metapathContexts.add(value); + return _contexts.add(value); } /** @@ -125,9 +125,9 @@ public boolean addMetapathContext(MetapathContext item) { * the item to remove * @return {@code true} if the item was removed or {@code false} otherwise */ - public boolean removeMetapathContext(MetapathContext item) { + public boolean removeContext(MetapathContext item) { MetapathContext value = ObjectUtils.requireNonNull(item, "item cannot be null"); - return _metapathContexts != null && _metapathContexts.remove(value); + return _contexts != null && _contexts.remove(value); } @Override diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/BindingConstraintLoader.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/BindingConstraintLoader.java index d262919e0..5a0c2b636 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/BindingConstraintLoader.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/BindingConstraintLoader.java @@ -143,7 +143,7 @@ protected IConstraintSet parseResource(@NonNull URI resource, @NonNull Deque targetedConstraints = CollectionUtil.listOrEmpty(obj.getMetapathContexts()).stream() + List targetedConstraints = CollectionUtil.listOrEmpty(obj.getContexts()).stream() .flatMap(context -> parseContext(ObjectUtils.notNull(context), null, source) .getTargetedConstraints().stream()) .collect(Collectors.toList()); @@ -271,7 +271,7 @@ private Context parseContext( } Context context = new Context(metapaths, constraints); - List childContexts = CollectionUtil.listOrEmpty(contextObj.getMetapathContexts()).stream() + List childContexts = CollectionUtil.listOrEmpty(contextObj.getContexts()).stream() .map(childObj -> parseContext(ObjectUtils.notNull(childObj), context, source)) .collect(Collectors.toList());