Package com.example.metaschema
Class METASCHEMA
java.lang.Object
com.example.metaschema.METASCHEMA
- All Implemented Interfaces:
gov.nist.secauto.metaschema.core.model.IBoundObject
@MetaschemaAssembly(formalName="Metaschema Module",
description="A declaration of the Metaschema module.",
name="METASCHEMA",
moduleClass=MetaschemaModelModule.class,
rootName="METASCHEMA",
valueConstraints=@ValueConstraints(lets={@Let(name="all-imports",target="recurse-depth(\'for $import in ./import return doc(resolve-uri($import/@href))/METASCHEMA\')"),@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="module-top-level-version-required",formalName="Require Schema Version for Top-Level Modules",description="A top-level module, a module that is not marked as @abstract=\'yes\', must have a schema version specified.",level=WARNING,target=".[not(@abstract) or @abstract=\'no\']",test="schema-version",message="Unless marked as @abstract=\'yes\', a Metaschema module (or an imported module) should have a schema version."),@Expect(id="module-top-level-root-required",formalName="Require Root Assembly for Top-Level Modules",description="A top-level module, a module that is not marked as @abstract=\'yes\', must have at least one assembly with a root-name.",level=WARNING,target=".[not(@abstract) or @abstract=\'no\']",test="exists($all-imports/define-assembly/root-name)",message="Unless marked as @abstract=\'yes\', a Metaschema module (or an imported module) should have at least one assembly with a root-name."),@Expect(id="module-import-href-available",formalName="Import is Resolvable",description="Ensure each import has a resolvable @href.",level=ERROR,target="import",test="doc-available(resolve-uri(@href))",message="Unable to access a Metaschema module at \'{{ resolve-uri(@href) }}\'."),@Expect(id="module-import-href-is-module",formalName="Import is a Metaschema module",description="Ensure each import is a Metaschema module.",level=ERROR,target="import",test="doc(resolve-uri(@href))/METASCHEMA ! exists(.)",message="Unable the resource at \'{{ resolve-uri(@href) }}\' is not a Metaschema module."),@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=@AssemblyConstraints(index=@Index(id="module-short-name-unique",formalName="Index Module Short Names",description="Ensures that the current and all imported modules have a unique short name.",level=ERROR,target="(.|$all-imports)",name="metaschema-metadata-short-name-index",keyFields=@KeyField(target="@short-name")),unique={@IsUnique(id="module-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="module-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 METASCHEMA
extends Object
implements gov.nist.secauto.metaschema.core.model.IBoundObject
A declaration of the Metaschema module.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
In XML, an element with structured element content.static class
static class
static class
Imports a set of Metaschema modules contained in another resource. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addImport
(METASCHEMA.Import item) Add a newMETASCHEMA.Import
item to the underlying collection.boolean
Add a newMetapathNamespace
item to the underlying collection.gov.nist.secauto.metaschema.core.model.IMetaschemaData
gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine
boolean
Remove the first matchingMETASCHEMA.Import
item from the underlying collection.boolean
Remove the first matchingMetapathNamespace
item from the underlying collection.void
setAbstract
(String value) void
setDefinitions
(List<Object> value) void
setImports
(List<METASCHEMA.Import> value) void
setJsonBaseUri
(URI value) void
setNamespace
(URI value) void
void
setRemarks
(Remarks value) void
setSchemaName
(gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine value) void
setSchemaVersion
(String value) void
setShortName
(String value) toString()
-
Constructor Details
-
METASCHEMA
public METASCHEMA() -
METASCHEMA
-
-
Method Details
-
getMetaschemaData
- Specified by:
getMetaschemaData
in interfacegov.nist.secauto.metaschema.core.model.IBoundObject
-
getAbstract
-
setAbstract
-
getSchemaName
-
setSchemaName
-
getSchemaVersion
-
setSchemaVersion
-
getShortName
-
setShortName
-
getNamespace
-
setNamespace
-
getJsonBaseUri
-
setJsonBaseUri
-
getRemarks
-
setRemarks
-
getImports
-
setImports
-
addImport
Add a newMETASCHEMA.Import
item to the underlying collection.- Parameters:
item
- the item to add- Returns:
true
-
removeImport
Remove the first matchingMETASCHEMA.Import
item from the underlying collection.- Parameters:
item
- the item to remove- Returns:
true
if the item was removed orfalse
otherwise
-
getNamespaceBindings
-
setNamespaceBindings
-
addNamespaceBinding
Add a newMetapathNamespace
item to the underlying collection.- Parameters:
item
- the item to add- Returns:
true
-
removeNamespaceBinding
Remove the first matchingMetapathNamespace
item from the underlying collection.- Parameters:
item
- the item to remove- Returns:
true
if the item was removed orfalse
otherwise
-
getDefinitions
-
setDefinitions
-
toString
-