Package com.example.metaschema
Class MetaschemaMetaConstraints
java.lang.Object
com.example.metaschema.MetaschemaMetaConstraints
- All Implemented Interfaces:
gov.nist.secauto.metaschema.core.model.IBoundObject
@MetaschemaAssembly(formalName="External Module Constraints",
description="Defines constraint rules to be applied to an existing set of Metaschema module-based models.",
name="metaschema-meta-constraints",
moduleClass=MetaschemaModelModule.class,
rootName="metaschema-meta-constraints",
valueConstraints=@ValueConstraints(lets=@Let(name="deprecated-type-map",target="map { \'base64Binary\':\'base64\',\'dateTime\':\'date-time\',\'dateTime-with-timezone\':\'date-time-with-timezone\',\'email\':\'email-address\',\'nonNegativeInteger\':\'non-negative-integer\',\'positiveInteger\':\'positive-integer\' }"),expect=@Expect(id="metaschema-deprecated-types",formalName="Avoid Deprecated Data Type Use",description="Ensure that the data type specified is not one of the legacy Metaschema data types which have been deprecated (i.e. base64Binary, dateTime, dateTime-with-timezone, email, nonNegativeInteger, positiveInteger).",level=WARNING,target=".//matches/@datatype|.//(define-field|define-flag)/@as-type",test="not(.=(\'base64Binary\',\'dateTime\',\'dateTime-with-timezone\',\'email\',\'nonNegativeInteger\',\'positiveInteger\'))",message="Use of the type \'{ . }\' is deprecated. Use \'{ $deprecated-type-map(.)}\' instead.")),
modelConstraints=@IsUnique(id="meta-constraints-namespace-unique-entry",formalName="Require Unique Namespace Entries",description="Ensures that all declared namespace entries are unique.",level=ERROR,target="namespace-binding",keyFields={@KeyField(target="@prefix"),@KeyField(target="@uri")}) @IsUnique(id="meta-constraints-namespace-unique-prefix",formalName="Require Unique Namespace Entry Prefixes",description="Ensures that all declared namespace entries have a unique prefix.",level=ERROR,target="namespace-binding",keyFields=@KeyField(target="@prefix")))
public class MetaschemaMetaConstraints
extends Object
implements gov.nist.secauto.metaschema.core.model.IBoundObject
Defines constraint rules to be applied to an existing set of Metaschema module-based models.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classDeclares a set of Metaschema constraints from an out-of-line resource to import, supporting composition of constraint sets. -
Constructor Summary
ConstructorsConstructorDescriptionMetaschemaMetaConstraints(gov.nist.secauto.metaschema.core.model.IMetaschemaData data) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddContext(MetapathContext item) Add a newMetapathContextitem to the underlying collection.booleanAdd a newMetaschemaMetaConstraints.Importitem to the underlying collection.booleanAdd a newMetapathNamespaceitem to the underlying collection.gov.nist.secauto.metaschema.core.model.IMetaschemaDatabooleanremoveContext(MetapathContext item) Remove the first matchingMetapathContextitem from the underlying collection.booleanRemove the first matchingMetaschemaMetaConstraints.Importitem from the underlying collection.booleanRemove the first matchingMetapathNamespaceitem from the underlying collection.voidsetContexts(List<MetapathContext> value) voidvoidvoidtoString()
-
Constructor Details
-
MetaschemaMetaConstraints
public MetaschemaMetaConstraints() -
MetaschemaMetaConstraints
-
-
Method Details
-
getMetaschemaData
- Specified by:
getMetaschemaDatain interfacegov.nist.secauto.metaschema.core.model.IBoundObject
-
getImports
-
setImports
-
addImport
Add a newMetaschemaMetaConstraints.Importitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeImport
Remove the first matchingMetaschemaMetaConstraints.Importitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getNamespaceBindings
-
setNamespaceBindings
-
addNamespaceBinding
Add a newMetapathNamespaceitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeNamespaceBinding
Remove the first matchingMetapathNamespaceitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getDefinitionContext
-
setDefinitionContext
-
getContexts
-
setContexts
-
addContext
Add a newMetapathContextitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeContext
Remove the first matchingMetapathContextitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
toString
-