Class MetaschemaModuleConstraints

java.lang.Object
dev.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints
All Implemented Interfaces:
IBoundObject

@MetaschemaAssembly(formalName="External Module Constraints", description="Defines constraint rules to be applied to an existing set of Metaschema module-based models.", name="metaschema-module-constraints", moduleClass=MetaschemaModelModule.class, rootName="METASCHEMA-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(data(.)=(\'base64Binary\',\'dateTime\',\'dateTime-with-timezone\',\'email\',\'nonNegativeInteger\',\'positiveInteger\'))",message="Use of the type \'{ data(.) }\' is deprecated. Use \'{ $deprecated-type-map(data(.))}\' instead."))) public class MetaschemaModuleConstraints extends Object implements IBoundObject
Defines constraint rules to be applied to an existing set of Metaschema module-based models.
  • Constructor Details

    • MetaschemaModuleConstraints

      public MetaschemaModuleConstraints()
      Constructs a new dev.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints instance with no metadata.
    • MetaschemaModuleConstraints

      public MetaschemaModuleConstraints(IMetaschemaData data)
      Constructs a new dev.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints instance with the specified metadata.
      Parameters:
      data - the metaschema data, or null if none
  • Method Details

    • getMetaschemaData

      public IMetaschemaData getMetaschemaData()
      Description copied from interface: IBoundObject
      Get additional Metaschema-related information for the object (i.e., resource location).
      Specified by:
      getMetaschemaData in interface IBoundObject
      Returns:
      the Metaschema-related information
    • getName

      @NonNull public String getName()
      Get the name property.

      The name of this constraint set.

      Returns:
      the name value
    • setName

      public void setName(@NonNull String value)
      Set the name property.

      The name of this constraint set.

      Parameters:
      value - the name value to set
    • getVersion

      @NonNull public String getVersion()
      Get the version property.

      The version of this constraint set. A version string used to distinguish between multiple revisions of the same resource.

      Returns:
      the version value
    • setVersion

      public void setVersion(@NonNull String value)
      Set the version property.

      The version of this constraint set. A version string used to distinguish between multiple revisions of the same resource.

      Parameters:
      value - the version value to set
    • getImports

      @NonNull public List<MetaschemaModuleConstraints.Import> getImports()
      Get the import property.

      Declares a set of Metaschema constraints from an out-of-line resource to import, supporting composition of constraint sets.

      Returns:
      the import value
    • setImports

      public void setImports(@NonNull List<MetaschemaModuleConstraints.Import> value)
      Set the import property.

      Declares a set of Metaschema constraints from an out-of-line resource to import, supporting composition of constraint sets.

      Parameters:
      value - the import value to set
    • addImport

      public boolean addImport(MetaschemaModuleConstraints.Import item)
      Add a new MetaschemaModuleConstraints.Import item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeImport

      public boolean removeImport(MetaschemaModuleConstraints.Import item)
      Remove the first matching MetaschemaModuleConstraints.Import item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getNamespaceBindings

      @NonNull public List<MetapathNamespace> getNamespaceBindings()
      Get the metapath Namespace Declaration.

      Assigns a Metapath namespace to a prefix for use in a Metapath expression in a lexical qualified name.

      Returns:
      the namespace-binding value
    • setNamespaceBindings

      public void setNamespaceBindings(@NonNull List<MetapathNamespace> value)
      Set the metapath Namespace Declaration.

      Assigns a Metapath namespace to a prefix for use in a Metapath expression in a lexical qualified name.

      Parameters:
      value - the namespace-binding value to set
    • addNamespaceBinding

      public boolean addNamespaceBinding(MetapathNamespace item)
      Add a new MetapathNamespace item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeNamespaceBinding

      public boolean removeNamespaceBinding(MetapathNamespace item)
      Remove the first matching MetapathNamespace item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getScopes

      @NonNull public List<MetaschemaModuleConstraints.Scope> getScopes()
      Get the scope property.
      Returns:
      the scope value
    • setScopes

      public void setScopes(@NonNull List<MetaschemaModuleConstraints.Scope> value)
      Set the scope property.
      Parameters:
      value - the scope value to set
    • addScope

      public boolean addScope(MetaschemaModuleConstraints.Scope item)
      Add a new MetaschemaModuleConstraints.Scope item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeScope

      public boolean removeScope(MetaschemaModuleConstraints.Scope item)
      Remove the first matching MetaschemaModuleConstraints.Scope item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object