diff --git a/.claude/rules/metaschema-authoring.md b/.claude/rules/metaschema-authoring.md index 9f26ab8c1..e89b12bb7 100644 --- a/.claude/rules/metaschema-authoring.md +++ b/.claude/rules/metaschema-authoring.md @@ -72,8 +72,9 @@ The following packages contain binding classes derived from Metaschema modules: | Package | Source Metaschema | Bootstrap POM | |---------|------------------|---------------| -| `databind/src/main/java/gov/nist/secauto/metaschema/databind/config/binding/` | `databind/src/main/metaschema/metaschema-bindings.yaml` | `databind/pom-bootstrap.xml` | -| `metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/` | `metaschema-testing/src/main/metaschema/unit-tests.yaml` | `metaschema-testing/pom-bootstrap.xml` | +| `databind/.../config/binding/` | `databind/src/main/metaschema/metaschema-bindings.yaml` | `databind/pom-bootstrap-config.xml` | +| `databind/.../model/metaschema/binding/` | `core/metaschema/schema/metaschema/metaschema-module-metaschema.xml` | `databind/pom-bootstrap-model.xml` | +| `metaschema-testing/.../testsuite/` | `metaschema-testing/src/main/metaschema/unit-tests.yaml` | `metaschema-testing/pom-bootstrap.xml` | ### CRITICAL: Never Manually Edit Generated Binding Classes @@ -93,7 +94,7 @@ When you need to modify a generated binding class: - The Metaschema module is the authoritative source for the data model **Red flags that you're about to make a mistake:** -- Opening a file in `.../config/binding/` or `.../testsuite/` for editing +- Opening a file in `.../config/binding/`, `.../model/metaschema/binding/`, or `.../testsuite/` for editing - Adding fields, methods, or annotations directly to these classes - Copying code patterns from these files to create new bindings manually diff --git a/CLAUDE.md b/CLAUDE.md index 455033a7e..41d89a7b0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -109,20 +109,28 @@ Generated sources are placed in `target/generated-sources/` and excluded from st ### Bootstrap Binding Classes -The `metaschema-testing` module contains pre-generated binding classes that cannot be generated during the normal build due to circular dependencies (metaschema-maven-plugin → metaschema-schema-generator → metaschema-testing). +Several modules contain pre-generated binding classes that cannot be generated during the normal build due to circular dependencies. These classes must be regenerated manually when their source Metaschema modules change. -To regenerate these classes when the test suite Metaschema module changes: +| Module | Bootstrap POM | Generated Package | Source Metaschema | +|--------|--------------|-------------------|-------------------| +| metaschema-testing | `metaschema-testing/pom-bootstrap.xml` | `...model.testing.testsuite` | `unit-tests.yaml` | +| databind | `databind/pom-bootstrap-config.xml` | `...databind.config.binding` | `metaschema-bindings.yaml` | +| databind | `databind/pom-bootstrap-model.xml` | `...databind.model.metaschema.binding` | `metaschema-module-metaschema.xml` | + +To regenerate binding classes: ```bash -# Generate binding classes using bootstrap POM -mvn -f metaschema-testing/pom-bootstrap.xml generate-sources +# First ensure the project is built +mvn install -DskipTests -# Copy to source directory -cp -r metaschema-testing/target/generated-sources/metaschema/gov/nist/secauto/metaschema/model/testing/testsuite/* \ - metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ +# Generate binding classes using bootstrap POM (choose the appropriate module) +# Each bootstrap POM generates classes directly into src/main/java +mvn -f metaschema-testing/pom-bootstrap.xml generate-sources +mvn -f databind/pom-bootstrap-config.xml generate-sources +mvn -f databind/pom-bootstrap-model.xml generate-sources ``` -See `metaschema-testing/README.md` for details. +See the README.md files in each module for detailed instructions. ### Metaschema Module Authoring diff --git a/PRDs/20251224-codegen-quality/implementation-plan.md b/PRDs/20251224-codegen-quality/implementation-plan.md index e14915dbe..930f0df8e 100644 --- a/PRDs/20251224-codegen-quality/implementation-plan.md +++ b/PRDs/20251224-codegen-quality/implementation-plan.md @@ -181,74 +181,71 @@ This PR extends the binding configuration to support overriding default collecti --- -## PR 3: Databind Bootstrap and Regeneration +## PR 3: Databind Bootstrap and Regeneration ✅ | Attribute | Value | |-----------|-------| -| **Files Changed** | ~35 | +| **Files Changed** | ~55 | | **Risk Level** | Medium | | **Dependencies** | PR 1, PR 2 | | **Target Branch** | develop | -| **Status** | Pending | -| **Pull Request** | | +| **Status** | Completed | +| **Pull Request** | (combined with PR 2 in #584) | This PR creates the databind bootstrap infrastructure and regenerates the databind binding classes. -### Files to Create +### Files Created | File | Changes | |------|---------| -| `databind/pom-bootstrap.xml` | Standalone POM for binding class regeneration | -| `databind/README.md` | Document bootstrap process | +| `databind/pom-bootstrap-config.xml` | Bootstrap POM for config binding classes | +| `databind/pom-bootstrap-model.xml` | Bootstrap POM for model binding classes | +| `databind/README.md` | Documents bootstrap process for both binding class sets | +| `databind/src/main/metaschema-bindings/metaschema-model-bindings.xml` | Binding configuration for model classes | -### Files to Update +### Files Updated | File | Changes | |------|---------| -| `CLAUDE.md` | Reference databind bootstrap in Bootstrap Binding Classes section | +| `CLAUDE.md` | Updated Bootstrap Binding Classes section with databind POMs | +| `databind/src/main/metaschema-bindings/metaschema-config-bindings.xml` | Renamed from `metaschema-bindings.xml` | -### Files to Regenerate +### Files Regenerated | File | Changes | |------|---------| -| `databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/*.java` | Regenerated binding classes | - -### Implementation Approach +| `databind/src/main/java/.../config/binding/*.java` | Regenerated config binding classes | +| `databind/src/main/java/.../model/metaschema/binding/*.java` | Regenerated model binding classes (~40 files) | -1. **Create `pom-bootstrap.xml`** - - Copy structure from `metaschema-testing/pom-bootstrap.xml` - - Configure metaschema-maven-plugin for databind module - - Reference `databind-metaschema/src/main/metaschema-bindings/metaschema-metaschema-bindings.xml` - - Set output to `target/generated-sources/metaschema` +### Implementation Notes -2. **Create README.md** - - Document the bootstrap process - - Explain when regeneration is needed - - Provide step-by-step commands +1. **Two separate bootstrap POMs created** + - `pom-bootstrap-config.xml` - for config binding classes from `metaschema-bindings.yaml` + - `pom-bootstrap-model.xml` - for model binding classes from `metaschema-module-metaschema.xml` -3. **Update CLAUDE.md** - - Add databind to Bootstrap Binding Classes section - - Reference the README for detailed instructions +2. **Binding configuration for model classes** + - Created `metaschema-model-bindings.xml` to customize generated classes + - Adds interface implementations (e.g., `IModelConstraintsBase`, `IValueConstraintsBase`) + - Renames `group-as` to `GroupingAs` to avoid Java keyword conflicts -4. **Regenerate databind binding classes** - - Run bootstrap generation: `mvn -f databind/pom-bootstrap.xml generate-sources` - - Copy generated files to source directory - - Compare with existing classes to identify any API differences - - Verify custom interface implementations are preserved (via binding configuration) +3. **README documents both bootstrap processes** + - Separate sections for config and model binding classes + - Includes regeneration commands and explains when to regenerate ### Acceptance Criteria -- [ ] `pom-bootstrap.xml` successfully generates binding classes -- [ ] README documents the complete regeneration process -- [ ] CLAUDE.md references databind bootstrap documentation -- [ ] All databind binding classes regenerated -- [ ] Custom interface implementations preserved via binding configuration -- [ ] Base class extensions preserved via binding configuration -- [ ] Generated Javadoc is complete and properly formatted -- [ ] Null-safety annotations present -- [ ] `mvn checkstyle:check` passes on regenerated files -- [ ] All tests pass: `mvn test` -- [ ] Build succeeds: `mvn clean install -PCI -Prelease` +- [x] `pom-bootstrap-config.xml` successfully generates config binding classes +- [x] `pom-bootstrap-model.xml` successfully generates model binding classes +- [x] README documents the complete regeneration process +- [x] CLAUDE.md references databind bootstrap documentation +- [x] All databind binding classes regenerated +- [x] Custom interface implementations preserved via binding configuration +- [x] Base class extensions preserved via binding configuration +- [x] Generated Javadoc is complete and properly formatted +- [x] Null-safety annotations present +- [x] `mvn checkstyle:check` passes on regenerated files +- [x] All tests pass: `mvn test` +- [x] Build succeeds: `mvn clean install -PCI -Prelease` --- @@ -314,12 +311,12 @@ Currently, when a required field/flag is missing from input data, the generated | PR | Description | Files | Risk | Dependencies | Status | |----|-------------|-------|------|--------------|--------| | 1 | Code generator improvements + metaschema-testing regeneration | 20 | Low | None | ✅ Completed ([#577](https://github.com/metaschema-framework/metaschema-java/pull/577)) | -| 2 | Collection class override support | ~15 | Low | PR 1 | ✅ Completed | -| 3 | Databind bootstrap setup + regeneration | ~35 | Medium | PR 1, PR 2 | Pending | +| 2 | Collection class override support | ~15 | Low | PR 1 | ✅ Completed ([#584](https://github.com/metaschema-framework/metaschema-java/pull/584)) | +| 3 | Databind bootstrap setup + regeneration | ~55 | Medium | PR 1, PR 2 | ✅ Completed (combined with PR 2) | | 4 | Parser required field validation | ~10 | Medium | PR 1 | Pending | -**Total Estimated PRs**: 4 -**Total Estimated Files**: ~80 +**Total Estimated PRs**: 4 (3 actual - PR 2 and PR 3 combined) +**Total Estimated Files**: ~100 --- diff --git a/core/metaschema b/core/metaschema index 868f1eff2..a79f52693 160000 --- a/core/metaschema +++ b/core/metaschema @@ -1 +1 @@ -Subproject commit 868f1eff2b50fd9110f7bb381ec57218a87038f9 +Subproject commit a79f52693d312fcaff8d639a67cae3689c6e8471 diff --git a/databind-metaschema/pom.xml b/databind-metaschema/pom.xml index bc0edb3e1..6d09f7dcc 100644 --- a/databind-metaschema/pom.xml +++ b/databind-metaschema/pom.xml @@ -149,30 +149,6 @@ metaschema-maven-plugin ${project.version} - - metaschema-codegen - generate-sources - - generate-sources - - - - ${project.build.directory}/generated-resources/metaschema-sources - - ${project.build.directory}/generated-sources/metaschema - - - ${project.basedir}/src/main/metaschema-bindings/metaschema-metaschema-bindings.xml - - - metaschema-module-metaschema.xml - - - - ${project.build.directory}/generated-resources/metaschema-sources/metaschema-module-constraints.xml - - - metaschema-xml-schema generate-sources diff --git a/databind-metaschema/src/main/metaschema-bindings/metaschema-metaschema-bindings.xml b/databind-metaschema/src/main/metaschema-bindings/metaschema-metaschema-bindings.xml deleted file mode 100644 index e3fa44174..000000000 --- a/databind-metaschema/src/main/metaschema-bindings/metaschema-metaschema-bindings.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - com.example.metaschema - - - - - - GroupingAs - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IModelConstraintsBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.impl.AbstractAllowedValue - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IValueTargetedConstraintsBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IValueConstraintsBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase - - - - diff --git a/databind-metaschema/src/main/metaschema-bindings/metaschema-model-bindings.xml b/databind-metaschema/src/main/metaschema-bindings/metaschema-model-bindings.xml deleted file mode 100644 index 16fe7a56d..000000000 --- a/databind-metaschema/src/main/metaschema-bindings/metaschema-model-bindings.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.binding - - - - - - - GroupingAs - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IModelConstraintsBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IValueTargetedConstraintsBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IValueConstraintsBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase - - - - - - gov.nist.secauto.metaschema.databind.model.metaschema.impl.AbstractAllowedValue - - - - diff --git a/databind/README.md b/databind/README.md new file mode 100644 index 000000000..8cf57a89a --- /dev/null +++ b/databind/README.md @@ -0,0 +1,78 @@ +# Metaschema Java Data Binding and Code Generation + +This module provides the data binding framework and code generation capabilities for Metaschema. + +## Bootstrap Binding Classes + +This module contains two sets of pre-generated binding classes that are checked into source control due to circular dependency constraints with the `metaschema-maven-plugin`. + +**Prerequisites:** The model binding classes require the `core/metaschema` git submodule. Initialize submodules before regenerating: + +```bash +git submodule update --init --recursive +``` + +### Config Binding Classes + +Package: `gov.nist.secauto.metaschema.databind.config.binding` + +These classes are generated from the binding configuration schema (`src/main/metaschema/metaschema-bindings.yaml`) and are used to parse binding configuration files. + +**Regeneration:** + +```bash +# From the project root - first ensure the project is built +mvn install -DskipTests + +# Generate binding classes +mvn -f databind/pom-bootstrap-config.xml generate-sources + +# Verify the build still passes +mvn install -PCI -Prelease +``` + +### Model Binding Classes + +Package: `gov.nist.secauto.metaschema.databind.model.metaschema.binding` + +These classes are generated from the core Metaschema module (`core/metaschema/schema/metaschema/metaschema-module-metaschema.xml`) and are used for parsing Metaschema module definitions. + +**Regeneration:** + +```bash +# From the project root - first ensure the project is built +mvn install -DskipTests + +# Generate binding classes +mvn -f databind/pom-bootstrap-model.xml generate-sources + +# Verify the build still passes +mvn install -PCI -Prelease +``` + +## Binding Configurations + +### Config Bindings + +**File:** `src/main/metaschema-bindings/metaschema-config-bindings.xml` + +Customizes the generated config binding classes. + +### Model Bindings + +**File:** `src/main/metaschema-bindings/metaschema-model-bindings.xml` + +Customizes the generated model binding classes: + +- Maps the Metaschema namespace to `gov.nist.secauto.metaschema.databind.model.metaschema.binding` +- Renames `group-as` to `GroupingAs` (avoids Java keyword conflict) +- Adds interface implementations to constraint classes (e.g., `IModelConstraintsBase`) +- Adds interface implementations to inline definitions for typed collections + +## Related Bootstrap POMs + +| Bootstrap POM | Generated Package | Source Metaschema | +|--------------|-------------------|-------------------| +| `databind/pom-bootstrap-config.xml` | `...databind.config.binding` | `metaschema-bindings.yaml` | +| `databind/pom-bootstrap-model.xml` | `...databind.model.metaschema.binding` | `metaschema-module-metaschema.xml` | +| `metaschema-testing/pom-bootstrap.xml` | `...model.testing.testsuite` | `unit-tests.yaml` | diff --git a/databind/pom-bootstrap.xml b/databind/pom-bootstrap-config.xml similarity index 96% rename from databind/pom-bootstrap.xml rename to databind/pom-bootstrap-config.xml index 0e9bc6795..fc2776aa2 100644 --- a/databind/pom-bootstrap.xml +++ b/databind/pom-bootstrap-config.xml @@ -3,7 +3,7 @@ This POM is used to regenerate the metaschema-bindings binding classes. It is NOT part of the normal build due to circular dependencies. - Usage: mvn -f databind/pom-bootstrap.xml generate-sources + Usage: mvn -f databind/pom-bootstrap-config.xml generate-sources This will: 1. Delete existing generated classes in the config/binding package @@ -76,7 +76,7 @@ ${project.basedir}/src/main/metaschema ${project.basedir}/src/main/java - ${project.basedir}/src/main/metaschema-bindings/metaschema-binding-bindings.xml + ${project.basedir}/src/main/metaschema-bindings/metaschema-config-bindings.xml metaschema-bindings.yaml diff --git a/databind-metaschema/pom-bootstrap.xml b/databind/pom-bootstrap-model.xml similarity index 72% rename from databind-metaschema/pom-bootstrap.xml rename to databind/pom-bootstrap-model.xml index dc4e2c0d6..747afde54 100644 --- a/databind-metaschema/pom-bootstrap.xml +++ b/databind/pom-bootstrap-model.xml @@ -3,11 +3,11 @@ This POM is used to regenerate the Metaschema model binding classes. It is NOT part of the normal build due to circular dependencies. - Usage: mvn -f databind-metaschema/pom-bootstrap.xml generate-sources + Usage: mvn -f databind/pom-bootstrap-model.xml generate-sources This will: - 1. Delete existing generated classes in databind's model/metaschema/binding package - 2. Generate new binding classes directly into databind/src/main/java + 1. Delete existing generated classes in the model/metaschema/binding package + 2. Generate new binding classes directly into src/main/java IMPORTANT: Build the project first to ensure the code generator is up to date: mvn install -DskipTests @@ -19,28 +19,25 @@ metaschema-framework 3.0.0-SNAPSHOT - metaschema-databind-modules-bootstrap + metaschema-databind-model-bootstrap pom - Metaschema Modules - Binding Class Generator + Metaschema Databind - Model Binding Class Generator Standalone POM for regenerating Metaschema model binding classes. - - ${project.build.directory}/generated-sources/metaschema - ${project.basedir}/../databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding + ${project.basedir}/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding ${project.build.directory}/metaschema ${project.basedir}/../core/metaschema/schema/metaschema - org.apache.maven.plugins maven-clean-plugin - clean-stale-file + clean-generated-sources initialize clean @@ -48,7 +45,13 @@ true - + + ${binding.package.dir} + + **/*.java + + + ${stale.file.dir} @@ -60,7 +63,6 @@ - ${project.groupId} metaschema-maven-plugin @@ -74,7 +76,7 @@ ${metaschema.sources.dir} - ${output.dir} + ${project.basedir}/src/main/java ${project.basedir}/src/main/metaschema-bindings/metaschema-model-bindings.xml diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/codegen/config/DefaultBindingConfiguration.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/codegen/config/DefaultBindingConfiguration.java index 2f8b06880..767198b5b 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/codegen/config/DefaultBindingConfiguration.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/codegen/config/DefaultBindingConfiguration.java @@ -9,6 +9,7 @@ import gov.nist.secauto.metaschema.core.model.IFieldDefinition; import gov.nist.secauto.metaschema.core.model.IModelDefinition; import gov.nist.secauto.metaschema.core.model.IModule; +import gov.nist.secauto.metaschema.core.model.INamedInstance; import gov.nist.secauto.metaschema.core.util.CollectionUtil; import gov.nist.secauto.metaschema.core.util.ObjectUtils; import gov.nist.secauto.metaschema.databind.IBindingContext; @@ -47,6 +48,10 @@ public String getPackageNameForModule(IModule module) { /** * Retrieve the binding configuration for the provided {@code definition}. + *

+ * This method first checks for a binding by the definition's name. If not found + * and the definition is inline, it also checks for a binding by the + * definition's path (using "/" separated ancestor names). * * @param definition * the definition to get the config for @@ -65,10 +70,22 @@ public IDefinitionBindingConfiguration getBindingConfigurationForDefinition( if (metaschemaConfig != null) { switch (definition.getModelType()) { case ASSEMBLY: + // First try by name retval = metaschemaConfig.getAssemblyDefinitionBindingConfig(definitionName); + // If not found and inline, try by path + if (retval == null && definition.isInline()) { + String path = computeDefinitionPath(definition); + retval = metaschemaConfig.getAssemblyDefinitionBindingConfig(path); + } break; case FIELD: + // First try by name retval = metaschemaConfig.getFieldDefinitionBindingConfig(definitionName); + // If not found and inline, try by path + if (retval == null && definition.isInline()) { + String path = computeDefinitionPath(definition); + retval = metaschemaConfig.getFieldDefinitionBindingConfig(path); + } break; default: throw new UnsupportedOperationException( @@ -78,6 +95,41 @@ public IDefinitionBindingConfiguration getBindingConfigurationForDefinition( return retval; } + /** + * Compute the path for an inline definition. + *

+ * The path is constructed by walking up the definition hierarchy and + * concatenating ancestor definition names with "/" separators. For example, an + * inline assembly "assembly" within "scope" within + * "metaschema-module-constraints" would have path "scope/assembly". + * + * @param definition + * the definition to compute the path for + * @return the computed path, or just the definition name if not inline + */ + @NonNull + private static String computeDefinitionPath(@NonNull IModelDefinition definition) { + StringBuilder path = new StringBuilder(); + IModelDefinition current = definition; + + while (current != null && current.isInline()) { + if (path.length() > 0) { + path.insert(0, "/"); + } + path.insert(0, current.getName()); + + // Walk up to the parent definition + INamedInstance inlineInstance = current.getInlineInstance(); + if (inlineInstance != null) { + current = inlineInstance.getContainingDefinition(); + } else { + break; + } + } + + return ObjectUtils.notNull(path.toString()); + } + @Override public String getQualifiedBaseClassName(IModelDefinition definition) { IDefinitionBindingConfiguration config = getBindingConfigurationForDefinition(definition); @@ -328,13 +380,17 @@ private void processMetaschemaBindingConfig(URL configResource, MetaschemaBindin if (assemblyBindings != null) { for (MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding assemblyBinding : assemblyBindings) { String name = assemblyBinding.getName(); - if (name != null) { - IDefinitionBindingConfiguration config = metaschemaConfig.getAssemblyDefinitionBindingConfig(name); + String target = assemblyBinding.getTarget(); + + // Determine the lookup key - use name if provided, otherwise use target + String lookupKey = name != null ? name : target; + if (lookupKey != null) { + IDefinitionBindingConfiguration config = metaschemaConfig.getAssemblyDefinitionBindingConfig(lookupKey); config = processDefinitionBindingConfiguration(config, assemblyBinding.getJava()); - metaschemaConfig.addAssemblyDefinitionBindingConfig(name, config); + metaschemaConfig.addAssemblyDefinitionBindingConfig(lookupKey, config); // Process property bindings for this assembly - processAssemblyPropertyBindings(metaschemaConfig, name, assemblyBinding.getPropertyBindings()); + processAssemblyPropertyBindings(metaschemaConfig, lookupKey, assemblyBinding.getPropertyBindings()); // Process choice group bindings for this assembly processChoiceGroupBindings(config, assemblyBinding.getChoiceGroupBindings()); @@ -347,13 +403,17 @@ private void processMetaschemaBindingConfig(URL configResource, MetaschemaBindin if (fieldBindings != null) { for (MetaschemaBindings.MetaschemaBinding.DefineFieldBinding fieldBinding : fieldBindings) { String name = fieldBinding.getName(); - if (name != null) { - IDefinitionBindingConfiguration config = metaschemaConfig.getFieldDefinitionBindingConfig(name); + String target = fieldBinding.getTarget(); + + // Determine the lookup key - use name if provided, otherwise use target + String lookupKey = name != null ? name : target; + if (lookupKey != null) { + IDefinitionBindingConfiguration config = metaschemaConfig.getFieldDefinitionBindingConfig(lookupKey); config = processDefinitionBindingConfiguration(config, fieldBinding.getJava()); - metaschemaConfig.addFieldDefinitionBindingConfig(name, config); + metaschemaConfig.addFieldDefinitionBindingConfig(lookupKey, config); // Process property bindings for this field - processFieldPropertyBindings(metaschemaConfig, name, fieldBinding.getPropertyBindings()); + processFieldPropertyBindings(metaschemaConfig, lookupKey, fieldBinding.getPropertyBindings()); } } } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/codegen/typeinfo/ChoiceGroupTypeInfoImpl.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/codegen/typeinfo/ChoiceGroupTypeInfoImpl.java index 12a844612..a8b2b8974 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/codegen/typeinfo/ChoiceGroupTypeInfoImpl.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/codegen/typeinfo/ChoiceGroupTypeInfoImpl.java @@ -8,6 +8,7 @@ import com.squareup.javapoet.AnnotationSpec; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.FieldSpec; +import com.squareup.javapoet.MethodSpec; import com.squareup.javapoet.ParameterizedTypeName; import com.squareup.javapoet.TypeName; import com.squareup.javapoet.TypeSpec; @@ -26,6 +27,9 @@ import gov.nist.secauto.metaschema.databind.codegen.typeinfo.def.IAssemblyDefinitionTypeInfo; import gov.nist.secauto.metaschema.databind.model.annotations.BoundChoiceGroup; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; + import java.util.Collection; import java.util.LinkedHashMap; import java.util.LinkedHashSet; @@ -34,8 +38,6 @@ import java.util.Map; import java.util.Set; -import edu.umd.cs.findbugs.annotations.NonNull; - public class ChoiceGroupTypeInfoImpl extends AbstractModelInstanceTypeInfo implements IChoiceGroupTypeInfo { @@ -177,4 +179,81 @@ public Set buildBindingAnnotation( return retval; } + /** + * Get the binding configuration for this choice group, if one exists. + * + * @return the choice group binding configuration, or {@code null} if not + * configured + */ + @Nullable + private IChoiceGroupBindingConfiguration getChoiceGroupBindingConfiguration() { + IChoiceGroupInstance instance = getInstance(); + IAssemblyDefinition parent = instance.getContainingDefinition(); + ITypeResolver resolver = getParentTypeInfo().getTypeResolver(); + IBindingConfiguration bindingConfig = resolver.getBindingConfiguration(); + IDefinitionBindingConfiguration defConfig = bindingConfig.getBindingConfigurationForDefinition(parent); + if (defConfig != null) { + return defConfig.getChoiceGroupBindings().get(instance.getGroupAsName()); + } + return null; + } + + @Override + public void buildGetterJavadoc(@NonNull MethodSpec.Builder builder) { + IChoiceGroupInstance instance = getInstance(); + String groupAsName = instance.getGroupAsName(); + + builder.addJavadoc("Get the {@code $L} choice group items.\n", groupAsName); + + // Add item type information if configured + IChoiceGroupBindingConfiguration choiceConfig = getChoiceGroupBindingConfiguration(); + String itemTypeName = choiceConfig == null ? null : choiceConfig.getItemTypeName(); + if (itemTypeName != null) { + builder.addJavadoc("\n"); + builder.addJavadoc("

\n"); + String simpleTypeName = itemTypeName.substring(itemTypeName.lastIndexOf('.') + 1); + if (choiceConfig.isUseWildcard()) { + builder.addJavadoc("Items in this collection implement {@link $L}.\n", simpleTypeName); + } else { + builder.addJavadoc("Items in this collection are of type {@link $L}.\n", simpleTypeName); + } + } + + builder.addJavadoc("\n"); + builder.addJavadoc("@return the $L items\n", groupAsName); + } + + /** + * {@inheritDoc} + *

+ * Generates Javadoc for choice group setter methods, including documentation of + * the configured item type (if binding configuration specifies one) and whether + * wildcard types are required. + */ + @Override + public void buildSetterJavadoc(@NonNull MethodSpec.Builder builder, @NonNull String paramName) { + IChoiceGroupInstance instance = getInstance(); + String groupAsName = instance.getGroupAsName(); + + builder.addJavadoc("Set the {@code $L} choice group items.\n", groupAsName); + + // Add item type information if configured + IChoiceGroupBindingConfiguration choiceConfig = getChoiceGroupBindingConfiguration(); + String itemTypeName = choiceConfig == null ? null : choiceConfig.getItemTypeName(); + if (itemTypeName != null) { + builder.addJavadoc("\n"); + builder.addJavadoc("

\n"); + String simpleTypeName = itemTypeName.substring(itemTypeName.lastIndexOf('.') + 1); + if (choiceConfig.isUseWildcard()) { + builder.addJavadoc("Items in this collection must implement {@link $L}.\n", simpleTypeName); + } else { + builder.addJavadoc("Items in this collection must be of type {@link $L}.\n", simpleTypeName); + } + } + + builder.addJavadoc("\n"); + builder.addJavadoc("@param $L\n", paramName); + builder.addJavadoc(" the $L items to set\n", groupAsName); + } + } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/config/binding/MetaschemaBindings.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/config/binding/MetaschemaBindings.java index 96c82fa7a..cac67e422 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/config/binding/MetaschemaBindings.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/config/binding/MetaschemaBindings.java @@ -10,6 +10,7 @@ import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.BooleanAdapter; +import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.UriAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.UriReferenceAdapter; @@ -647,16 +648,26 @@ public static class DefineAssemblyBinding implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * The name of the metaschema assembly. + * The name of the metaschema assembly. Used for top-level definitions. */ @BoundFlag( formalName = "Name", - description = "The name of the metaschema assembly.", + description = "The name of the metaschema assembly. Used for top-level definitions.", name = "name", - required = true, typeAdapter = TokenAdapter.class) private String _name; + /** + * A Metapath expression targeting the assembly definition(s) within the + * metaschema. Used for inline definitions. + */ + @BoundFlag( + formalName = "Target", + description = "A Metapath expression targeting the assembly definition(s) within the metaschema. Used for inline definitions.", + name = "target", + typeAdapter = StringAdapter.class) + private String _target; + /** * Field and assembly binding configurations for Java bound classes. */ @@ -718,11 +729,11 @@ public IMetaschemaData getMetaschemaData() { * Get the name. * *

- * The name of the metaschema assembly. + * The name of the metaschema assembly. Used for top-level definitions. * - * @return the name value + * @return the name value, or {@code null} if not set */ - @NonNull + @Nullable public String getName() { return _name; } @@ -731,15 +742,43 @@ public String getName() { * Set the name. * *

- * The name of the metaschema assembly. + * The name of the metaschema assembly. Used for top-level definitions. * * @param value * the name value to set */ - public void setName(@NonNull String value) { + public void setName(@Nullable String value) { _name = value; } + /** + * Get the target. + * + *

+ * A Metapath expression targeting the assembly definition(s) within the + * metaschema. Used for inline definitions. + * + * @return the target value, or {@code null} if not set + */ + @Nullable + public String getTarget() { + return _target; + } + + /** + * Set the target. + * + *

+ * A Metapath expression targeting the assembly definition(s) within the + * metaschema. Used for inline definitions. + * + * @param value + * the target value to set + */ + public void setTarget(@Nullable String value) { + _target = value; + } + /** * Get the java Object Definition Binding. * @@ -1531,16 +1570,26 @@ public static class DefineFieldBinding implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * The name of the metaschema field. + * The name of the metaschema field. Used for top-level definitions. */ @BoundFlag( formalName = "Name", - description = "The name of the metaschema field.", + description = "The name of the metaschema field. Used for top-level definitions.", name = "name", - required = true, typeAdapter = TokenAdapter.class) private String _name; + /** + * A Metapath expression targeting the field definition(s) within the + * metaschema. Used for inline definitions. + */ + @BoundFlag( + formalName = "Target", + description = "A Metapath expression targeting the field definition(s) within the metaschema. Used for inline definitions.", + name = "target", + typeAdapter = StringAdapter.class) + private String _target; + /** * Field and assembly binding configurations for Java bound classes. */ @@ -1591,11 +1640,11 @@ public IMetaschemaData getMetaschemaData() { * Get the name. * *

- * The name of the metaschema field. + * The name of the metaschema field. Used for top-level definitions. * - * @return the name value + * @return the name value, or {@code null} if not set */ - @NonNull + @Nullable public String getName() { return _name; } @@ -1604,15 +1653,43 @@ public String getName() { * Set the name. * *

- * The name of the metaschema field. + * The name of the metaschema field. Used for top-level definitions. * * @param value * the name value to set */ - public void setName(@NonNull String value) { + public void setName(@Nullable String value) { _name = value; } + /** + * Get the target. + * + *

+ * A Metapath expression targeting the field definition(s) within the + * metaschema. Used for inline definitions. + * + * @return the target value, or {@code null} if not set + */ + @Nullable + public String getTarget() { + return _target; + } + + /** + * Set the target. + * + *

+ * A Metapath expression targeting the field definition(s) within the + * metaschema. Used for inline definitions. + * + * @param value + * the target value to set + */ + public void setTarget(@Nullable String value) { + _target = value; + } + /** * Get the java Object Definition Binding. * diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IModelConstraintsBase.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IModelConstraintsBase.java index d7ca3fe18..7b7416a0d 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IModelConstraintsBase.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IModelConstraintsBase.java @@ -7,6 +7,10 @@ import java.util.List; +/** + * Provides a common interface for model (assembly/field) constraint binding + * objects. + */ public interface IModelConstraintsBase extends IValueConstraintsBase { @Override List getRules(); diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IValueConstraintsBase.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IValueConstraintsBase.java index a0140f472..798264a8f 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IValueConstraintsBase.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IValueConstraintsBase.java @@ -6,12 +6,35 @@ package gov.nist.secauto.metaschema.databind.model.metaschema; import gov.nist.secauto.metaschema.core.model.IBoundObject; +import gov.nist.secauto.metaschema.core.util.CollectionUtil; import gov.nist.secauto.metaschema.databind.model.metaschema.binding.ConstraintLetExpression; import java.util.List; +import edu.umd.cs.findbugs.annotations.NonNull; + +/** + * Provides a common interface for value constraint binding objects. + */ public interface IValueConstraintsBase extends IBoundObject { - List getLets(); + /** + * Get the let expressions defined for this constraint set. + * + *

+ * The default implementation returns an empty list. Implementations with let + * expressions should override this method. + * + * @return the list of let expressions, or an empty list if none are defined + */ + @NonNull + default List getLets() { + return CollectionUtil.emptyList(); + } + /** + * Get the constraint rules defined for this constraint set. + * + * @return the list of constraint rules + */ List getRules(); } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IValueTargetedConstraintsBase.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IValueTargetedConstraintsBase.java index 0c23683c2..251608a95 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IValueTargetedConstraintsBase.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/IValueTargetedConstraintsBase.java @@ -5,14 +5,20 @@ package gov.nist.secauto.metaschema.databind.model.metaschema; -import gov.nist.secauto.metaschema.databind.model.metaschema.binding.ConstraintLetExpression; - import java.util.List; +/** + * Provides a common interface for targeted value constraint binding objects. + */ public interface IValueTargetedConstraintsBase extends IValueConstraintsBase { - @Override - List getLets(); - + /** + * {@inheritDoc} + *

+ * Returns the targeted constraint rules that apply to values matching the + * target expression. + * + * @return the list of targeted constraint rules + */ @Override List getRules(); } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Any.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Any.java index 963e752cb..f77f6ff4c 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Any.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Any.java @@ -2,19 +2,17 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; - import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.ShortClassName", - "PMD.FieldNamingConventions" }) @MetaschemaAssembly( formalName = "Any Additional Content", name = "any", @@ -22,10 +20,23 @@ public class Any implements IBoundObject { private final IMetaschemaData __metaschemaData; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.Any} + * instance with no metadata. + */ public Any() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.Any} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Any(IMetaschemaData data) { this.__metaschemaData = data; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyConstraints.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyConstraints.java index e7736842d..89669e91e 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyConstraints.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyConstraints.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.core.model.JsonGroupAsBehavior; import gov.nist.secauto.metaschema.core.util.ObjectUtils; @@ -15,22 +19,15 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.metaschema.IModelConstraintsBase; import gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.ExcessivePublicCount", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( name = "assembly-constraints", moduleClass = MetaschemaModelModule.class) -public class AssemblyConstraints implements IModelConstraintsBase { +public class AssemblyConstraints implements IBoundObject, IModelConstraintsBase { private final IMetaschemaData __metaschemaData; @BoundAssembly( @@ -43,6 +40,7 @@ public class AssemblyConstraints implements IModelConstraintsBase { @BoundChoiceGroup( minOccurs = 1, maxOccurs = -1, + groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST), assemblies = { @BoundGroupedAssembly(formalName = "Allowed Values Constraint", useName = "allowed-values", binding = TargetedAllowedValuesConstraint.class), @@ -57,15 +55,29 @@ public class AssemblyConstraints implements IModelConstraintsBase { @BoundGroupedAssembly(formalName = "Targeted Index Constraint", useName = "index", binding = TargetedIndexConstraint.class), @BoundGroupedAssembly(formalName = "Targeted Cardinality Constraint", useName = "has-cardinality", - binding = TargetedHasCardinalityConstraint.class) - }, - groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST)) + binding = TargetedHasCardinalityConstraint.class), + @BoundGroupedAssembly(formalName = "Report Condition Constraint", useName = "report", + binding = TargetedReportConstraint.class) + }) private List _rules; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyConstraints} + * instance with no metadata. + */ public AssemblyConstraints() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyConstraints} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public AssemblyConstraints(IMetaschemaData data) { this.__metaschemaData = data; } @@ -75,12 +87,26 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Let Expression. + * + * @return the let value + */ + @NonNull public List getLets() { + if (_lets == null) { + _lets = new LinkedList<>(); + } return _lets; } - public void setLets(List value) { + /** + * Set the constraint Let Expression. + * + * @param value + * the let value to set + */ + public void setLets(@NonNull List value) { _lets = value; } @@ -112,12 +138,32 @@ public boolean removeLet(ConstraintLetExpression item) { return _lets != null && _lets.remove(value); } - @Override + /** + * Get the {@code rules} choice group items. + * + *

+ * Items in this collection implement {@link ITargetedConstraintBase}. + * + * @return the rules items + */ + @NonNull public List getRules() { + if (_rules == null) { + _rules = new LinkedList<>(); + } return _rules; } - public void setRules(List value) { + /** + * Set the {@code rules} choice group items. + * + *

+ * Items in this collection must implement {@link ITargetedConstraintBase}. + * + * @param value + * the rules items to set + */ + public void setRules(@NonNull List value) { _rules = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyModel.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyModel.java index bfe2c0596..84ff85bf0 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyModel.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyModel.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.NonNegativeIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.PositiveIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; @@ -27,20 +31,12 @@ import gov.nist.secauto.metaschema.databind.model.annotations.Matches; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.math.BigInteger; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.CouplingBetweenObjects", - "PMD.DataClass", - "PMD.ExcessivePublicCount", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( name = "assembly-model", moduleClass = MetaschemaModelModule.class) @@ -49,27 +45,19 @@ public class AssemblyModel implements IBoundObject { @BoundChoiceGroup( maxOccurs = -1, + groupAs = @GroupAs(name = "instances", inJson = JsonGroupAsBehavior.LIST), assemblies = { - @BoundGroupedAssembly(formalName = "Assembly Reference", - useName = "assembly", - discriminatorValue = "assembly-ref", - binding = AssemblyReference.class), - @BoundGroupedAssembly(formalName = "Inline Assembly Definition", - useName = "define-assembly", - discriminatorValue = "assembly", - binding = InlineDefineAssembly.class), - @BoundGroupedAssembly(formalName = "Field Reference", - useName = "field", - discriminatorValue = "field-ref", + @BoundGroupedAssembly(formalName = "Assembly Reference", useName = "assembly", + discriminatorValue = "assembly-ref", binding = AssemblyReference.class), + @BoundGroupedAssembly(formalName = "Inline Assembly Definition", useName = "define-assembly", + discriminatorValue = "assembly", binding = InlineDefineAssembly.class), + @BoundGroupedAssembly(formalName = "Field Reference", useName = "field", discriminatorValue = "field-ref", binding = FieldReference.class), - @BoundGroupedAssembly(formalName = "Inline Field Definition", - useName = "define-field", - discriminatorValue = "field", - binding = InlineDefineField.class), + @BoundGroupedAssembly(formalName = "Inline Field Definition", useName = "define-field", + discriminatorValue = "field", binding = InlineDefineField.class), @BoundGroupedAssembly(formalName = "Choice", useName = "choice", binding = Choice.class), @BoundGroupedAssembly(formalName = "Choice Grouping", useName = "choice-group", binding = ChoiceGroup.class) - }, - groupAs = @GroupAs(name = "instances", inJson = JsonGroupAsBehavior.LIST)) + }) private List _instances; @BoundAssembly( @@ -77,10 +65,23 @@ public class AssemblyModel implements IBoundObject { useName = "any") private Any _any; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel} + * instance with no metadata. + */ public AssemblyModel() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public AssemblyModel(IMetaschemaData data) { this.__metaschemaData = data; } @@ -90,19 +91,46 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the {@code instances} choice group items. + * + * @return the instances items + */ + @NonNull public List getInstances() { + if (_instances == null) { + _instances = new LinkedList<>(); + } return _instances; } - public void setInstances(List value) { + /** + * Set the {@code instances} choice group items. + * + * @param value + * the instances items to set + */ + public void setInstances(@NonNull List value) { _instances = value; } + /** + * Get the any Additional Content. + * + * @return the any value, or {@code null} if not set + */ + @Nullable public Any getAny() { return _any; } - public void setAny(Any value) { + /** + * Set the any Additional Content. + * + * @param value + * the any value to set + */ + public void setAny(@Nullable Any value) { _any = value; } @@ -121,25 +149,17 @@ public static class Choice implements IBoundObject { @BoundChoiceGroup( minOccurs = 1, maxOccurs = -1, + groupAs = @GroupAs(name = "choices", inJson = JsonGroupAsBehavior.LIST), assemblies = { - @BoundGroupedAssembly(formalName = "Assembly Reference", - useName = "assembly", - discriminatorValue = "assembly-ref", - binding = AssemblyReference.class), - @BoundGroupedAssembly(formalName = "Inline Assembly Definition", - useName = "define-assembly", - discriminatorValue = "assembly", - binding = InlineDefineAssembly.class), - @BoundGroupedAssembly(formalName = "Field Reference", - useName = "field", - discriminatorValue = "field-ref", + @BoundGroupedAssembly(formalName = "Assembly Reference", useName = "assembly", + discriminatorValue = "assembly-ref", binding = AssemblyReference.class), + @BoundGroupedAssembly(formalName = "Inline Assembly Definition", useName = "define-assembly", + discriminatorValue = "assembly", binding = InlineDefineAssembly.class), + @BoundGroupedAssembly(formalName = "Field Reference", useName = "field", discriminatorValue = "field-ref", binding = FieldReference.class), - @BoundGroupedAssembly(formalName = "Inline Field Definition", - useName = "define-field", - discriminatorValue = "field", - binding = InlineDefineField.class) - }, - groupAs = @GroupAs(name = "choices", inJson = JsonGroupAsBehavior.LIST)) + @BoundGroupedAssembly(formalName = "Inline Field Definition", useName = "define-field", + discriminatorValue = "field", binding = InlineDefineField.class) + }) private List _choices; @BoundAssembly( @@ -147,10 +167,23 @@ public static class Choice implements IBoundObject { useName = "any") private Any _any; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.Choice} + * instance with no metadata. + */ public Choice() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.Choice} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Choice(IMetaschemaData data) { this.__metaschemaData = data; } @@ -160,19 +193,46 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the {@code choices} choice group items. + * + * @return the choices items + */ + @NonNull public List getChoices() { + if (_choices == null) { + _choices = new LinkedList<>(); + } return _choices; } - public void setChoices(List value) { + /** + * Set the {@code choices} choice group items. + * + * @param value + * the choices items to set + */ + public void setChoices(@NonNull List value) { _choices = value; } + /** + * Get the any Additional Content. + * + * @return the any value, or {@code null} if not set + */ + @Nullable public Any getAny() { return _any; } - public void setAny(Any value) { + /** + * Set the any Additional Content. + * + * @param value + * the any value to set + */ + public void setAny(@Nullable Any value) { _any = value; } @@ -205,6 +265,11 @@ public static class ChoiceGroup implements IBoundObject { matches = @Matches(level = IConstraint.Level.ERROR, pattern = "^[1-9][0-9]*|unbounded$"))) private String _maxOccurs; + /** + * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + */ @BoundAssembly( formalName = "JSON Key", description = "Used in JSON (and similar formats) to identify a flag that will be used as the property name in an object hold a collection of sibling objects. Requires that siblings must never share `json-key` values.", @@ -227,37 +292,46 @@ public static class ChoiceGroup implements IBoundObject { @BoundChoiceGroup( minOccurs = 1, maxOccurs = -1, + groupAs = @GroupAs(name = "choices", inJson = JsonGroupAsBehavior.LIST), assemblies = { - @BoundGroupedAssembly(formalName = "Grouping Assembly Reference", - useName = "assembly", - discriminatorValue = "assembly-ref", - binding = Assembly.class), - @BoundGroupedAssembly(formalName = "Inline Assembly Definition", - useName = "define-assembly", - discriminatorValue = "assembly", - binding = DefineAssembly.class), - @BoundGroupedAssembly(formalName = "Grouping Field Reference", - useName = "field", - discriminatorValue = "field-ref", - binding = Field.class), - @BoundGroupedAssembly(formalName = "Inline Field Definition", - useName = "define-field", - discriminatorValue = "field", - binding = DefineField.class) - }, - groupAs = @GroupAs(name = "choices", inJson = JsonGroupAsBehavior.LIST)) + @BoundGroupedAssembly(formalName = "Grouping Assembly Reference", useName = "assembly", + discriminatorValue = "assembly-ref", binding = Assembly.class), + @BoundGroupedAssembly(formalName = "Inline Assembly Definition", useName = "define-assembly", + discriminatorValue = "assembly", binding = DefineAssembly.class), + @BoundGroupedAssembly(formalName = "Grouping Field Reference", useName = "field", + discriminatorValue = "field-ref", binding = Field.class), + @BoundGroupedAssembly(formalName = "Inline Field Definition", useName = "define-field", + discriminatorValue = "field", binding = DefineField.class) + }) private List _choices; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.ChoiceGroup} + * instance with no metadata. + */ public ChoiceGroup() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.ChoiceGroup} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public ChoiceGroup(IMetaschemaData data) { this.__metaschemaData = data; } @@ -267,59 +341,164 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the minimum Occurrence. + * + * @return the min-occurs value, or {@code null} if not set + */ + @Nullable public BigInteger getMinOccurs() { return _minOccurs; } - public void setMinOccurs(BigInteger value) { + /** + * Set the minimum Occurrence. + * + * @param value + * the min-occurs value to set + */ + public void setMinOccurs(@Nullable BigInteger value) { _minOccurs = value; } + /** + * Get the maximum Occurrence. + * + * @return the max-occurs value, or {@code null} if not set + */ + @Nullable public String getMaxOccurs() { return _maxOccurs; } - public void setMaxOccurs(String value) { + /** + * Set the maximum Occurrence. + * + * @param value + * the max-occurs value to set + */ + public void setMaxOccurs(@Nullable String value) { _maxOccurs = value; } + /** + * Get the jSON Key. + * + *

+ * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + * + * @return the json-key value, or {@code null} if not set + */ + @Nullable public JsonKey getJsonKey() { return _jsonKey; } - public void setJsonKey(JsonKey value) { + /** + * Set the jSON Key. + * + *

+ * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + * + * @param value + * the json-key value to set + */ + public void setJsonKey(@Nullable JsonKey value) { _jsonKey = value; } + /** + * Get the group As. + * + * @return the group-as value + */ + @NonNull public GroupingAs getGroupAs() { return _groupAs; } - public void setGroupAs(GroupingAs value) { + /** + * Set the group As. + * + * @param value + * the group-as value to set + */ + public void setGroupAs(@NonNull GroupingAs value) { _groupAs = value; } + /** + * Get the discriminator JSON Property. + * + * @return the discriminator value, or {@code null} if not set + */ + @Nullable public String getDiscriminator() { return _discriminator; } - public void setDiscriminator(String value) { + /** + * Set the discriminator JSON Property. + * + * @param value + * the discriminator value to set + */ + public void setDiscriminator(@Nullable String value) { _discriminator = value; } + /** + * Get the {@code choices} choice group items. + * + * @return the choices items + */ + @NonNull public List getChoices() { + if (_choices == null) { + _choices = new LinkedList<>(); + } return _choices; } - public void setChoices(List value) { + /** + * Set the {@code choices} choice group items. + * + * @param value + * the choices items to set + */ + public void setChoices(@NonNull List value) { _choices = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } @@ -354,6 +533,9 @@ public static class Assembly implements IBoundObject { typeAdapter = StringAdapter.class) private String _deprecated; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -361,6 +543,10 @@ public static class Assembly implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -375,6 +561,9 @@ public static class Assembly implements IBoundObject { groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) private List _props; + /** + * Allows the name of the definition to be overridden. + */ @BoundField( formalName = "Use Name", description = "Allows the name of the definition to be overridden.", @@ -387,16 +576,33 @@ public static class Assembly implements IBoundObject { typeAdapter = TokenAdapter.class) private String _discriminatorValue; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.ChoiceGroup.Assembly} + * instance with no metadata. + */ public Assembly() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.ChoiceGroup.Assembly} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Assembly(IMetaschemaData data) { this.__metaschemaData = data; } @@ -406,51 +612,140 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the global Assembly Reference. + * + * @return the ref value + */ + @NonNull public String getRef() { return _ref; } - public void setRef(String value) { + /** + * Set the global Assembly Reference. + * + * @param value + * the ref value to set + */ + public void setRef(@NonNull String value) { _ref = value; } + /** + * Get the assembly Reference Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the assembly Reference Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -482,27 +777,77 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @return the use-name value, or {@code null} if not set + */ + @Nullable public UseName getUseName() { return _useName; } - public void setUseName(UseName value) { + /** + * Set the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @param value + * the use-name value to set + */ + public void setUseName(@Nullable UseName value) { _useName = value; } + /** + * Get the grouping Discriminator Value. + * + * @return the discriminator-value value, or {@code null} if not set + */ + @Nullable public String getDiscriminatorValue() { return _discriminatorValue; } - public void setDiscriminatorValue(String value) { + /** + * Set the grouping Discriminator Value. + * + * @param value + * the discriminator-value value to set + */ + public void setDiscriminatorValue(@Nullable String value) { _discriminatorValue = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } @@ -538,6 +883,9 @@ public static class DefineAssembly implements IBoundObject { typeAdapter = StringAdapter.class) private String _deprecated; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -545,6 +893,10 @@ public static class DefineAssembly implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -567,17 +919,13 @@ public static class DefineAssembly implements IBoundObject { @BoundChoiceGroup( maxOccurs = -1, + groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST), assemblies = { - @BoundGroupedAssembly(formalName = "Inline Flag Definition", - useName = "define-flag", - discriminatorValue = "flag", - binding = InlineDefineFlag.class), - @BoundGroupedAssembly(formalName = "Flag Reference", - useName = "flag", - discriminatorValue = "flag-ref", + @BoundGroupedAssembly(formalName = "Inline Flag Definition", useName = "define-flag", + discriminatorValue = "flag", binding = InlineDefineFlag.class), + @BoundGroupedAssembly(formalName = "Flag Reference", useName = "flag", discriminatorValue = "flag-ref", binding = FlagReference.class) - }, - groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST)) + }) private List _flags; @BoundAssembly( @@ -588,6 +936,10 @@ public static class DefineAssembly implements IBoundObject { useName = "constraint") private AssemblyConstraints _constraint; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", @@ -601,10 +953,23 @@ public static class DefineAssembly implements IBoundObject { groupAs = @GroupAs(name = "examples", inJson = JsonGroupAsBehavior.LIST)) private List _examples; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.ChoiceGroup.DefineAssembly} + * instance with no metadata. + */ public DefineAssembly() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.ChoiceGroup.DefineAssembly} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public DefineAssembly(IMetaschemaData data) { this.__metaschemaData = data; } @@ -614,51 +979,140 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the inline Assembly Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the inline Assembly Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the inline Assembly Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the inline Assembly Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -690,51 +1144,137 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the grouping Discriminator Value. + * + * @return the discriminator-value value, or {@code null} if not set + */ + @Nullable public String getDiscriminatorValue() { return _discriminatorValue; } - public void setDiscriminatorValue(String value) { + /** + * Set the grouping Discriminator Value. + * + * @param value + * the discriminator-value value to set + */ + public void setDiscriminatorValue(@Nullable String value) { _discriminatorValue = value; } + /** + * Get the {@code flags} choice group items. + * + * @return the flags items + */ + @NonNull public List getFlags() { + if (_flags == null) { + _flags = new LinkedList<>(); + } return _flags; } - public void setFlags(List value) { + /** + * Set the {@code flags} choice group items. + * + * @param value + * the flags items to set + */ + public void setFlags(@NonNull List value) { _flags = value; } + /** + * Get the {@code model} property. + * + * @return the model value, or {@code null} if not set + */ + @Nullable public AssemblyModel getModel() { return _model; } - public void setModel(AssemblyModel value) { + /** + * Set the {@code model} property. + * + * @param value + * the model value to set + */ + public void setModel(@Nullable AssemblyModel value) { _model = value; } + /** + * Get the {@code constraint} property. + * + * @return the constraint value, or {@code null} if not set + */ + @Nullable public AssemblyConstraints getConstraint() { return _constraint; } - public void setConstraint(AssemblyConstraints value) { + /** + * Set the {@code constraint} property. + * + * @param value + * the constraint value to set + */ + public void setConstraint(@Nullable AssemblyConstraints value) { _constraint = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } + /** + * Get the example. + * + * @return the example value + */ + @NonNull public List getExamples() { + if (_examples == null) { + _examples = new LinkedList<>(); + } return _examples; } - public void setExamples(List value) { + /** + * Set the example. + * + * @param value + * the example value to set + */ + public void setExamples(@NonNull List value) { _examples = value; } @@ -814,9 +1354,13 @@ public static class Field implements IBoundObject { description = "Block contents of a markup-multiline field will be represented with a containing (wrapper) element in the XML."), @AllowedValue(value = "UNWRAPPED", description = "Block contents of a markup-multiline will be represented in the XML with no wrapper, making the field implicit. Among sibling fields in a given model, only one of them may be designated as UNWRAPPED."), - @AllowedValue(value = "WITH_WRAPPER", description = "Alias for WRAPPED.") }))) + @AllowedValue(value = "WITH_WRAPPER", description = "Alias for WRAPPED.", + deprecatedVersion = "0.9.0") }))) private String _inXml; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -824,6 +1368,10 @@ public static class Field implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -838,6 +1386,9 @@ public static class Field implements IBoundObject { groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) private List _props; + /** + * Allows the name of the definition to be overridden. + */ @BoundField( formalName = "Use Name", description = "Allows the name of the definition to be overridden.", @@ -850,16 +1401,33 @@ public static class Field implements IBoundObject { typeAdapter = TokenAdapter.class) private String _discriminatorValue; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.ChoiceGroup.Field} + * instance with no metadata. + */ public Field() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.ChoiceGroup.Field} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Field(IMetaschemaData data) { this.__metaschemaData = data; } @@ -869,67 +1437,180 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the global Field Reference. + * + * @return the ref value + */ + @NonNull public String getRef() { return _ref; } - public void setRef(String value) { + /** + * Set the global Field Reference. + * + * @param value + * the ref value to set + */ + public void setRef(@NonNull String value) { _ref = value; } + /** + * Get the field Reference Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the field Reference Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the default Field Value. + * + * @return the default value, or {@code null} if not set + */ + @Nullable public String getDefault() { return _default; } - public void setDefault(String value) { + /** + * Set the default Field Value. + * + * @param value + * the default value to set + */ + public void setDefault(@Nullable String value) { _default = value; } + /** + * Get the field In XML. + * + * @return the in-xml value, or {@code null} if not set + */ + @Nullable public String getInXml() { return _inXml; } - public void setInXml(String value) { + /** + * Set the field In XML. + * + * @param value + * the in-xml value to set + */ + public void setInXml(@Nullable String value) { _inXml = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -961,27 +1642,77 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @return the use-name value, or {@code null} if not set + */ + @Nullable public UseName getUseName() { return _useName; } - public void setUseName(UseName value) { + /** + * Set the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @param value + * the use-name value to set + */ + public void setUseName(@Nullable UseName value) { _useName = value; } + /** + * Get the grouping Discriminator Value. + * + * @return the discriminator-value value, or {@code null} if not set + */ + @Nullable public String getDiscriminatorValue() { return _discriminatorValue; } - public void setDiscriminatorValue(String value) { + /** + * Set the grouping Discriminator Value. + * + * @param value + * the discriminator-value value to set + */ + public void setDiscriminatorValue(@Nullable String value) { _discriminatorValue = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } @@ -1025,61 +1756,67 @@ public static class DefineField implements IBoundObject { valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = { @AllowedValue(value = "markup-line", - description = "The [markup-line](https://pages.nist.gov/metaschema/specification/datatypes/#markup-line) data type."), + description = "The [markup-line](https://framework.metaschema.dev/specification/datatypes/#markup-line) data type."), @AllowedValue(value = "markup-multiline", - description = "The [markup-multiline](https://pages.nist.gov/metaschema/specification/datatypes/#markup-multiline) data type."), + description = "The [markup-multiline](https://framework.metaschema.dev/specification/datatypes/#markup-multiline) data type."), @AllowedValue(value = "base64", - description = "The [base64](https://pages.nist.gov/metaschema/specification/datatypes/#base64) data type."), + description = "The [base64](https://framework.metaschema.dev/specification/datatypes/#base64) data type."), @AllowedValue(value = "boolean", - description = "The [boolean](https://pages.nist.gov/metaschema/specification/datatypes/#boolean) data type."), + description = "The [boolean](https://framework.metaschema.dev/specification/datatypes/#boolean) data type."), @AllowedValue(value = "date", - description = "The [date](https://pages.nist.gov/metaschema/specification/datatypes/#date) data type."), + description = "The [date](https://framework.metaschema.dev/specification/datatypes/#date) data type."), @AllowedValue(value = "date-time", - description = "The [date-time](https://pages.nist.gov/metaschema/specification/datatypes/#date-time) data type."), + description = "The [date-time](https://framework.metaschema.dev/specification/datatypes/#date-time) data type."), @AllowedValue(value = "date-time-with-timezone", - description = "The [date-time-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-time-with-timezone) data type."), + description = "The [date-time-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-time-with-timezone) data type."), @AllowedValue(value = "date-with-timezone", - description = "The [date-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-with-timezone) data type."), + description = "The [date-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-with-timezone) data type."), @AllowedValue(value = "day-time-duration", - description = "The [day-time-duration](https://pages.nist.gov/metaschema/specification/datatypes/#day-time-duration) data type."), + description = "The [day-time-duration](https://framework.metaschema.dev/specification/datatypes/#day-time-duration) data type."), @AllowedValue(value = "decimal", - description = "The [decimal](https://pages.nist.gov/metaschema/specification/datatypes/#decimal) data type."), + description = "The [decimal](https://framework.metaschema.dev/specification/datatypes/#decimal) data type."), @AllowedValue(value = "email-address", - description = "The [email-address](https://pages.nist.gov/metaschema/specification/datatypes/#email-address) data type."), + description = "The [email-address](https://framework.metaschema.dev/specification/datatypes/#email-address) data type."), @AllowedValue(value = "hostname", - description = "The [hostname](https://pages.nist.gov/metaschema/specification/datatypes/#hostname) data type."), + description = "The [hostname](https://framework.metaschema.dev/specification/datatypes/#hostname) data type."), @AllowedValue(value = "integer", - description = "The [integer](https://pages.nist.gov/metaschema/specification/datatypes/#integer) data type."), + description = "The [integer](https://framework.metaschema.dev/specification/datatypes/#integer) data type."), @AllowedValue(value = "ip-v4-address", - description = "The [ip-v4-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v4-address) data type."), + description = "The [ip-v4-address](https://framework.metaschema.dev/specification/datatypes/#ip-v4-address) data type."), @AllowedValue(value = "ip-v6-address", - description = "The [ip-v6-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v6-address) data type."), + description = "The [ip-v6-address](https://framework.metaschema.dev/specification/datatypes/#ip-v6-address) data type."), @AllowedValue(value = "non-negative-integer", - description = "The [non-negative-integer](https://pages.nist.gov/metaschema/specification/datatypes/#non-negative-integer) data type."), + description = "The [non-negative-integer](https://framework.metaschema.dev/specification/datatypes/#non-negative-integer) data type."), @AllowedValue(value = "positive-integer", - description = "The [positive-integer](https://pages.nist.gov/metaschema/specification/datatypes/#positive-integer) data type."), + description = "The [positive-integer](https://framework.metaschema.dev/specification/datatypes/#positive-integer) data type."), @AllowedValue(value = "string", - description = "The [string](https://pages.nist.gov/metaschema/specification/datatypes/#string) data type."), + description = "The [string](https://framework.metaschema.dev/specification/datatypes/#string) data type."), @AllowedValue(value = "token", - description = "The [token](https://pages.nist.gov/metaschema/specification/datatypes/#token) data type."), + description = "The [token](https://framework.metaschema.dev/specification/datatypes/#token) data type."), @AllowedValue(value = "uri", - description = "The [uri](https://pages.nist.gov/metaschema/specification/datatypes/#uri) data type."), + description = "The [uri](https://framework.metaschema.dev/specification/datatypes/#uri) data type."), @AllowedValue(value = "uri-reference", - description = "The [uri-reference](https://pages.nist.gov/metaschema/specification/datatypes/#uri-reference) data type."), + description = "The [uri-reference](https://framework.metaschema.dev/specification/datatypes/#uri-reference) data type."), @AllowedValue(value = "uuid", - description = "The [uuid](https://pages.nist.gov/metaschema/specification/datatypes/#uuid) data type."), + description = "The [uuid](https://framework.metaschema.dev/specification/datatypes/#uuid) data type."), @AllowedValue(value = "base64Binary", - description = "An old name which is deprecated for use in favor of the 'base64' data type."), + description = "An old name which is deprecated for use in favor of the 'base64' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime", - description = "An old name which is deprecated for use in favor of the 'date-time' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime-with-timezone", - description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "email", - description = "An old name which is deprecated for use in favor of the 'email-address' data type."), + description = "An old name which is deprecated for use in favor of the 'email-address' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "nonNegativeInteger", - description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type."), + description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "positiveInteger", - description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.") }))) + description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.", + deprecatedVersion = "1.0.0") }))) private String _asType; @BoundFlag( @@ -1088,6 +1825,9 @@ public static class DefineField implements IBoundObject { typeAdapter = StringAdapter.class) private String _default; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -1095,6 +1835,10 @@ public static class DefineField implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -1128,23 +1872,23 @@ public static class DefineField implements IBoundObject { @BoundChoiceGroup( maxOccurs = -1, + groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST), assemblies = { - @BoundGroupedAssembly(formalName = "Inline Flag Definition", - useName = "define-flag", - discriminatorValue = "flag", - binding = InlineDefineFlag.class), - @BoundGroupedAssembly(formalName = "Flag Reference", - useName = "flag", - discriminatorValue = "flag-ref", + @BoundGroupedAssembly(formalName = "Inline Flag Definition", useName = "define-flag", + discriminatorValue = "flag", binding = InlineDefineFlag.class), + @BoundGroupedAssembly(formalName = "Flag Reference", useName = "flag", discriminatorValue = "flag-ref", binding = FlagReference.class) - }, - groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST)) + }) private List _flags; @BoundAssembly( useName = "constraint") private FieldConstraints _constraint; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", @@ -1158,10 +1902,23 @@ public static class DefineField implements IBoundObject { groupAs = @GroupAs(name = "examples", inJson = JsonGroupAsBehavior.LIST)) private List _examples; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.ChoiceGroup.DefineField} + * instance with no metadata. + */ public DefineField() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyModel.ChoiceGroup.DefineField} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public DefineField(IMetaschemaData data) { this.__metaschemaData = data; } @@ -1171,67 +1928,180 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the inline Field Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the inline Field Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the inline Field Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the inline Field Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the field Value Data Type. + * + * @return the as-type value, or {@code null} if not set + */ + @Nullable public String getAsType() { return _asType; } - public void setAsType(String value) { + /** + * Set the field Value Data Type. + * + * @param value + * the as-type value to set + */ + public void setAsType(@Nullable String value) { _asType = value; } + /** + * Get the default Field Value. + * + * @return the default value, or {@code null} if not set + */ + @Nullable public String getDefault() { return _default; } - public void setDefault(String value) { + /** + * Set the default Field Value. + * + * @param value + * the default value to set + */ + public void setDefault(@Nullable String value) { _default = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -1263,59 +2133,157 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the grouping Discriminator Value. + * + * @return the discriminator-value value, or {@code null} if not set + */ + @Nullable public String getDiscriminatorValue() { return _discriminatorValue; } - public void setDiscriminatorValue(String value) { + /** + * Set the grouping Discriminator Value. + * + * @param value + * the discriminator-value value to set + */ + public void setDiscriminatorValue(@Nullable String value) { _discriminatorValue = value; } + /** + * Get the field Value JSON Property Name. + * + * @return the json-value-key value, or {@code null} if not set + */ + @Nullable public String getJsonValueKey() { return _jsonValueKey; } - public void setJsonValueKey(String value) { + /** + * Set the field Value JSON Property Name. + * + * @param value + * the json-value-key value to set + */ + public void setJsonValueKey(@Nullable String value) { _jsonValueKey = value; } + /** + * Get the flag Used as the Field Value's JSON Property Name. + * + * @return the json-value-key-flag value, or {@code null} if not set + */ + @Nullable public JsonValueKeyFlag getJsonValueKeyFlag() { return _jsonValueKeyFlag; } - public void setJsonValueKeyFlag(JsonValueKeyFlag value) { + /** + * Set the flag Used as the Field Value's JSON Property Name. + * + * @param value + * the json-value-key-flag value to set + */ + public void setJsonValueKeyFlag(@Nullable JsonValueKeyFlag value) { _jsonValueKeyFlag = value; } + /** + * Get the {@code flags} choice group items. + * + * @return the flags items + */ + @NonNull public List getFlags() { + if (_flags == null) { + _flags = new LinkedList<>(); + } return _flags; } - public void setFlags(List value) { + /** + * Set the {@code flags} choice group items. + * + * @param value + * the flags items to set + */ + public void setFlags(@NonNull List value) { _flags = value; } + /** + * Get the {@code constraint} property. + * + * @return the constraint value, or {@code null} if not set + */ + @Nullable public FieldConstraints getConstraint() { return _constraint; } - public void setConstraint(FieldConstraints value) { + /** + * Set the {@code constraint} property. + * + * @param value + * the constraint value to set + */ + public void setConstraint(@Nullable FieldConstraints value) { _constraint = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } + /** + * Get the example. + * + * @return the example value + */ + @NonNull public List getExamples() { + if (_examples == null) { + _examples = new LinkedList<>(); + } return _examples; } - public void setExamples(List value) { + /** + * Set the example. + * + * @param value + * the example value to set + */ + public void setExamples(@NonNull List value) { _examples = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyReference.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyReference.java index a8f5ee1e3..9338c02dc 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyReference.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/AssemblyReference.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.NonNegativeIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.PositiveIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; @@ -23,18 +27,12 @@ import gov.nist.secauto.metaschema.databind.model.annotations.Matches; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.math.BigInteger; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Assembly Reference", name = "assembly-reference", @@ -77,6 +75,9 @@ public class AssemblyReference implements IBoundObject { matches = @Matches(level = IConstraint.Level.ERROR, pattern = "^[1-9][0-9]*|unbounded$"))) private String _maxOccurs; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -84,6 +85,10 @@ public class AssemblyReference implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -98,6 +103,9 @@ public class AssemblyReference implements IBoundObject { groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) private List _props; + /** + * Allows the name of the definition to be overridden. + */ @BoundField( formalName = "Use Name", description = "Allows the name of the definition to be overridden.", @@ -109,16 +117,33 @@ public class AssemblyReference implements IBoundObject { useName = "group-as") private GroupingAs _groupAs; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyReference} + * instance with no metadata. + */ public AssemblyReference() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.AssemblyReference} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public AssemblyReference(IMetaschemaData data) { this.__metaschemaData = data; } @@ -128,67 +153,180 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the global Assembly Reference. + * + * @return the ref value + */ + @NonNull public String getRef() { return _ref; } - public void setRef(String value) { + /** + * Set the global Assembly Reference. + * + * @param value + * the ref value to set + */ + public void setRef(@NonNull String value) { _ref = value; } + /** + * Get the assembly Reference Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the assembly Reference Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the minimum Occurrence. + * + * @return the min-occurs value, or {@code null} if not set + */ + @Nullable public BigInteger getMinOccurs() { return _minOccurs; } - public void setMinOccurs(BigInteger value) { + /** + * Set the minimum Occurrence. + * + * @param value + * the min-occurs value to set + */ + public void setMinOccurs(@Nullable BigInteger value) { _minOccurs = value; } + /** + * Get the maximum Occurrence. + * + * @return the max-occurs value, or {@code null} if not set + */ + @Nullable public String getMaxOccurs() { return _maxOccurs; } - public void setMaxOccurs(String value) { + /** + * Set the maximum Occurrence. + * + * @param value + * the max-occurs value to set + */ + public void setMaxOccurs(@Nullable String value) { _maxOccurs = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -220,27 +358,77 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @return the use-name value, or {@code null} if not set + */ + @Nullable public UseName getUseName() { return _useName; } - public void setUseName(UseName value) { + /** + * Set the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @param value + * the use-name value to set + */ + public void setUseName(@Nullable UseName value) { _useName = value; } + /** + * Get the group As. + * + * @return the group-as value, or {@code null} if not set + */ + @Nullable public GroupingAs getGroupAs() { return _groupAs; } - public void setGroupAs(GroupingAs value) { + /** + * Set the group As. + * + * @param value + * the group-as value to set + */ + public void setGroupAs(@Nullable GroupingAs value) { _groupAs = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/ConstraintLetExpression.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/ConstraintLetExpression.java index a8bdaa5ee..a483cc904 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/ConstraintLetExpression.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/ConstraintLetExpression.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.model.IBoundObject; @@ -12,14 +16,9 @@ import gov.nist.secauto.metaschema.databind.model.annotations.BoundField; import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; - import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Constraint Let Expression", name = "constraint-let-expression", @@ -41,16 +40,33 @@ public class ConstraintLetExpression implements IBoundObject { typeAdapter = StringAdapter.class) private String _expression; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.ConstraintLetExpression} + * instance with no metadata. + */ public ConstraintLetExpression() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.ConstraintLetExpression} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public ConstraintLetExpression(IMetaschemaData data) { this.__metaschemaData = data; } @@ -60,27 +76,71 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the let Variable Name. + * + * @return the var value + */ + @NonNull public String getVar() { return _var; } - public void setVar(String value) { + /** + * Set the let Variable Name. + * + * @param value + * the var value to set + */ + public void setVar(@NonNull String value) { _var = value; } + /** + * Get the let Value Metapath Expression. + * + * @return the expression value + */ + @NonNull public String getExpression() { return _expression; } - public void setExpression(String value) { + /** + * Set the let Value Metapath Expression. + * + * @param value + * the expression value to set + */ + public void setExpression(@NonNull String value) { _expression = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/ConstraintValueEnum.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/ConstraintValueEnum.java index 65bdccf52..3cd3c56a5 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/ConstraintValueEnum.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/ConstraintValueEnum.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLineAdapter; @@ -14,15 +18,9 @@ import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaField; import gov.nist.secauto.metaschema.databind.model.metaschema.impl.AbstractAllowedValue; - import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions", - "null" -}) @MetaschemaField( formalName = "Allowed Value Enumeration", name = "constraint-value-enum", @@ -50,10 +48,23 @@ public class ConstraintValueEnum typeAdapter = MarkupLineAdapter.class) private MarkupLine _remark; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.ConstraintValueEnum} + * instance with no metadata. + */ public ConstraintValueEnum() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.ConstraintValueEnum} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public ConstraintValueEnum(IMetaschemaData data) { this.__metaschemaData = data; } @@ -63,30 +74,52 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the allowed Value Enumeration Value. + * + * @return the value value + */ + @NonNull public String getValue() { return _value; } - public void setValue(String value) { + /** + * Set the allowed Value Enumeration Value. + * + * @param value + * the value value to set + */ + public void setValue(@NonNull String value) { _value = value; } - @Override + /** + * Get the allowed Value Deprecation Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the allowed Value Deprecation Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } - @Override + @Nullable public MarkupLine getRemark() { return _remark; } - public void setRemark(MarkupLine value) { + public void setRemark(@Nullable MarkupLine value) { _remark = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Example.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Example.java index eec3e247f..8abdb19d8 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Example.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Example.java @@ -2,9 +2,12 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.UriReferenceAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -14,16 +17,10 @@ import gov.nist.secauto.metaschema.databind.model.annotations.BoundField; import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; - +import java.net.URI; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -import java.net.URI; - -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Example", name = "example", @@ -48,16 +45,33 @@ public class Example implements IBoundObject { typeAdapter = MarkupLineAdapter.class) private MarkupLine _description; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.Example} + * instance with no metadata. + */ public Example() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.Example} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Example(IMetaschemaData data) { this.__metaschemaData = data; } @@ -67,35 +81,91 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the example Reference. + * + * @return the ref value, or {@code null} if not set + */ + @Nullable public URI getRef() { return _ref; } - public void setRef(URI value) { + /** + * Set the example Reference. + * + * @param value + * the ref value to set + */ + public void setRef(@Nullable URI value) { _ref = value; } + /** + * Get the {@code path} property. + * + * @return the path value, or {@code null} if not set + */ + @Nullable public String getPath() { return _path; } - public void setPath(String value) { + /** + * Set the {@code path} property. + * + * @param value + * the path value to set + */ + public void setPath(@Nullable String value) { _path = value; } + /** + * Get the example Description. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the example Description. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FieldConstraints.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FieldConstraints.java index 72ba6b7ee..6afb1af9e 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FieldConstraints.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FieldConstraints.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.core.model.JsonGroupAsBehavior; import gov.nist.secauto.metaschema.core.util.ObjectUtils; @@ -15,21 +19,15 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase; import gov.nist.secauto.metaschema.databind.model.metaschema.IValueTargetedConstraintsBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( name = "field-constraints", moduleClass = MetaschemaModelModule.class) -public class FieldConstraints implements IValueTargetedConstraintsBase { +public class FieldConstraints implements IBoundObject, IValueTargetedConstraintsBase { private final IMetaschemaData __metaschemaData; @BoundAssembly( @@ -42,6 +40,7 @@ public class FieldConstraints implements IValueTargetedConstraintsBase { @BoundChoiceGroup( minOccurs = 1, maxOccurs = -1, + groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST), assemblies = { @BoundGroupedAssembly(formalName = "Allowed Values Constraint", useName = "allowed-values", binding = TargetedAllowedValuesConstraint.class), @@ -50,15 +49,29 @@ public class FieldConstraints implements IValueTargetedConstraintsBase { @BoundGroupedAssembly(formalName = "Targeted Index Has Key Constraint", useName = "index-has-key", binding = TargetedIndexHasKeyConstraint.class), @BoundGroupedAssembly(formalName = "Value Matches Constraint", useName = "matches", - binding = TargetedMatchesConstraint.class) - }, - groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST)) + binding = TargetedMatchesConstraint.class), + @BoundGroupedAssembly(formalName = "Report Condition Constraint", useName = "report", + binding = TargetedReportConstraint.class) + }) private List _rules; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FieldConstraints} + * instance with no metadata. + */ public FieldConstraints() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FieldConstraints} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public FieldConstraints(IMetaschemaData data) { this.__metaschemaData = data; } @@ -68,12 +81,26 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Let Expression. + * + * @return the let value + */ + @NonNull public List getLets() { + if (_lets == null) { + _lets = new LinkedList<>(); + } return _lets; } - public void setLets(List value) { + /** + * Set the constraint Let Expression. + * + * @param value + * the let value to set + */ + public void setLets(@NonNull List value) { _lets = value; } @@ -105,12 +132,32 @@ public boolean removeLet(ConstraintLetExpression item) { return _lets != null && _lets.remove(value); } - @Override + /** + * Get the {@code rules} choice group items. + * + *

+ * Items in this collection implement {@link ITargetedConstraintBase}. + * + * @return the rules items + */ + @NonNull public List getRules() { + if (_rules == null) { + _rules = new LinkedList<>(); + } return _rules; } - public void setRules(List value) { + /** + * Set the {@code rules} choice group items. + * + *

+ * Items in this collection must implement {@link ITargetedConstraintBase}. + * + * @param value + * the rules items to set + */ + public void setRules(@NonNull List value) { _rules = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FieldReference.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FieldReference.java index cb173983b..c88992d1c 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FieldReference.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FieldReference.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.NonNegativeIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.PositiveIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; @@ -25,18 +29,12 @@ import gov.nist.secauto.metaschema.databind.model.annotations.Matches; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.math.BigInteger; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Field Reference", name = "field-reference", @@ -95,9 +93,12 @@ public class FieldReference implements IBoundObject { description = "Block contents of a markup-multiline field will be represented with a containing (wrapper) element in the XML."), @AllowedValue(value = "UNWRAPPED", description = "Block contents of a markup-multiline will be represented in the XML with no wrapper, making the field implicit. Among sibling fields in a given model, only one of them may be designated as UNWRAPPED."), - @AllowedValue(value = "WITH_WRAPPER", description = "Alias for WRAPPED.") }))) + @AllowedValue(value = "WITH_WRAPPER", description = "Alias for WRAPPED.", deprecatedVersion = "0.9.0") }))) private String _inXml; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -105,6 +106,10 @@ public class FieldReference implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -119,6 +124,9 @@ public class FieldReference implements IBoundObject { groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) private List _props; + /** + * Allows the name of the definition to be overridden. + */ @BoundField( formalName = "Use Name", description = "Allows the name of the definition to be overridden.", @@ -130,16 +138,33 @@ public class FieldReference implements IBoundObject { useName = "group-as") private GroupingAs _groupAs; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FieldReference} + * instance with no metadata. + */ public FieldReference() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FieldReference} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public FieldReference(IMetaschemaData data) { this.__metaschemaData = data; } @@ -149,83 +174,220 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the global Field Reference. + * + * @return the ref value + */ + @NonNull public String getRef() { return _ref; } - public void setRef(String value) { + /** + * Set the global Field Reference. + * + * @param value + * the ref value to set + */ + public void setRef(@NonNull String value) { _ref = value; } + /** + * Get the field Reference Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the field Reference Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the default Field Value. + * + * @return the default value, or {@code null} if not set + */ + @Nullable public String getDefault() { return _default; } - public void setDefault(String value) { + /** + * Set the default Field Value. + * + * @param value + * the default value to set + */ + public void setDefault(@Nullable String value) { _default = value; } + /** + * Get the minimum Occurrence. + * + * @return the min-occurs value, or {@code null} if not set + */ + @Nullable public BigInteger getMinOccurs() { return _minOccurs; } - public void setMinOccurs(BigInteger value) { + /** + * Set the minimum Occurrence. + * + * @param value + * the min-occurs value to set + */ + public void setMinOccurs(@Nullable BigInteger value) { _minOccurs = value; } + /** + * Get the maximum Occurrence. + * + * @return the max-occurs value, or {@code null} if not set + */ + @Nullable public String getMaxOccurs() { return _maxOccurs; } - public void setMaxOccurs(String value) { + /** + * Set the maximum Occurrence. + * + * @param value + * the max-occurs value to set + */ + public void setMaxOccurs(@Nullable String value) { _maxOccurs = value; } + /** + * Get the field In XML. + * + * @return the in-xml value, or {@code null} if not set + */ + @Nullable public String getInXml() { return _inXml; } - public void setInXml(String value) { + /** + * Set the field In XML. + * + * @param value + * the in-xml value to set + */ + public void setInXml(@Nullable String value) { _inXml = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -257,27 +419,77 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @return the use-name value, or {@code null} if not set + */ + @Nullable public UseName getUseName() { return _useName; } - public void setUseName(UseName value) { + /** + * Set the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @param value + * the use-name value to set + */ + public void setUseName(@Nullable UseName value) { _useName = value; } + /** + * Get the group As. + * + * @return the group-as value, or {@code null} if not set + */ + @Nullable public GroupingAs getGroupAs() { return _groupAs; } - public void setGroupAs(GroupingAs value) { + /** + * Set the group As. + * + * @param value + * the group-as value to set + */ + public void setGroupAs(@Nullable GroupingAs value) { _groupAs = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagAllowedValues.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagAllowedValues.java index a9a1465b7..82cf1f20b 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagAllowedValues.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagAllowedValues.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -23,17 +27,11 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Allowed Values Constraint", name = "flag-allowed-values", @@ -71,13 +69,13 @@ public class FlagAllowedValues implements IBoundObject, IConstraintBase { defaultValue = "no", typeAdapter = TokenAdapter.class, valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, - values = { @AllowedValue(value = "no", description = "Other values are not allowed."), + values = { @AllowedValue(value = "no", description = "Other value are not allowed."), @AllowedValue(value = "yes", description = "Other values are allowed.") }))) private String _allowOther; /** - * "Determines if the given enumerated values may be extended by other allowed - * value constraints." + * Determines if the given enumerated values may be extended by other allowed + * value constraints. */ @BoundFlag( formalName = "Allow Extension?", @@ -92,6 +90,9 @@ public class FlagAllowedValues implements IBoundObject, IConstraintBase { @AllowedValue(value = "none", description = "Cannot be extended.") }))) private String _extensible; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -99,6 +100,10 @@ public class FlagAllowedValues implements IBoundObject, IConstraintBase { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -121,16 +126,33 @@ public class FlagAllowedValues implements IBoundObject, IConstraintBase { groupAs = @GroupAs(name = "enums", inJson = JsonGroupAsBehavior.LIST)) private List _enums; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagAllowedValues} + * instance with no metadata. + */ public FlagAllowedValues() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagAllowedValues} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public FlagAllowedValues(IMetaschemaData data) { this.__metaschemaData = data; } @@ -140,64 +162,168 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } + /** + * Get the allow Non-Enumerated Values?. + * + * @return the allow-other value, or {@code null} if not set + */ + @Nullable public String getAllowOther() { return _allowOther; } - public void setAllowOther(String value) { + /** + * Set the allow Non-Enumerated Values?. + * + * @param value + * the allow-other value to set + */ + public void setAllowOther(@Nullable String value) { _allowOther = value; } + /** + * Get the allow Extension?. + * + *

+ * Determines if the given enumerated values may be extended by other allowed + * value constraints. + * + * @return the extensible value, or {@code null} if not set + */ + @Nullable public String getExtensible() { return _extensible; } - public void setExtensible(String value) { + /** + * Set the allow Extension?. + * + *

+ * Determines if the given enumerated values may be extended by other allowed + * value constraints. + * + * @param value + * the extensible value to set + */ + public void setExtensible(@Nullable String value) { _extensible = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -229,11 +355,26 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the allowed Value Enumeration. + * + * @return the enum value + */ + @NonNull public List getEnums() { + if (_enums == null) { + _enums = new LinkedList<>(); + } return _enums; } - public void setEnums(List value) { + /** + * Set the allowed Value Enumeration. + * + * @param value + * the enum value to set + */ + public void setEnums(@NonNull List value) { _enums = value; } @@ -265,12 +406,31 @@ public boolean removeEnum(ConstraintValueEnum item) { return _enums != null && _enums.remove(value); } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagConstraints.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagConstraints.java index 53783e39f..377fc476e 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagConstraints.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagConstraints.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.core.model.JsonGroupAsBehavior; import gov.nist.secauto.metaschema.core.util.ObjectUtils; @@ -15,22 +19,15 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase; import gov.nist.secauto.metaschema.databind.model.metaschema.IValueConstraintsBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.ExcessivePublicCount", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( name = "flag-constraints", moduleClass = MetaschemaModelModule.class) -public class FlagConstraints implements IValueConstraintsBase { +public class FlagConstraints implements IBoundObject, IValueConstraintsBase { private final IMetaschemaData __metaschemaData; @BoundAssembly( @@ -43,6 +40,7 @@ public class FlagConstraints implements IValueConstraintsBase { @BoundChoiceGroup( minOccurs = 1, maxOccurs = -1, + groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST), assemblies = { @BoundGroupedAssembly(formalName = "Allowed Values Constraint", useName = "allowed-values", binding = FlagAllowedValues.class), @@ -51,15 +49,29 @@ public class FlagConstraints implements IValueConstraintsBase { @BoundGroupedAssembly(formalName = "Index Has Key Constraint", useName = "index-has-key", binding = FlagIndexHasKey.class), @BoundGroupedAssembly(formalName = "Value Matches Constraint", useName = "matches", - binding = FlagMatches.class) - }, - groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST)) + binding = FlagMatches.class), + @BoundGroupedAssembly(formalName = "Report Condition Constraint", useName = "report", + binding = FlagReport.class) + }) private List _rules; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagConstraints} + * instance with no metadata. + */ public FlagConstraints() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagConstraints} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public FlagConstraints(IMetaschemaData data) { this.__metaschemaData = data; } @@ -69,12 +81,26 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Let Expression. + * + * @return the let value + */ + @NonNull public List getLets() { + if (_lets == null) { + _lets = new LinkedList<>(); + } return _lets; } - public void setLets(List value) { + /** + * Set the constraint Let Expression. + * + * @param value + * the let value to set + */ + public void setLets(@NonNull List value) { _lets = value; } @@ -106,12 +132,32 @@ public boolean removeLet(ConstraintLetExpression item) { return _lets != null && _lets.remove(value); } - @Override + /** + * Get the {@code rules} choice group items. + * + *

+ * Items in this collection implement {@link IConstraintBase}. + * + * @return the rules items + */ + @NonNull public List getRules() { + if (_rules == null) { + _rules = new LinkedList<>(); + } return _rules; } - public void setRules(List value) { + /** + * Set the {@code rules} choice group items. + * + *

+ * Items in this collection must implement {@link IConstraintBase}. + * + * @param value + * the rules items to set + */ + public void setRules(@NonNull List value) { _rules = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagExpect.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagExpect.java index 889531b50..ba5f5674e 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagExpect.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagExpect.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -23,17 +27,11 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Expect Condition Constraint", name = "flag-expect", @@ -72,6 +70,9 @@ public class FlagExpect implements IBoundObject, IConfigurableMessageConstraintB typeAdapter = StringAdapter.class) private String _test; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -79,6 +80,10 @@ public class FlagExpect implements IBoundObject, IConfigurableMessageConstraintB typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -99,16 +104,33 @@ public class FlagExpect implements IBoundObject, IConfigurableMessageConstraintB typeAdapter = StringAdapter.class) private String _message; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagExpect} + * instance with no metadata. + */ public FlagExpect() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagExpect} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public FlagExpect(IMetaschemaData data) { this.__metaschemaData = data; } @@ -118,56 +140,140 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } + /** + * Get the expect Test Condition. + * + * @return the test value + */ + @NonNull public String getTest() { return _test; } - public void setTest(String value) { + /** + * Set the expect Test Condition. + * + * @param value + * the test value to set + */ + public void setTest(@NonNull String value) { _test = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -199,21 +305,51 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } - @Override + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable public String getMessage() { return _message; } - public void setMessage(String value) { + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { _message = value; } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagIndexHasKey.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagIndexHasKey.java index 651639e23..3d9c90005 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagIndexHasKey.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagIndexHasKey.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -23,17 +27,11 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Index Has Key Constraint", name = "flag-index-has-key", @@ -72,6 +70,9 @@ public class FlagIndexHasKey implements IBoundObject, IConfigurableMessageConstr typeAdapter = TokenAdapter.class) private String _name; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -79,6 +80,10 @@ public class FlagIndexHasKey implements IBoundObject, IConfigurableMessageConstr typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -107,16 +112,33 @@ public class FlagIndexHasKey implements IBoundObject, IConfigurableMessageConstr typeAdapter = StringAdapter.class) private String _message; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagIndexHasKey} + * instance with no metadata. + */ public FlagIndexHasKey() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagIndexHasKey} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public FlagIndexHasKey(IMetaschemaData data) { this.__metaschemaData = data; } @@ -126,56 +148,140 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } + /** + * Get the index Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the index Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -207,11 +313,26 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the key Constraint Field. + * + * @return the key-field value + */ + @NonNull public List getKeyFields() { + if (_keyFields == null) { + _keyFields = new LinkedList<>(); + } return _keyFields; } - public void setKeyFields(List value) { + /** + * Set the key Constraint Field. + * + * @param value + * the key-field value to set + */ + public void setKeyFields(@NonNull List value) { _keyFields = value; } @@ -243,21 +364,51 @@ public boolean removeKeyField(KeyConstraintField item) { return _keyFields != null && _keyFields.remove(value); } - @Override + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable public String getMessage() { return _message; } - public void setMessage(String value) { + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { _message = value; } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagMatches.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagMatches.java index eba29a01a..d0d4ba384 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagMatches.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagMatches.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -23,17 +27,11 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Value Matches Constraint", name = "flag-matches", @@ -78,59 +76,68 @@ public class FlagMatches implements IBoundObject, IConfigurableMessageConstraint valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = { @AllowedValue(value = "base64", - description = "The [base64](https://pages.nist.gov/metaschema/specification/datatypes/#base64) data type."), + description = "The [base64](https://framework.metaschema.dev/specification/datatypes/#base64) data type."), @AllowedValue(value = "boolean", - description = "The [boolean](https://pages.nist.gov/metaschema/specification/datatypes/#boolean) data type."), + description = "The [boolean](https://framework.metaschema.dev/specification/datatypes/#boolean) data type."), @AllowedValue(value = "date", - description = "The [date](https://pages.nist.gov/metaschema/specification/datatypes/#date) data type."), + description = "The [date](https://framework.metaschema.dev/specification/datatypes/#date) data type."), @AllowedValue(value = "date-time", - description = "The [date-time](https://pages.nist.gov/metaschema/specification/datatypes/#date-time) data type."), + description = "The [date-time](https://framework.metaschema.dev/specification/datatypes/#date-time) data type."), @AllowedValue(value = "date-time-with-timezone", - description = "The [date-time-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-time-with-timezone) data type."), + description = "The [date-time-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-time-with-timezone) data type."), @AllowedValue(value = "date-with-timezone", - description = "The [date-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-with-timezone) data type."), + description = "The [date-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-with-timezone) data type."), @AllowedValue(value = "day-time-duration", - description = "The [day-time-duration](https://pages.nist.gov/metaschema/specification/datatypes/#day-time-duration) data type."), + description = "The [day-time-duration](https://framework.metaschema.dev/specification/datatypes/#day-time-duration) data type."), @AllowedValue(value = "decimal", - description = "The [decimal](https://pages.nist.gov/metaschema/specification/datatypes/#decimal) data type."), + description = "The [decimal](https://framework.metaschema.dev/specification/datatypes/#decimal) data type."), @AllowedValue(value = "email-address", - description = "The [email-address](https://pages.nist.gov/metaschema/specification/datatypes/#email-address) data type."), + description = "The [email-address](https://framework.metaschema.dev/specification/datatypes/#email-address) data type."), @AllowedValue(value = "hostname", - description = "The [hostname](https://pages.nist.gov/metaschema/specification/datatypes/#hostname) data type."), + description = "The [hostname](https://framework.metaschema.dev/specification/datatypes/#hostname) data type."), @AllowedValue(value = "integer", - description = "The [integer](https://pages.nist.gov/metaschema/specification/datatypes/#integer) data type."), + description = "The [integer](https://framework.metaschema.dev/specification/datatypes/#integer) data type."), @AllowedValue(value = "ip-v4-address", - description = "The [ip-v4-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v4-address) data type."), + description = "The [ip-v4-address](https://framework.metaschema.dev/specification/datatypes/#ip-v4-address) data type."), @AllowedValue(value = "ip-v6-address", - description = "The [ip-v6-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v6-address) data type."), + description = "The [ip-v6-address](https://framework.metaschema.dev/specification/datatypes/#ip-v6-address) data type."), @AllowedValue(value = "non-negative-integer", - description = "The [non-negative-integer](https://pages.nist.gov/metaschema/specification/datatypes/#non-negative-integer) data type."), + description = "The [non-negative-integer](https://framework.metaschema.dev/specification/datatypes/#non-negative-integer) data type."), @AllowedValue(value = "positive-integer", - description = "The [positive-integer](https://pages.nist.gov/metaschema/specification/datatypes/#positive-integer) data type."), + description = "The [positive-integer](https://framework.metaschema.dev/specification/datatypes/#positive-integer) data type."), @AllowedValue(value = "string", - description = "The [string](https://pages.nist.gov/metaschema/specification/datatypes/#string) data type."), + description = "The [string](https://framework.metaschema.dev/specification/datatypes/#string) data type."), @AllowedValue(value = "token", - description = "The [token](https://pages.nist.gov/metaschema/specification/datatypes/#token) data type."), + description = "The [token](https://framework.metaschema.dev/specification/datatypes/#token) data type."), @AllowedValue(value = "uri", - description = "The [uri](https://pages.nist.gov/metaschema/specification/datatypes/#uri) data type."), + description = "The [uri](https://framework.metaschema.dev/specification/datatypes/#uri) data type."), @AllowedValue(value = "uri-reference", - description = "The [uri-reference](https://pages.nist.gov/metaschema/specification/datatypes/#uri-reference) data type."), + description = "The [uri-reference](https://framework.metaschema.dev/specification/datatypes/#uri-reference) data type."), @AllowedValue(value = "uuid", - description = "The [uuid](https://pages.nist.gov/metaschema/specification/datatypes/#uuid) data type."), + description = "The [uuid](https://framework.metaschema.dev/specification/datatypes/#uuid) data type."), @AllowedValue(value = "base64Binary", - description = "An old name which is deprecated for use in favor of the 'base64' data type."), + description = "An old name which is deprecated for use in favor of the 'base64' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime", - description = "An old name which is deprecated for use in favor of the 'date-time' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime-with-timezone", - description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "email", - description = "An old name which is deprecated for use in favor of the 'email-address' data type."), + description = "An old name which is deprecated for use in favor of the 'email-address' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "nonNegativeInteger", - description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type."), + description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "positiveInteger", - description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.") }))) + description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.", + deprecatedVersion = "1.0.0") }))) private String _datatype; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -138,6 +145,10 @@ public class FlagMatches implements IBoundObject, IConfigurableMessageConstraint typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -158,16 +169,33 @@ public class FlagMatches implements IBoundObject, IConfigurableMessageConstraint typeAdapter = StringAdapter.class) private String _message; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagMatches} + * instance with no metadata. + */ public FlagMatches() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagMatches} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public FlagMatches(IMetaschemaData data) { this.__metaschemaData = data; } @@ -177,64 +205,160 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } + /** + * Get the matches Regular Expression. + * + * @return the regex value, or {@code null} if not set + */ + @Nullable public String getRegex() { return _regex; } - public void setRegex(String value) { + /** + * Set the matches Regular Expression. + * + * @param value + * the regex value to set + */ + public void setRegex(@Nullable String value) { _regex = value; } + /** + * Get the matches Data Type. + * + * @return the datatype value, or {@code null} if not set + */ + @Nullable public String getDatatype() { return _datatype; } - public void setDatatype(String value) { + /** + * Set the matches Data Type. + * + * @param value + * the datatype value to set + */ + public void setDatatype(@Nullable String value) { _datatype = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -266,21 +390,51 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } - @Override + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable public String getMessage() { return _message; } - public void setMessage(String value) { + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { _message = value; } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagReference.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagReference.java index c4f8a6d87..03dbe51bb 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagReference.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagReference.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.PositiveIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; @@ -23,18 +27,12 @@ import gov.nist.secauto.metaschema.databind.model.annotations.GroupAs; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.math.BigInteger; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Flag Reference", name = "flag-reference", @@ -77,6 +75,9 @@ public class FlagReference implements IBoundObject { @AllowedValue(value = "no", description = "The flag is optional.") }))) private String _required; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -84,6 +85,10 @@ public class FlagReference implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -98,22 +103,42 @@ public class FlagReference implements IBoundObject { groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) private List _props; + /** + * Allows the name of the definition to be overridden. + */ @BoundField( formalName = "Use Name", description = "Allows the name of the definition to be overridden.", useName = "use-name") private UseName _useName; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagReference} + * instance with no metadata. + */ public FlagReference() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagReference} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public FlagReference(IMetaschemaData data) { this.__metaschemaData = data; } @@ -123,67 +148,180 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the global Flag Reference. + * + * @return the ref value + */ + @NonNull public String getRef() { return _ref; } - public void setRef(String value) { + /** + * Set the global Flag Reference. + * + * @param value + * the ref value to set + */ + public void setRef(@NonNull String value) { _ref = value; } + /** + * Get the flag Reference Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the flag Reference Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the default Flag Value. + * + * @return the default value, or {@code null} if not set + */ + @Nullable public String getDefault() { return _default; } - public void setDefault(String value) { + /** + * Set the default Flag Value. + * + * @param value + * the default value to set + */ + public void setDefault(@Nullable String value) { _default = value; } + /** + * Get the is Flag Required?. + * + * @return the required value, or {@code null} if not set + */ + @Nullable public String getRequired() { return _required; } - public void setRequired(String value) { + /** + * Set the is Flag Required?. + * + * @param value + * the required value to set + */ + public void setRequired(@Nullable String value) { _required = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -215,19 +353,57 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @return the use-name value, or {@code null} if not set + */ + @Nullable public UseName getUseName() { return _useName; } - public void setUseName(UseName value) { + /** + * Set the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @param value + * the use-name value to set + */ + public void setUseName(@Nullable UseName value) { _useName = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagReport.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagReport.java new file mode 100644 index 000000000..1687693cc --- /dev/null +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/FlagReport.java @@ -0,0 +1,360 @@ +/* + * SPDX-FileCopyrightText: none + * SPDX-License-Identifier: CC0-1.0 + */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. + +package gov.nist.secauto.metaschema.databind.model.metaschema.binding; + +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; +import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; +import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; +import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; +import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLineAdapter; +import gov.nist.secauto.metaschema.core.model.IBoundObject; +import gov.nist.secauto.metaschema.core.model.IMetaschemaData; +import gov.nist.secauto.metaschema.core.model.JsonGroupAsBehavior; +import gov.nist.secauto.metaschema.core.model.constraint.IConstraint; +import gov.nist.secauto.metaschema.core.util.ObjectUtils; +import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValue; +import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValues; +import gov.nist.secauto.metaschema.databind.model.annotations.BoundAssembly; +import gov.nist.secauto.metaschema.databind.model.annotations.BoundField; +import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; +import gov.nist.secauto.metaschema.databind.model.annotations.GroupAs; +import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; +import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; +import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; +import java.util.LinkedList; +import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +@MetaschemaAssembly( + formalName = "Report Condition Constraint", + name = "flag-report", + moduleClass = MetaschemaModelModule.class) +public class FlagReport implements IBoundObject, IConfigurableMessageConstraintBase { + private final IMetaschemaData __metaschemaData; + + @BoundFlag( + formalName = "Constraint Identifier", + name = "id", + typeAdapter = TokenAdapter.class) + private String _id; + + @BoundFlag( + formalName = "Constraint Severity Level", + name = "level", + defaultValue = "ERROR", + typeAdapter = TokenAdapter.class, + valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, values = { + @AllowedValue(value = "CRITICAL", + description = "A violation of the constraint represents a serious fault in the content that will prevent typical use of the content."), + @AllowedValue(value = "ERROR", + description = "A violation of the constraint represents a fault in the content. This may include issues around compatibility, integrity, consistency, etc."), + @AllowedValue(value = "WARNING", + description = "A violation of the constraint represents a potential issue with the content."), + @AllowedValue(value = "INFORMATIONAL", + description = "A violation of the constraint represents a point of interest."), + @AllowedValue(value = "DEBUG", + description = "A violation of the constraint represents a fault in the content that may warrant review by a developer when performing model or tool development.") }))) + private String _level; + + @BoundFlag( + formalName = "Report Test Condition", + name = "test", + required = true, + typeAdapter = StringAdapter.class) + private String _test; + + /** + * A formal name for the data construct, to be presented in documentation. + */ + @BoundField( + formalName = "Formal Name", + description = "A formal name for the data construct, to be presented in documentation.", + useName = "formal-name", + typeAdapter = StringAdapter.class) + private String _formalName; + + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ + @BoundField( + formalName = "Description", + description = "A short description of the data construct's purpose, describing the constructs semantics.", + useName = "description", + typeAdapter = MarkupLineAdapter.class) + private MarkupLine _description; + + @BoundAssembly( + formalName = "Property", + useName = "prop", + maxOccurs = -1, + groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) + private List _props; + + @BoundField( + formalName = "Constraint Condition Violation Message", + useName = "message", + typeAdapter = StringAdapter.class) + private String _message; + + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ + @BoundField( + formalName = "Remarks", + description = "Any explanatory or helpful information to be provided about the remarks parent.", + useName = "remarks") + private Remarks _remarks; + + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagReport} + * instance with no metadata. + */ + public FlagReport() { + this(null); + } + + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.FlagReport} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ + public FlagReport(IMetaschemaData data) { + this.__metaschemaData = data; + } + + @Override + public IMetaschemaData getMetaschemaData() { + return __metaschemaData; + } + + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable + public String getId() { + return _id; + } + + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { + _id = value; + } + + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable + public String getLevel() { + return _level; + } + + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { + _level = value; + } + + /** + * Get the report Test Condition. + * + * @return the test value + */ + @NonNull + public String getTest() { + return _test; + } + + /** + * Set the report Test Condition. + * + * @param value + * the test value to set + */ + public void setTest(@NonNull String value) { + _test = value; + } + + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable + public String getFormalName() { + return _formalName; + } + + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { + _formalName = value; + } + + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable + public MarkupLine getDescription() { + return _description; + } + + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { + _description = value; + } + + /** + * Get the property. + * + * @return the prop value + */ + @NonNull + public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } + return _props; + } + + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { + _props = value; + } + + /** + * Add a new {@link Property} item to the underlying collection. + * + * @param item + * the item to add + * @return {@code true} + */ + public boolean addProp(Property item) { + Property value = ObjectUtils.requireNonNull(item, "item cannot be null"); + if (_props == null) { + _props = new LinkedList<>(); + } + return _props.add(value); + } + + /** + * Remove the first matching {@link Property} item from the underlying + * collection. + * + * @param item + * the item to remove + * @return {@code true} if the item was removed or {@code false} otherwise + */ + public boolean removeProp(Property item) { + Property value = ObjectUtils.requireNonNull(item, "item cannot be null"); + return _props != null && _props.remove(value); + } + + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable + public String getMessage() { + return _message; + } + + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { + _message = value; + } + + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable + public Remarks getRemarks() { + return _remarks; + } + + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { + _remarks = value; + } + + @Override + public String toString() { + return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString(); + } +} diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/GroupingAs.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/GroupingAs.java index a961237be..175e6d672 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/GroupingAs.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/GroupingAs.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; @@ -14,14 +18,9 @@ import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Group As", name = "group-as", @@ -59,10 +58,23 @@ public class GroupingAs implements IBoundObject { @AllowedValue(value = "UNGROUPED", description = "Do not use a wrapper element.") }))) private String _inXml; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.GroupingAs} + * instance with no metadata. + */ public GroupingAs() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.GroupingAs} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public GroupingAs(IMetaschemaData data) { this.__metaschemaData = data; } @@ -72,27 +84,63 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the grouping Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the grouping Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the in JSON Grouping Syntax. + * + * @return the in-json value, or {@code null} if not set + */ + @Nullable public String getInJson() { return _inJson; } - public void setInJson(String value) { + /** + * Set the in JSON Grouping Syntax. + * + * @param value + * the in-json value to set + */ + public void setInJson(@Nullable String value) { _inJson = value; } + /** + * Get the in XML Grouping Syntax. + * + * @return the in-xml value, or {@code null} if not set + */ + @Nullable public String getInXml() { return _inXml; } - public void setInXml(String value) { + /** + * Set the in XML Grouping Syntax. + * + * @param value + * the in-xml value to set + */ + public void setInXml(@Nullable String value) { _inXml = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineAssembly.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineAssembly.java index d55321107..ebc4f0e67 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineAssembly.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineAssembly.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.NonNegativeIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.PositiveIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; @@ -25,18 +29,12 @@ import gov.nist.secauto.metaschema.databind.model.annotations.Matches; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.math.BigInteger; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Inline Assembly Definition", name = "inline-define-assembly", @@ -79,6 +77,9 @@ public class InlineDefineAssembly implements IBoundObject { matches = @Matches(level = IConstraint.Level.ERROR, pattern = "^[1-9][0-9]*|unbounded$"))) private String _maxOccurs; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -86,6 +87,10 @@ public class InlineDefineAssembly implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -100,6 +105,11 @@ public class InlineDefineAssembly implements IBoundObject { groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) private List _props; + /** + * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + */ @BoundAssembly( formalName = "JSON Key", description = "Used in JSON (and similar formats) to identify a flag that will be used as the property name in an object hold a collection of sibling objects. Requires that siblings must never share `json-key` values.", @@ -113,17 +123,13 @@ public class InlineDefineAssembly implements IBoundObject { @BoundChoiceGroup( maxOccurs = -1, + groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST), assemblies = { - @BoundGroupedAssembly(formalName = "Inline Flag Definition", - useName = "define-flag", - discriminatorValue = "flag", - binding = InlineDefineFlag.class), - @BoundGroupedAssembly(formalName = "Flag Reference", - useName = "flag", - discriminatorValue = "flag-ref", + @BoundGroupedAssembly(formalName = "Inline Flag Definition", useName = "define-flag", + discriminatorValue = "flag", binding = InlineDefineFlag.class), + @BoundGroupedAssembly(formalName = "Flag Reference", useName = "flag", discriminatorValue = "flag-ref", binding = FlagReference.class) - }, - groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST)) + }) private List _flags; @BoundAssembly( @@ -134,6 +140,10 @@ public class InlineDefineAssembly implements IBoundObject { useName = "constraint") private AssemblyConstraints _constraint; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", @@ -147,10 +157,23 @@ public class InlineDefineAssembly implements IBoundObject { groupAs = @GroupAs(name = "examples", inJson = JsonGroupAsBehavior.LIST)) private List _examples; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.InlineDefineAssembly} + * instance with no metadata. + */ public InlineDefineAssembly() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.InlineDefineAssembly} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public InlineDefineAssembly(IMetaschemaData data) { this.__metaschemaData = data; } @@ -160,67 +183,180 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the inline Assembly Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the inline Assembly Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the inline Assembly Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the inline Assembly Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the minimum Occurrence. + * + * @return the min-occurs value, or {@code null} if not set + */ + @Nullable public BigInteger getMinOccurs() { return _minOccurs; } - public void setMinOccurs(BigInteger value) { + /** + * Set the minimum Occurrence. + * + * @param value + * the min-occurs value to set + */ + public void setMinOccurs(@Nullable BigInteger value) { _minOccurs = value; } + /** + * Get the maximum Occurrence. + * + * @return the max-occurs value, or {@code null} if not set + */ + @Nullable public String getMaxOccurs() { return _maxOccurs; } - public void setMaxOccurs(String value) { + /** + * Set the maximum Occurrence. + * + * @param value + * the max-occurs value to set + */ + public void setMaxOccurs(@Nullable String value) { _maxOccurs = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -252,59 +388,167 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the jSON Key. + * + *

+ * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + * + * @return the json-key value, or {@code null} if not set + */ + @Nullable public JsonKey getJsonKey() { return _jsonKey; } - public void setJsonKey(JsonKey value) { + /** + * Set the jSON Key. + * + *

+ * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + * + * @param value + * the json-key value to set + */ + public void setJsonKey(@Nullable JsonKey value) { _jsonKey = value; } + /** + * Get the group As. + * + * @return the group-as value, or {@code null} if not set + */ + @Nullable public GroupingAs getGroupAs() { return _groupAs; } - public void setGroupAs(GroupingAs value) { + /** + * Set the group As. + * + * @param value + * the group-as value to set + */ + public void setGroupAs(@Nullable GroupingAs value) { _groupAs = value; } + /** + * Get the {@code flags} choice group items. + * + * @return the flags items + */ + @NonNull public List getFlags() { + if (_flags == null) { + _flags = new LinkedList<>(); + } return _flags; } - public void setFlags(List value) { + /** + * Set the {@code flags} choice group items. + * + * @param value + * the flags items to set + */ + public void setFlags(@NonNull List value) { _flags = value; } + /** + * Get the {@code model} property. + * + * @return the model value, or {@code null} if not set + */ + @Nullable public AssemblyModel getModel() { return _model; } - public void setModel(AssemblyModel value) { + /** + * Set the {@code model} property. + * + * @param value + * the model value to set + */ + public void setModel(@Nullable AssemblyModel value) { _model = value; } + /** + * Get the {@code constraint} property. + * + * @return the constraint value, or {@code null} if not set + */ + @Nullable public AssemblyConstraints getConstraint() { return _constraint; } - public void setConstraint(AssemblyConstraints value) { + /** + * Set the {@code constraint} property. + * + * @param value + * the constraint value to set + */ + public void setConstraint(@Nullable AssemblyConstraints value) { _constraint = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } + /** + * Get the example. + * + * @return the example value + */ + @NonNull public List getExamples() { + if (_examples == null) { + _examples = new LinkedList<>(); + } return _examples; } - public void setExamples(List value) { + /** + * Set the example. + * + * @param value + * the example value to set + */ + public void setExamples(@NonNull List value) { _examples = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineField.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineField.java index b13c9d8d7..52de44759 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineField.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineField.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.NonNegativeIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.PositiveIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; @@ -27,19 +31,12 @@ import gov.nist.secauto.metaschema.databind.model.annotations.Matches; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.math.BigInteger; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions", - "PMD.TooManyFields" -}) @MetaschemaAssembly( formalName = "Inline Field Definition", name = "inline-define-field", @@ -74,61 +71,67 @@ public class InlineDefineField implements IBoundObject { valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = { @AllowedValue(value = "markup-line", - description = "The [markup-line](https://pages.nist.gov/metaschema/specification/datatypes/#markup-line) data type."), + description = "The [markup-line](https://framework.metaschema.dev/specification/datatypes/#markup-line) data type."), @AllowedValue(value = "markup-multiline", - description = "The [markup-multiline](https://pages.nist.gov/metaschema/specification/datatypes/#markup-multiline) data type."), + description = "The [markup-multiline](https://framework.metaschema.dev/specification/datatypes/#markup-multiline) data type."), @AllowedValue(value = "base64", - description = "The [base64](https://pages.nist.gov/metaschema/specification/datatypes/#base64) data type."), + description = "The [base64](https://framework.metaschema.dev/specification/datatypes/#base64) data type."), @AllowedValue(value = "boolean", - description = "The [boolean](https://pages.nist.gov/metaschema/specification/datatypes/#boolean) data type."), + description = "The [boolean](https://framework.metaschema.dev/specification/datatypes/#boolean) data type."), @AllowedValue(value = "date", - description = "The [date](https://pages.nist.gov/metaschema/specification/datatypes/#date) data type."), + description = "The [date](https://framework.metaschema.dev/specification/datatypes/#date) data type."), @AllowedValue(value = "date-time", - description = "The [date-time](https://pages.nist.gov/metaschema/specification/datatypes/#date-time) data type."), + description = "The [date-time](https://framework.metaschema.dev/specification/datatypes/#date-time) data type."), @AllowedValue(value = "date-time-with-timezone", - description = "The [date-time-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-time-with-timezone) data type."), + description = "The [date-time-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-time-with-timezone) data type."), @AllowedValue(value = "date-with-timezone", - description = "The [date-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-with-timezone) data type."), + description = "The [date-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-with-timezone) data type."), @AllowedValue(value = "day-time-duration", - description = "The [day-time-duration](https://pages.nist.gov/metaschema/specification/datatypes/#day-time-duration) data type."), + description = "The [day-time-duration](https://framework.metaschema.dev/specification/datatypes/#day-time-duration) data type."), @AllowedValue(value = "decimal", - description = "The [decimal](https://pages.nist.gov/metaschema/specification/datatypes/#decimal) data type."), + description = "The [decimal](https://framework.metaschema.dev/specification/datatypes/#decimal) data type."), @AllowedValue(value = "email-address", - description = "The [email-address](https://pages.nist.gov/metaschema/specification/datatypes/#email-address) data type."), + description = "The [email-address](https://framework.metaschema.dev/specification/datatypes/#email-address) data type."), @AllowedValue(value = "hostname", - description = "The [hostname](https://pages.nist.gov/metaschema/specification/datatypes/#hostname) data type."), + description = "The [hostname](https://framework.metaschema.dev/specification/datatypes/#hostname) data type."), @AllowedValue(value = "integer", - description = "The [integer](https://pages.nist.gov/metaschema/specification/datatypes/#integer) data type."), + description = "The [integer](https://framework.metaschema.dev/specification/datatypes/#integer) data type."), @AllowedValue(value = "ip-v4-address", - description = "The [ip-v4-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v4-address) data type."), + description = "The [ip-v4-address](https://framework.metaschema.dev/specification/datatypes/#ip-v4-address) data type."), @AllowedValue(value = "ip-v6-address", - description = "The [ip-v6-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v6-address) data type."), + description = "The [ip-v6-address](https://framework.metaschema.dev/specification/datatypes/#ip-v6-address) data type."), @AllowedValue(value = "non-negative-integer", - description = "The [non-negative-integer](https://pages.nist.gov/metaschema/specification/datatypes/#non-negative-integer) data type."), + description = "The [non-negative-integer](https://framework.metaschema.dev/specification/datatypes/#non-negative-integer) data type."), @AllowedValue(value = "positive-integer", - description = "The [positive-integer](https://pages.nist.gov/metaschema/specification/datatypes/#positive-integer) data type."), + description = "The [positive-integer](https://framework.metaschema.dev/specification/datatypes/#positive-integer) data type."), @AllowedValue(value = "string", - description = "The [string](https://pages.nist.gov/metaschema/specification/datatypes/#string) data type."), + description = "The [string](https://framework.metaschema.dev/specification/datatypes/#string) data type."), @AllowedValue(value = "token", - description = "The [token](https://pages.nist.gov/metaschema/specification/datatypes/#token) data type."), + description = "The [token](https://framework.metaschema.dev/specification/datatypes/#token) data type."), @AllowedValue(value = "uri", - description = "The [uri](https://pages.nist.gov/metaschema/specification/datatypes/#uri) data type."), + description = "The [uri](https://framework.metaschema.dev/specification/datatypes/#uri) data type."), @AllowedValue(value = "uri-reference", - description = "The [uri-reference](https://pages.nist.gov/metaschema/specification/datatypes/#uri-reference) data type."), + description = "The [uri-reference](https://framework.metaschema.dev/specification/datatypes/#uri-reference) data type."), @AllowedValue(value = "uuid", - description = "The [uuid](https://pages.nist.gov/metaschema/specification/datatypes/#uuid) data type."), + description = "The [uuid](https://framework.metaschema.dev/specification/datatypes/#uuid) data type."), @AllowedValue(value = "base64Binary", - description = "An old name which is deprecated for use in favor of the 'base64' data type."), + description = "An old name which is deprecated for use in favor of the 'base64' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime", - description = "An old name which is deprecated for use in favor of the 'date-time' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime-with-timezone", - description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "email", - description = "An old name which is deprecated for use in favor of the 'email-address' data type."), + description = "An old name which is deprecated for use in favor of the 'email-address' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "nonNegativeInteger", - description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type."), + description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "positiveInteger", - description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.") }))) + description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.", + deprecatedVersion = "1.0.0") }))) private String _asType; @BoundFlag( @@ -163,9 +166,12 @@ public class InlineDefineField implements IBoundObject { description = "Block contents of a markup-multiline field will be represented with a containing (wrapper) element in the XML."), @AllowedValue(value = "UNWRAPPED", description = "Block contents of a markup-multiline will be represented in the XML with no wrapper, making the field implicit. Among sibling fields in a given model, only one of them may be designated as UNWRAPPED."), - @AllowedValue(value = "WITH_WRAPPER", description = "Alias for WRAPPED.") }))) + @AllowedValue(value = "WITH_WRAPPER", description = "Alias for WRAPPED.", deprecatedVersion = "0.9.0") }))) private String _inXml; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -173,6 +179,10 @@ public class InlineDefineField implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -187,6 +197,11 @@ public class InlineDefineField implements IBoundObject { groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) private List _props; + /** + * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + */ @BoundAssembly( formalName = "JSON Key", description = "Used in JSON (and similar formats) to identify a flag that will be used as the property name in an object hold a collection of sibling objects. Requires that siblings must never share `json-key` values.", @@ -211,23 +226,23 @@ public class InlineDefineField implements IBoundObject { @BoundChoiceGroup( maxOccurs = -1, + groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST), assemblies = { - @BoundGroupedAssembly(formalName = "Inline Flag Definition", - useName = "define-flag", - discriminatorValue = "flag", - binding = InlineDefineFlag.class), - @BoundGroupedAssembly(formalName = "Flag Reference", - useName = "flag", - discriminatorValue = "flag-ref", + @BoundGroupedAssembly(formalName = "Inline Flag Definition", useName = "define-flag", + discriminatorValue = "flag", binding = InlineDefineFlag.class), + @BoundGroupedAssembly(formalName = "Flag Reference", useName = "flag", discriminatorValue = "flag-ref", binding = FlagReference.class) - }, - groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST)) + }) private List _flags; @BoundAssembly( useName = "constraint") private FieldConstraints _constraint; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", @@ -241,10 +256,23 @@ public class InlineDefineField implements IBoundObject { groupAs = @GroupAs(name = "examples", inJson = JsonGroupAsBehavior.LIST)) private List _examples; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.InlineDefineField} + * instance with no metadata. + */ public InlineDefineField() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.InlineDefineField} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public InlineDefineField(IMetaschemaData data) { this.__metaschemaData = data; } @@ -254,91 +282,240 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the inline Field Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the inline Field Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the inline Field Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the inline Field Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the field Value Data Type. + * + * @return the as-type value, or {@code null} if not set + */ + @Nullable public String getAsType() { return _asType; } - public void setAsType(String value) { + /** + * Set the field Value Data Type. + * + * @param value + * the as-type value to set + */ + public void setAsType(@Nullable String value) { _asType = value; } + /** + * Get the default Field Value. + * + * @return the default value, or {@code null} if not set + */ + @Nullable public String getDefault() { return _default; } - public void setDefault(String value) { + /** + * Set the default Field Value. + * + * @param value + * the default value to set + */ + public void setDefault(@Nullable String value) { _default = value; } + /** + * Get the minimum Occurrence. + * + * @return the min-occurs value, or {@code null} if not set + */ + @Nullable public BigInteger getMinOccurs() { return _minOccurs; } - public void setMinOccurs(BigInteger value) { + /** + * Set the minimum Occurrence. + * + * @param value + * the min-occurs value to set + */ + public void setMinOccurs(@Nullable BigInteger value) { _minOccurs = value; } + /** + * Get the maximum Occurrence. + * + * @return the max-occurs value, or {@code null} if not set + */ + @Nullable public String getMaxOccurs() { return _maxOccurs; } - public void setMaxOccurs(String value) { + /** + * Set the maximum Occurrence. + * + * @param value + * the max-occurs value to set + */ + public void setMaxOccurs(@Nullable String value) { _maxOccurs = value; } + /** + * Get the field In XML. + * + * @return the in-xml value, or {@code null} if not set + */ + @Nullable public String getInXml() { return _inXml; } - public void setInXml(String value) { + /** + * Set the field In XML. + * + * @param value + * the in-xml value to set + */ + public void setInXml(@Nullable String value) { _inXml = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -370,67 +547,187 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the jSON Key. + * + *

+ * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + * + * @return the json-key value, or {@code null} if not set + */ + @Nullable public JsonKey getJsonKey() { return _jsonKey; } - public void setJsonKey(JsonKey value) { + /** + * Set the jSON Key. + * + *

+ * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + * + * @param value + * the json-key value to set + */ + public void setJsonKey(@Nullable JsonKey value) { _jsonKey = value; } + /** + * Get the field Value JSON Property Name. + * + * @return the json-value-key value, or {@code null} if not set + */ + @Nullable public String getJsonValueKey() { return _jsonValueKey; } - public void setJsonValueKey(String value) { + /** + * Set the field Value JSON Property Name. + * + * @param value + * the json-value-key value to set + */ + public void setJsonValueKey(@Nullable String value) { _jsonValueKey = value; } + /** + * Get the flag Used as the Field Value's JSON Property Name. + * + * @return the json-value-key-flag value, or {@code null} if not set + */ + @Nullable public JsonValueKeyFlag getJsonValueKeyFlag() { return _jsonValueKeyFlag; } - public void setJsonValueKeyFlag(JsonValueKeyFlag value) { + /** + * Set the flag Used as the Field Value's JSON Property Name. + * + * @param value + * the json-value-key-flag value to set + */ + public void setJsonValueKeyFlag(@Nullable JsonValueKeyFlag value) { _jsonValueKeyFlag = value; } + /** + * Get the group As. + * + * @return the group-as value, or {@code null} if not set + */ + @Nullable public GroupingAs getGroupAs() { return _groupAs; } - public void setGroupAs(GroupingAs value) { + /** + * Set the group As. + * + * @param value + * the group-as value to set + */ + public void setGroupAs(@Nullable GroupingAs value) { _groupAs = value; } + /** + * Get the {@code flags} choice group items. + * + * @return the flags items + */ + @NonNull public List getFlags() { + if (_flags == null) { + _flags = new LinkedList<>(); + } return _flags; } - public void setFlags(List value) { + /** + * Set the {@code flags} choice group items. + * + * @param value + * the flags items to set + */ + public void setFlags(@NonNull List value) { _flags = value; } + /** + * Get the {@code constraint} property. + * + * @return the constraint value, or {@code null} if not set + */ + @Nullable public FieldConstraints getConstraint() { return _constraint; } - public void setConstraint(FieldConstraints value) { + /** + * Set the {@code constraint} property. + * + * @param value + * the constraint value to set + */ + public void setConstraint(@Nullable FieldConstraints value) { _constraint = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } + /** + * Get the example. + * + * @return the example value + */ + @NonNull public List getExamples() { + if (_examples == null) { + _examples = new LinkedList<>(); + } return _examples; } - public void setExamples(List value) { + /** + * Set the example. + * + * @param value + * the example value to set + */ + public void setExamples(@NonNull List value) { _examples = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineFlag.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineFlag.java index c76fcf30a..5ec57c843 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineFlag.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/InlineDefineFlag.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.PositiveIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; @@ -23,18 +27,12 @@ import gov.nist.secauto.metaschema.databind.model.annotations.GroupAs; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.math.BigInteger; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Inline Flag Definition", name = "inline-define-flag", @@ -69,57 +67,63 @@ public class InlineDefineFlag implements IBoundObject { valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = { @AllowedValue(value = "base64", - description = "The [base64](https://pages.nist.gov/metaschema/specification/datatypes/#base64) data type."), + description = "The [base64](https://framework.metaschema.dev/specification/datatypes/#base64) data type."), @AllowedValue(value = "boolean", - description = "The [boolean](https://pages.nist.gov/metaschema/specification/datatypes/#boolean) data type."), + description = "The [boolean](https://framework.metaschema.dev/specification/datatypes/#boolean) data type."), @AllowedValue(value = "date", - description = "The [date](https://pages.nist.gov/metaschema/specification/datatypes/#date) data type."), + description = "The [date](https://framework.metaschema.dev/specification/datatypes/#date) data type."), @AllowedValue(value = "date-time", - description = "The [date-time](https://pages.nist.gov/metaschema/specification/datatypes/#date-time) data type."), + description = "The [date-time](https://framework.metaschema.dev/specification/datatypes/#date-time) data type."), @AllowedValue(value = "date-time-with-timezone", - description = "The [date-time-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-time-with-timezone) data type."), + description = "The [date-time-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-time-with-timezone) data type."), @AllowedValue(value = "date-with-timezone", - description = "The [date-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-with-timezone) data type."), + description = "The [date-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-with-timezone) data type."), @AllowedValue(value = "day-time-duration", - description = "The [day-time-duration](https://pages.nist.gov/metaschema/specification/datatypes/#day-time-duration) data type."), + description = "The [day-time-duration](https://framework.metaschema.dev/specification/datatypes/#day-time-duration) data type."), @AllowedValue(value = "decimal", - description = "The [decimal](https://pages.nist.gov/metaschema/specification/datatypes/#decimal) data type."), + description = "The [decimal](https://framework.metaschema.dev/specification/datatypes/#decimal) data type."), @AllowedValue(value = "email-address", - description = "The [email-address](https://pages.nist.gov/metaschema/specification/datatypes/#email-address) data type."), + description = "The [email-address](https://framework.metaschema.dev/specification/datatypes/#email-address) data type."), @AllowedValue(value = "hostname", - description = "The [hostname](https://pages.nist.gov/metaschema/specification/datatypes/#hostname) data type."), + description = "The [hostname](https://framework.metaschema.dev/specification/datatypes/#hostname) data type."), @AllowedValue(value = "integer", - description = "The [integer](https://pages.nist.gov/metaschema/specification/datatypes/#integer) data type."), + description = "The [integer](https://framework.metaschema.dev/specification/datatypes/#integer) data type."), @AllowedValue(value = "ip-v4-address", - description = "The [ip-v4-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v4-address) data type."), + description = "The [ip-v4-address](https://framework.metaschema.dev/specification/datatypes/#ip-v4-address) data type."), @AllowedValue(value = "ip-v6-address", - description = "The [ip-v6-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v6-address) data type."), + description = "The [ip-v6-address](https://framework.metaschema.dev/specification/datatypes/#ip-v6-address) data type."), @AllowedValue(value = "non-negative-integer", - description = "The [non-negative-integer](https://pages.nist.gov/metaschema/specification/datatypes/#non-negative-integer) data type."), + description = "The [non-negative-integer](https://framework.metaschema.dev/specification/datatypes/#non-negative-integer) data type."), @AllowedValue(value = "positive-integer", - description = "The [positive-integer](https://pages.nist.gov/metaschema/specification/datatypes/#positive-integer) data type."), + description = "The [positive-integer](https://framework.metaschema.dev/specification/datatypes/#positive-integer) data type."), @AllowedValue(value = "string", - description = "The [string](https://pages.nist.gov/metaschema/specification/datatypes/#string) data type."), + description = "The [string](https://framework.metaschema.dev/specification/datatypes/#string) data type."), @AllowedValue(value = "token", - description = "The [token](https://pages.nist.gov/metaschema/specification/datatypes/#token) data type."), + description = "The [token](https://framework.metaschema.dev/specification/datatypes/#token) data type."), @AllowedValue(value = "uri", - description = "The [uri](https://pages.nist.gov/metaschema/specification/datatypes/#uri) data type."), + description = "The [uri](https://framework.metaschema.dev/specification/datatypes/#uri) data type."), @AllowedValue(value = "uri-reference", - description = "The [uri-reference](https://pages.nist.gov/metaschema/specification/datatypes/#uri-reference) data type."), + description = "The [uri-reference](https://framework.metaschema.dev/specification/datatypes/#uri-reference) data type."), @AllowedValue(value = "uuid", - description = "The [uuid](https://pages.nist.gov/metaschema/specification/datatypes/#uuid) data type."), + description = "The [uuid](https://framework.metaschema.dev/specification/datatypes/#uuid) data type."), @AllowedValue(value = "base64Binary", - description = "An old name which is deprecated for use in favor of the 'base64' data type."), + description = "An old name which is deprecated for use in favor of the 'base64' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime", - description = "An old name which is deprecated for use in favor of the 'date-time' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime-with-timezone", - description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "email", - description = "An old name which is deprecated for use in favor of the 'email-address' data type."), + description = "An old name which is deprecated for use in favor of the 'email-address' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "nonNegativeInteger", - description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type."), + description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "positiveInteger", - description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.") }))) + description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.", + deprecatedVersion = "1.0.0") }))) private String _asType; @BoundFlag( @@ -138,6 +142,9 @@ public class InlineDefineFlag implements IBoundObject { @AllowedValue(value = "no", description = "The flag is optional.") }))) private String _required; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -145,6 +152,10 @@ public class InlineDefineFlag implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -163,6 +174,10 @@ public class InlineDefineFlag implements IBoundObject { useName = "constraint") private FlagConstraints _constraint; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", @@ -176,10 +191,23 @@ public class InlineDefineFlag implements IBoundObject { groupAs = @GroupAs(name = "examples", inJson = JsonGroupAsBehavior.LIST)) private List _examples; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.InlineDefineFlag} + * instance with no metadata. + */ public InlineDefineFlag() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.InlineDefineFlag} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public InlineDefineFlag(IMetaschemaData data) { this.__metaschemaData = data; } @@ -189,75 +217,200 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the inline Flag Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the inline Flag Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the inline Flag Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the inline Flag Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the flag Value Data Type. + * + * @return the as-type value, or {@code null} if not set + */ + @Nullable public String getAsType() { return _asType; } - public void setAsType(String value) { + /** + * Set the flag Value Data Type. + * + * @param value + * the as-type value to set + */ + public void setAsType(@Nullable String value) { _asType = value; } + /** + * Get the default Flag Value. + * + * @return the default value, or {@code null} if not set + */ + @Nullable public String getDefault() { return _default; } - public void setDefault(String value) { + /** + * Set the default Flag Value. + * + * @param value + * the default value to set + */ + public void setDefault(@Nullable String value) { _default = value; } + /** + * Get the is Flag Required?. + * + * @return the required value, or {@code null} if not set + */ + @Nullable public String getRequired() { return _required; } - public void setRequired(String value) { + /** + * Set the is Flag Required?. + * + * @param value + * the required value to set + */ + public void setRequired(@Nullable String value) { _required = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -289,27 +442,74 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the {@code constraint} property. + * + * @return the constraint value, or {@code null} if not set + */ + @Nullable public FlagConstraints getConstraint() { return _constraint; } - public void setConstraint(FlagConstraints value) { + /** + * Set the {@code constraint} property. + * + * @param value + * the constraint value to set + */ + public void setConstraint(@Nullable FlagConstraints value) { _constraint = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } + /** + * Get the example. + * + * @return the example value + */ + @NonNull public List getExamples() { + if (_examples == null) { + _examples = new LinkedList<>(); + } return _examples; } - public void setExamples(List value) { + /** + * Set the example. + * + * @param value + * the example value to set + */ + public void setExamples(@NonNull List value) { _examples = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/JsonKey.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/JsonKey.java index 01f3182ca..6f1b8e2ac 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/JsonKey.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/JsonKey.java @@ -2,15 +2,17 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; - import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -19,10 +21,6 @@ * the property name in an object hold a collection of sibling objects. Requires * that siblings must never share json-key values. */ -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "JSON Key", description = "Used in JSON (and similar formats) to identify a flag that will be used as the property name in an object hold a collection of sibling objects. Requires that siblings must never share `json-key` values.", @@ -32,7 +30,7 @@ public class JsonKey implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * "References the flag that will serve as the JSON key." + * References the flag that will serve as the JSON key. */ @BoundFlag( formalName = "JSON Key Flag Reference", @@ -42,10 +40,23 @@ public class JsonKey implements IBoundObject { typeAdapter = TokenAdapter.class) private String _flagRef; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.JsonKey} + * instance with no metadata. + */ public JsonKey() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.JsonKey} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public JsonKey(IMetaschemaData data) { this.__metaschemaData = data; } @@ -55,11 +66,29 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the jSON Key Flag Reference. + * + *

+ * References the flag that will serve as the JSON key. + * + * @return the flag-ref value + */ + @NonNull public String getFlagRef() { return _flagRef; } - public void setFlagRef(String value) { + /** + * Set the jSON Key Flag Reference. + * + *

+ * References the flag that will serve as the JSON key. + * + * @param value + * the flag-ref value to set + */ + public void setFlagRef(@NonNull String value) { _flagRef = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/JsonValueKeyFlag.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/JsonValueKeyFlag.java index 7c13b1066..f8a51f5f6 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/JsonValueKeyFlag.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/JsonValueKeyFlag.java @@ -2,22 +2,20 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; - import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Flag Used as the Field Value's JSON Property Name", name = "json-value-key-flag", @@ -32,10 +30,23 @@ public class JsonValueKeyFlag implements IBoundObject { typeAdapter = TokenAdapter.class) private String _flagRef; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.JsonValueKeyFlag} + * instance with no metadata. + */ public JsonValueKeyFlag() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.JsonValueKeyFlag} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public JsonValueKeyFlag(IMetaschemaData data) { this.__metaschemaData = data; } @@ -45,11 +56,23 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the flag Reference. + * + * @return the flag-ref value + */ + @NonNull public String getFlagRef() { return _flagRef; } - public void setFlagRef(String value) { + /** + * Set the flag Reference. + * + * @param value + * the flag-ref value to set + */ + public void setFlagRef(@NonNull String value) { _flagRef = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/KeyConstraintField.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/KeyConstraintField.java index f2ad2b6aa..469699982 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/KeyConstraintField.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/KeyConstraintField.java @@ -2,23 +2,22 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.databind.model.annotations.BoundField; import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; - import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Key Constraint", name = "key-constraint-field", @@ -39,16 +38,33 @@ public class KeyConstraintField implements IBoundObject { typeAdapter = StringAdapter.class) private String _pattern; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.KeyConstraintField} + * instance with no metadata. + */ public KeyConstraintField() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.KeyConstraintField} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public KeyConstraintField(IMetaschemaData data) { this.__metaschemaData = data; } @@ -58,27 +74,71 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the key Field Value Target. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the key Field Value Target. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } + /** + * Get the key Field Value Pattern. + * + * @return the pattern value, or {@code null} if not set + */ + @Nullable public String getPattern() { return _pattern; } - public void setPattern(String value) { + /** + * Set the key Field Value Pattern. + * + * @param value + * the pattern value to set + */ + public void setPattern(@Nullable String value) { _pattern = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/METASCHEMA.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/METASCHEMA.java index a01c05c7e..fe53c01b0 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/METASCHEMA.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/METASCHEMA.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.NonNegativeIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.PositiveIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; @@ -35,25 +39,16 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaField; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.math.BigInteger; import java.net.URI; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; /** * A declaration of the Metaschema module. */ -@SuppressWarnings({ - "PMD.CouplingBetweenObjects", - "PMD.DataClass", - "PMD.ExcessivePublicCount", - "PMD.FieldNamingConventions", - "PMD.TooManyFields" -}) @MetaschemaAssembly( formalName = "Metaschema Module", description = "A declaration of the Metaschema module.", @@ -65,15 +60,12 @@ 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 = IConstraint.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", + 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 = IConstraint.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 = IConstraint.Level.WARNING, target = ".[not(@abstract) or @abstract='no']", test = "exists($all-imports/define-assembly/root-name)", @@ -81,11 +73,16 @@ @Expect(id = "module-import-href-available", formalName = "Import is Resolvable", description = "Ensure each import has a resolvable @href.", level = IConstraint.Level.ERROR, target = "import", test = "doc-available(resolve-uri(@href))", - message = "Unable to access a Metaschema module at '{{ 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 = IConstraint.Level.ERROR, target = "import", test = "doc(resolve-uri(@href))/METASCHEMA ! exists(.)", - message = "Unable the resource at '{{ resolve-uri(@href) }}' is not a Metaschema module."), + message = "The resource at '{ resolve-uri(@href) }' is not a Metaschema module."), + @Expect(id = "module-model-group-a-invalid", formalName = "Group-As unneeded with max-occurs='1'", + description = "A field or assembly instance with a max occurrence of \\`1\\` must not have a \\`group-as\\` child.", + level = IConstraint.Level.ERROR, + target = ".//(define-assembly|define-field|assembly|field)[@max-occurs=1]", test = ".[not(group-as)]", + message = "Use of `group-as` in the location '{ path() }' requires a parent with a max-occurs that is greater than 1; otherwise the `group-as` needs to be removed."), @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 = IConstraint.Level.WARNING, @@ -93,7 +90,7 @@ 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.") }), modelConstraints = @gov.nist.secauto.metaschema.databind.model.annotations.AssemblyConstraints( - index = @Index(id = "module-short-name-unique", formalName = "Unique Module Short Names", + 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 = IConstraint.Level.ERROR, target = "(.|$all-imports)", name = "metaschema-metadata-short-name-index", keyFields = @KeyField(target = "@short-name")), @@ -108,7 +105,8 @@ public class METASCHEMA implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * Determines if the Metaschema module is abstract ("yes") or not ("no"). + * Determines if the Metaschema module is abstract (‘yes’) or not + * (‘no’). */ @BoundFlag( formalName = "Is Abstract?", @@ -121,6 +119,9 @@ public class METASCHEMA implements IBoundObject { @AllowedValue(value = "no", description = "The module is not abstract.") }))) private String _abstract; + /** + * The name of the information model represented by this Metaschema definition. + */ @BoundField( formalName = "Module Name", description = "The name of the information model represented by this Metaschema definition.", @@ -129,6 +130,10 @@ public class METASCHEMA implements IBoundObject { typeAdapter = MarkupLineAdapter.class) private MarkupLine _schemaName; + /** + * A version string used to distinguish between multiple revisions of the same + * Metaschema module. + */ @BoundField( description = "A version string used to distinguish between multiple revisions of the same Metaschema module.", useName = "schema-version", @@ -136,6 +141,11 @@ public class METASCHEMA implements IBoundObject { typeAdapter = StringAdapter.class) private String _schemaVersion; + /** + * A short (code) name to be used for the Metaschema module. This name may be + * used as a constituent of names assigned to derived artifacts, such as schemas + * and conversion utilities. + */ @BoundField( formalName = "Module Short Name", description = "A short (code) name to be used for the Metaschema module. This name may be used as a constituent of names assigned to derived artifacts, such as schemas and conversion utilities.", @@ -144,6 +154,14 @@ public class METASCHEMA implements IBoundObject { typeAdapter = TokenAdapter.class) private String _shortName; + /** + * The namespace for the collection of Metaschema module this Metaschema module + * belongs to. This value is also used as the XML namespace governing the names + * of elements in XML documents. By using this namespace, documents and document + * fragments used in mixed-format environments may be distinguished from + * neighbor XML formats using another namespaces. This value is not reflected in + * Metaschema JSON. + */ @BoundField( formalName = "Module Collection Namespace", description = "The namespace for the collection of Metaschema module this Metaschema module belongs to. This value is also used as the XML namespace governing the names of elements in XML documents. By using this namespace, documents and document fragments used in mixed-format environments may be distinguished from neighbor XML formats using another namespaces. This value is not reflected in Metaschema JSON.", @@ -152,6 +170,10 @@ public class METASCHEMA implements IBoundObject { typeAdapter = UriAdapter.class) private URI _namespace; + /** + * The JSON Base URI is the nominal base URI assigned to a JSON Schema instance + * expressing the model defined by this Metaschema module. + */ @BoundField( formalName = "JSON Base URI", description = "The JSON Base URI is the nominal base URI assigned to a JSON Schema instance expressing the model defined by this Metaschema module.", @@ -160,12 +182,20 @@ public class METASCHEMA implements IBoundObject { typeAdapter = UriAdapter.class) private URI _jsonBaseUri; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Imports a set of Metaschema modules contained in another resource. Imports + * support the reuse of common information structures. + */ @BoundAssembly( formalName = "Module Import", description = "Imports a set of Metaschema modules contained in another resource. Imports support the reuse of common information structures.", @@ -174,38 +204,49 @@ public class METASCHEMA implements IBoundObject { groupAs = @GroupAs(name = "imports", inJson = JsonGroupAsBehavior.LIST)) private List _imports; + /** + * Assigns a Metapath namespace to a prefix for use in a Metapath expression in + * a lexical qualified name. + */ @BoundAssembly( formalName = "Metapath Namespace Declaration", description = "Assigns a Metapath namespace to a prefix for use in a Metapath expression in a lexical qualified name.", useName = "namespace-binding", maxOccurs = -1, - groupAs = @GroupAs(name = "namespace-bindings")) + groupAs = @GroupAs(name = "namespace-bindings", inJson = JsonGroupAsBehavior.LIST)) private List _namespaceBindings; @BoundChoiceGroup( maxOccurs = -1, + groupAs = @GroupAs(name = "definitions", inJson = JsonGroupAsBehavior.LIST), assemblies = { @BoundGroupedAssembly(formalName = "Global Assembly Definition", description = "In XML, an element with structured element content. In JSON, an object with properties. Defined globally, an assembly can be assigned to appear in the `model` of any assembly (another assembly type, or itself), by `assembly` reference.", - useName = "define-assembly", - discriminatorValue = "assembly", - binding = DefineAssembly.class), - @BoundGroupedAssembly(formalName = "Global Field Definition", - useName = "define-field", - discriminatorValue = "field", - binding = DefineField.class), - @BoundGroupedAssembly(formalName = "Global Flag Definition", - useName = "define-flag", - discriminatorValue = "flag", - binding = DefineFlag.class) - }, - groupAs = @GroupAs(name = "definitions", inJson = JsonGroupAsBehavior.LIST)) + useName = "define-assembly", discriminatorValue = "assembly", binding = DefineAssembly.class), + @BoundGroupedAssembly(formalName = "Global Field Definition", useName = "define-field", + discriminatorValue = "field", binding = DefineField.class), + @BoundGroupedAssembly(formalName = "Global Flag Definition", useName = "define-flag", + discriminatorValue = "flag", binding = DefineFlag.class) + }) private List _definitions; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA} + * instance with no metadata. + */ public METASCHEMA() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public METASCHEMA(IMetaschemaData data) { this.__metaschemaData = data; } @@ -215,67 +256,238 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the is Abstract?. + * + *

+ * Determines if the Metaschema module is abstract (‘yes’) or not + * (‘no’). + * + * @return the abstract value, or {@code null} if not set + */ + @Nullable public String getAbstract() { return _abstract; } - public void setAbstract(String value) { + /** + * Set the is Abstract?. + * + *

+ * Determines if the Metaschema module is abstract (‘yes’) or not + * (‘no’). + * + * @param value + * the abstract value to set + */ + public void setAbstract(@Nullable String value) { _abstract = value; } + /** + * Get the module Name. + * + *

+ * The name of the information model represented by this Metaschema definition. + * + * @return the schema-name value + */ + @NonNull public MarkupLine getSchemaName() { return _schemaName; } - public void setSchemaName(MarkupLine value) { + /** + * Set the module Name. + * + *

+ * The name of the information model represented by this Metaschema definition. + * + * @param value + * the schema-name value to set + */ + public void setSchemaName(@NonNull MarkupLine value) { _schemaName = value; } + /** + * Get the {@code schema-version} property. + * + *

+ * A version string used to distinguish between multiple revisions of the same + * Metaschema module. + * + * @return the schema-version value + */ + @NonNull public String getSchemaVersion() { return _schemaVersion; } - public void setSchemaVersion(String value) { + /** + * Set the {@code schema-version} property. + * + *

+ * A version string used to distinguish between multiple revisions of the same + * Metaschema module. + * + * @param value + * the schema-version value to set + */ + public void setSchemaVersion(@NonNull String value) { _schemaVersion = value; } + /** + * Get the module Short Name. + * + *

+ * A short (code) name to be used for the Metaschema module. This name may be + * used as a constituent of names assigned to derived artifacts, such as schemas + * and conversion utilities. + * + * @return the short-name value + */ + @NonNull public String getShortName() { return _shortName; } - public void setShortName(String value) { + /** + * Set the module Short Name. + * + *

+ * A short (code) name to be used for the Metaschema module. This name may be + * used as a constituent of names assigned to derived artifacts, such as schemas + * and conversion utilities. + * + * @param value + * the short-name value to set + */ + public void setShortName(@NonNull String value) { _shortName = value; } + /** + * Get the module Collection Namespace. + * + *

+ * The namespace for the collection of Metaschema module this Metaschema module + * belongs to. This value is also used as the XML namespace governing the names + * of elements in XML documents. By using this namespace, documents and document + * fragments used in mixed-format environments may be distinguished from + * neighbor XML formats using another namespaces. This value is not reflected in + * Metaschema JSON. + * + * @return the namespace value + */ + @NonNull public URI getNamespace() { return _namespace; } - public void setNamespace(URI value) { + /** + * Set the module Collection Namespace. + * + *

+ * The namespace for the collection of Metaschema module this Metaschema module + * belongs to. This value is also used as the XML namespace governing the names + * of elements in XML documents. By using this namespace, documents and document + * fragments used in mixed-format environments may be distinguished from + * neighbor XML formats using another namespaces. This value is not reflected in + * Metaschema JSON. + * + * @param value + * the namespace value to set + */ + public void setNamespace(@NonNull URI value) { _namespace = value; } + /** + * Get the jSON Base URI. + * + *

+ * The JSON Base URI is the nominal base URI assigned to a JSON Schema instance + * expressing the model defined by this Metaschema module. + * + * @return the json-base-uri value + */ + @NonNull public URI getJsonBaseUri() { return _jsonBaseUri; } - public void setJsonBaseUri(URI value) { + /** + * Set the jSON Base URI. + * + *

+ * The JSON Base URI is the nominal base URI assigned to a JSON Schema instance + * expressing the model defined by this Metaschema module. + * + * @param value + * the json-base-uri value to set + */ + public void setJsonBaseUri(@NonNull URI value) { _jsonBaseUri = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } + /** + * Get the module Import. + * + *

+ * Imports a set of Metaschema modules contained in another resource. Imports + * support the reuse of common information structures. + * + * @return the import value + */ + @NonNull public List getImports() { + if (_imports == null) { + _imports = new LinkedList<>(); + } return _imports; } - public void setImports(List value) { + /** + * Set the module Import. + * + *

+ * Imports a set of Metaschema modules contained in another resource. Imports + * support the reuse of common information structures. + * + * @param value + * the import value to set + */ + public void setImports(@NonNull List value) { _imports = value; } @@ -306,11 +518,34 @@ public boolean removeImport(Import item) { return _imports != null && _imports.remove(value); } + /** + * Get the metapath Namespace Declaration. + * + *

+ * Assigns a Metapath namespace to a prefix for use in a Metapath expression in + * a lexical qualified name. + * + * @return the namespace-binding value + */ + @NonNull public List getNamespaceBindings() { + if (_namespaceBindings == null) { + _namespaceBindings = new LinkedList<>(); + } return _namespaceBindings; } - public void setNamespaceBindings(List value) { + /** + * Set the metapath Namespace Declaration. + * + *

+ * Assigns a Metapath namespace to a prefix for use in a Metapath expression in + * a lexical qualified name. + * + * @param value + * the namespace-binding value to set + */ + public void setNamespaceBindings(@NonNull List value) { _namespaceBindings = value; } @@ -342,11 +577,26 @@ public boolean removeNamespaceBinding(MetapathNamespace item) { return _namespaceBindings != null && _namespaceBindings.remove(value); } + /** + * Get the {@code definitions} choice group items. + * + * @return the definitions items + */ + @NonNull public List getDefinitions() { + if (_definitions == null) { + _definitions = new LinkedList<>(); + } return _definitions; } - public void setDefinitions(List value) { + /** + * Set the {@code definitions} choice group items. + * + * @param value + * the definitions items to set + */ + public void setDefinitions(@NonNull List value) { _definitions = value; } @@ -368,8 +618,8 @@ public static class Import implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * "A relative or absolute URI for retrieving an out-of-line Metaschema - * definition." + * A relative or absolute URI for retrieving an out-of-line Metaschema + * definition. */ @BoundFlag( formalName = "Import URI Reference", @@ -379,10 +629,23 @@ public static class Import implements IBoundObject { typeAdapter = UriReferenceAdapter.class) private URI _href; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA.Import} + * instance with no metadata. + */ public Import() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA.Import} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Import(IMetaschemaData data) { this.__metaschemaData = data; } @@ -392,11 +655,31 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the import URI Reference. + * + *

+ * A relative or absolute URI for retrieving an out-of-line Metaschema + * definition. + * + * @return the href value + */ + @NonNull public URI getHref() { return _href; } - public void setHref(URI value) { + /** + * Set the import URI Reference. + * + *

+ * A relative or absolute URI for retrieving an out-of-line Metaschema + * definition. + * + * @param value + * the href value to set + */ + public void setHref(@NonNull URI value) { _href = value; } @@ -416,7 +699,6 @@ public String toString() { formalName = "Global Assembly Definition", description = "In XML, an element with structured element content. In JSON, an object with properties. Defined globally, an assembly can be assigned to appear in the `model` of any assembly (another assembly type, or itself), by `assembly` reference.", name = "define-assembly", - moduleClass = MetaschemaModelModule.class) public static class DefineAssembly implements IBoundObject { private final IMetaschemaData __metaschemaData; @@ -452,6 +734,9 @@ public static class DefineAssembly implements IBoundObject { typeAdapter = StringAdapter.class) private String _deprecated; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -459,6 +744,10 @@ public static class DefineAssembly implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -473,12 +762,19 @@ public static class DefineAssembly implements IBoundObject { groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) private List _props; + /** + * Allows the name of the definition to be overridden. + */ @BoundField( formalName = "Use Name", description = "Allows the name of the definition to be overridden.", useName = "use-name") private UseName _useName; + /** + * Provides a root name, for when the definition is used as the root of a node + * hierarchy. + */ @BoundField( formalName = "Root Name", description = "Provides a root name, for when the definition is used as the root of a node hierarchy.", @@ -486,6 +782,11 @@ public static class DefineAssembly implements IBoundObject { minOccurs = 1) private RootName _rootName; + /** + * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + */ @BoundAssembly( formalName = "JSON Key", description = "Used in JSON (and similar formats) to identify a flag that will be used as the property name in an object hold a collection of sibling objects. Requires that siblings must never share `json-key` values.", @@ -494,17 +795,13 @@ public static class DefineAssembly implements IBoundObject { @BoundChoiceGroup( maxOccurs = -1, + groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST), assemblies = { - @BoundGroupedAssembly(formalName = "Inline Flag Definition", - useName = "define-flag", - discriminatorValue = "flag", - binding = InlineDefineFlag.class), - @BoundGroupedAssembly(formalName = "Flag Reference", - useName = "flag", - discriminatorValue = "flag-ref", + @BoundGroupedAssembly(formalName = "Inline Flag Definition", useName = "define-flag", + discriminatorValue = "flag", binding = InlineDefineFlag.class), + @BoundGroupedAssembly(formalName = "Flag Reference", useName = "flag", discriminatorValue = "flag-ref", binding = FlagReference.class) - }, - groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST)) + }) private List _flags; @BoundAssembly( @@ -515,6 +812,10 @@ public static class DefineAssembly implements IBoundObject { useName = "constraint") private AssemblyConstraints _constraint; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", @@ -528,10 +829,23 @@ public static class DefineAssembly implements IBoundObject { groupAs = @GroupAs(name = "examples", inJson = JsonGroupAsBehavior.LIST)) private List _examples; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA.DefineAssembly} + * instance with no metadata. + */ public DefineAssembly() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA.DefineAssembly} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public DefineAssembly(IMetaschemaData data) { this.__metaschemaData = data; } @@ -541,59 +855,160 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the global Assembly Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the global Assembly Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the global Assembly Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the global Assembly Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the definition Scope. + * + * @return the scope value, or {@code null} if not set + */ + @Nullable public String getScope() { return _scope; } - public void setScope(String value) { + /** + * Set the definition Scope. + * + * @param value + * the scope value to set + */ + public void setScope(@Nullable String value) { _scope = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -625,67 +1040,201 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @return the use-name value, or {@code null} if not set + */ + @Nullable public UseName getUseName() { return _useName; } - public void setUseName(UseName value) { + /** + * Set the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @param value + * the use-name value to set + */ + public void setUseName(@Nullable UseName value) { _useName = value; } + /** + * Get the root Name. + * + *

+ * Provides a root name, for when the definition is used as the root of a node + * hierarchy. + * + * @return the root-name value + */ + @NonNull public RootName getRootName() { return _rootName; } - public void setRootName(RootName value) { + /** + * Set the root Name. + * + *

+ * Provides a root name, for when the definition is used as the root of a node + * hierarchy. + * + * @param value + * the root-name value to set + */ + public void setRootName(@NonNull RootName value) { _rootName = value; } + /** + * Get the jSON Key. + * + *

+ * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + * + * @return the json-key value, or {@code null} if not set + */ + @Nullable public JsonKey getJsonKey() { return _jsonKey; } - public void setJsonKey(JsonKey value) { + /** + * Set the jSON Key. + * + *

+ * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + * + * @param value + * the json-key value to set + */ + public void setJsonKey(@Nullable JsonKey value) { _jsonKey = value; } + /** + * Get the {@code flags} choice group items. + * + * @return the flags items + */ + @NonNull public List getFlags() { + if (_flags == null) { + _flags = new LinkedList<>(); + } return _flags; } - public void setFlags(List value) { + /** + * Set the {@code flags} choice group items. + * + * @param value + * the flags items to set + */ + public void setFlags(@NonNull List value) { _flags = value; } + /** + * Get the {@code model} property. + * + * @return the model value, or {@code null} if not set + */ + @Nullable public AssemblyModel getModel() { return _model; } - public void setModel(AssemblyModel value) { + /** + * Set the {@code model} property. + * + * @param value + * the model value to set + */ + public void setModel(@Nullable AssemblyModel value) { _model = value; } + /** + * Get the {@code constraint} property. + * + * @return the constraint value, or {@code null} if not set + */ + @Nullable public AssemblyConstraints getConstraint() { return _constraint; } - public void setConstraint(AssemblyConstraints value) { + /** + * Set the {@code constraint} property. + * + * @param value + * the constraint value to set + */ + public void setConstraint(@Nullable AssemblyConstraints value) { _constraint = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } + /** + * Get the example. + * + * @return the example value + */ + @NonNull public List getExamples() { + if (_examples == null) { + _examples = new LinkedList<>(); + } return _examples; } - public void setExamples(List value) { + /** + * Set the example. + * + * @param value + * the example value to set + */ + public void setExamples(@NonNull List value) { _examples = value; } @@ -735,7 +1284,7 @@ public static class RootName implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * "Used for binary formats instead of the textual name." + * Used for binary formats instead of the textual name. */ @BoundFlag( formalName = "Numeric Index", @@ -749,10 +1298,23 @@ public static class RootName implements IBoundObject { typeAdapter = TokenAdapter.class) private String _name; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA.DefineAssembly.RootName} + * instance with no metadata. + */ public RootName() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA.DefineAssembly.RootName} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public RootName(IMetaschemaData data) { this.__metaschemaData = data; } @@ -762,19 +1324,38 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the numeric Index. + * + *

+ * Used for binary formats instead of the textual name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the numeric Index. + * + *

+ * Used for binary formats instead of the textual name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + @Nullable public String getName() { return _name; } - public void setName(String value) { + public void setName(@Nullable String value) { _name = value; } @@ -831,61 +1412,67 @@ public static class DefineField implements IBoundObject { valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = { @AllowedValue(value = "markup-line", - description = "The [markup-line](https://pages.nist.gov/metaschema/specification/datatypes/#markup-line) data type."), + description = "The [markup-line](https://framework.metaschema.dev/specification/datatypes/#markup-line) data type."), @AllowedValue(value = "markup-multiline", - description = "The [markup-multiline](https://pages.nist.gov/metaschema/specification/datatypes/#markup-multiline) data type."), + description = "The [markup-multiline](https://framework.metaschema.dev/specification/datatypes/#markup-multiline) data type."), @AllowedValue(value = "base64", - description = "The [base64](https://pages.nist.gov/metaschema/specification/datatypes/#base64) data type."), + description = "The [base64](https://framework.metaschema.dev/specification/datatypes/#base64) data type."), @AllowedValue(value = "boolean", - description = "The [boolean](https://pages.nist.gov/metaschema/specification/datatypes/#boolean) data type."), + description = "The [boolean](https://framework.metaschema.dev/specification/datatypes/#boolean) data type."), @AllowedValue(value = "date", - description = "The [date](https://pages.nist.gov/metaschema/specification/datatypes/#date) data type."), + description = "The [date](https://framework.metaschema.dev/specification/datatypes/#date) data type."), @AllowedValue(value = "date-time", - description = "The [date-time](https://pages.nist.gov/metaschema/specification/datatypes/#date-time) data type."), + description = "The [date-time](https://framework.metaschema.dev/specification/datatypes/#date-time) data type."), @AllowedValue(value = "date-time-with-timezone", - description = "The [date-time-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-time-with-timezone) data type."), + description = "The [date-time-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-time-with-timezone) data type."), @AllowedValue(value = "date-with-timezone", - description = "The [date-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-with-timezone) data type."), + description = "The [date-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-with-timezone) data type."), @AllowedValue(value = "day-time-duration", - description = "The [day-time-duration](https://pages.nist.gov/metaschema/specification/datatypes/#day-time-duration) data type."), + description = "The [day-time-duration](https://framework.metaschema.dev/specification/datatypes/#day-time-duration) data type."), @AllowedValue(value = "decimal", - description = "The [decimal](https://pages.nist.gov/metaschema/specification/datatypes/#decimal) data type."), + description = "The [decimal](https://framework.metaschema.dev/specification/datatypes/#decimal) data type."), @AllowedValue(value = "email-address", - description = "The [email-address](https://pages.nist.gov/metaschema/specification/datatypes/#email-address) data type."), + description = "The [email-address](https://framework.metaschema.dev/specification/datatypes/#email-address) data type."), @AllowedValue(value = "hostname", - description = "The [hostname](https://pages.nist.gov/metaschema/specification/datatypes/#hostname) data type."), + description = "The [hostname](https://framework.metaschema.dev/specification/datatypes/#hostname) data type."), @AllowedValue(value = "integer", - description = "The [integer](https://pages.nist.gov/metaschema/specification/datatypes/#integer) data type."), + description = "The [integer](https://framework.metaschema.dev/specification/datatypes/#integer) data type."), @AllowedValue(value = "ip-v4-address", - description = "The [ip-v4-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v4-address) data type."), + description = "The [ip-v4-address](https://framework.metaschema.dev/specification/datatypes/#ip-v4-address) data type."), @AllowedValue(value = "ip-v6-address", - description = "The [ip-v6-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v6-address) data type."), + description = "The [ip-v6-address](https://framework.metaschema.dev/specification/datatypes/#ip-v6-address) data type."), @AllowedValue(value = "non-negative-integer", - description = "The [non-negative-integer](https://pages.nist.gov/metaschema/specification/datatypes/#non-negative-integer) data type."), + description = "The [non-negative-integer](https://framework.metaschema.dev/specification/datatypes/#non-negative-integer) data type."), @AllowedValue(value = "positive-integer", - description = "The [positive-integer](https://pages.nist.gov/metaschema/specification/datatypes/#positive-integer) data type."), + description = "The [positive-integer](https://framework.metaschema.dev/specification/datatypes/#positive-integer) data type."), @AllowedValue(value = "string", - description = "The [string](https://pages.nist.gov/metaschema/specification/datatypes/#string) data type."), + description = "The [string](https://framework.metaschema.dev/specification/datatypes/#string) data type."), @AllowedValue(value = "token", - description = "The [token](https://pages.nist.gov/metaschema/specification/datatypes/#token) data type."), + description = "The [token](https://framework.metaschema.dev/specification/datatypes/#token) data type."), @AllowedValue(value = "uri", - description = "The [uri](https://pages.nist.gov/metaschema/specification/datatypes/#uri) data type."), + description = "The [uri](https://framework.metaschema.dev/specification/datatypes/#uri) data type."), @AllowedValue(value = "uri-reference", - description = "The [uri-reference](https://pages.nist.gov/metaschema/specification/datatypes/#uri-reference) data type."), + description = "The [uri-reference](https://framework.metaschema.dev/specification/datatypes/#uri-reference) data type."), @AllowedValue(value = "uuid", - description = "The [uuid](https://pages.nist.gov/metaschema/specification/datatypes/#uuid) data type."), + description = "The [uuid](https://framework.metaschema.dev/specification/datatypes/#uuid) data type."), @AllowedValue(value = "base64Binary", - description = "An old name which is deprecated for use in favor of the 'base64' data type."), + description = "An old name which is deprecated for use in favor of the 'base64' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime", - description = "An old name which is deprecated for use in favor of the 'date-time' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime-with-timezone", - description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "email", - description = "An old name which is deprecated for use in favor of the 'email-address' data type."), + description = "An old name which is deprecated for use in favor of the 'email-address' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "nonNegativeInteger", - description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type."), + description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "positiveInteger", - description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.") }))) + description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.", + deprecatedVersion = "1.0.0") }))) private String _asType; @BoundFlag( @@ -894,6 +1481,9 @@ public static class DefineField implements IBoundObject { typeAdapter = StringAdapter.class) private String _default; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -901,6 +1491,10 @@ public static class DefineField implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -915,12 +1509,20 @@ public static class DefineField implements IBoundObject { groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) private List _props; + /** + * Allows the name of the definition to be overridden. + */ @BoundField( formalName = "Use Name", description = "Allows the name of the definition to be overridden.", useName = "use-name") private UseName _useName; + /** + * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + */ @BoundAssembly( formalName = "JSON Key", description = "Used in JSON (and similar formats) to identify a flag that will be used as the property name in an object hold a collection of sibling objects. Requires that siblings must never share `json-key` values.", @@ -940,23 +1542,23 @@ public static class DefineField implements IBoundObject { @BoundChoiceGroup( maxOccurs = -1, + groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST), assemblies = { - @BoundGroupedAssembly(formalName = "Inline Flag Definition", - useName = "define-flag", - discriminatorValue = "flag", - binding = InlineDefineFlag.class), - @BoundGroupedAssembly(formalName = "Flag Reference", - useName = "flag", - discriminatorValue = "flag-ref", + @BoundGroupedAssembly(formalName = "Inline Flag Definition", useName = "define-flag", + discriminatorValue = "flag", binding = InlineDefineFlag.class), + @BoundGroupedAssembly(formalName = "Flag Reference", useName = "flag", discriminatorValue = "flag-ref", binding = FlagReference.class) - }, - groupAs = @GroupAs(name = "flags", inJson = JsonGroupAsBehavior.LIST)) + }) private List _flags; @BoundAssembly( useName = "constraint") private FieldConstraints _constraint; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", @@ -970,10 +1572,23 @@ public static class DefineField implements IBoundObject { groupAs = @GroupAs(name = "examples", inJson = JsonGroupAsBehavior.LIST)) private List _examples; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA.DefineField} + * instance with no metadata. + */ public DefineField() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA.DefineField} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public DefineField(IMetaschemaData data) { this.__metaschemaData = data; } @@ -983,75 +1598,200 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the global Field Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the global Field Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the global Field Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the global Field Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the definition Scope. + * + * @return the scope value, or {@code null} if not set + */ + @Nullable public String getScope() { return _scope; } - public void setScope(String value) { + /** + * Set the definition Scope. + * + * @param value + * the scope value to set + */ + public void setScope(@Nullable String value) { _scope = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the field Value Data Type. + * + * @return the as-type value, or {@code null} if not set + */ + @Nullable public String getAsType() { return _asType; } - public void setAsType(String value) { + /** + * Set the field Value Data Type. + * + * @param value + * the as-type value to set + */ + public void setAsType(@Nullable String value) { _asType = value; } + /** + * Get the default Field Value. + * + * @return the default value, or {@code null} if not set + */ + @Nullable public String getDefault() { return _default; } - public void setDefault(String value) { + /** + * Set the default Field Value. + * + * @param value + * the default value to set + */ + public void setDefault(@Nullable String value) { _default = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -1083,67 +1823,193 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @return the use-name value, or {@code null} if not set + */ + @Nullable public UseName getUseName() { return _useName; } - public void setUseName(UseName value) { + /** + * Set the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @param value + * the use-name value to set + */ + public void setUseName(@Nullable UseName value) { _useName = value; } + /** + * Get the jSON Key. + * + *

+ * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + * + * @return the json-key value, or {@code null} if not set + */ + @Nullable public JsonKey getJsonKey() { return _jsonKey; } - public void setJsonKey(JsonKey value) { + /** + * Set the jSON Key. + * + *

+ * Used in JSON (and similar formats) to identify a flag that will be used as + * the property name in an object hold a collection of sibling objects. Requires + * that siblings must never share json-key values. + * + * @param value + * the json-key value to set + */ + public void setJsonKey(@Nullable JsonKey value) { _jsonKey = value; } + /** + * Get the field Value JSON Property Name. + * + * @return the json-value-key value, or {@code null} if not set + */ + @Nullable public String getJsonValueKey() { return _jsonValueKey; } - public void setJsonValueKey(String value) { + /** + * Set the field Value JSON Property Name. + * + * @param value + * the json-value-key value to set + */ + public void setJsonValueKey(@Nullable String value) { _jsonValueKey = value; } + /** + * Get the flag Used as the Field Value's JSON Property Name. + * + * @return the json-value-key-flag value, or {@code null} if not set + */ + @Nullable public JsonValueKeyFlag getJsonValueKeyFlag() { return _jsonValueKeyFlag; } - public void setJsonValueKeyFlag(JsonValueKeyFlag value) { + /** + * Set the flag Used as the Field Value's JSON Property Name. + * + * @param value + * the json-value-key-flag value to set + */ + public void setJsonValueKeyFlag(@Nullable JsonValueKeyFlag value) { _jsonValueKeyFlag = value; } + /** + * Get the {@code flags} choice group items. + * + * @return the flags items + */ + @NonNull public List getFlags() { + if (_flags == null) { + _flags = new LinkedList<>(); + } return _flags; } - public void setFlags(List value) { + /** + * Set the {@code flags} choice group items. + * + * @param value + * the flags items to set + */ + public void setFlags(@NonNull List value) { _flags = value; } + /** + * Get the {@code constraint} property. + * + * @return the constraint value, or {@code null} if not set + */ + @Nullable public FieldConstraints getConstraint() { return _constraint; } - public void setConstraint(FieldConstraints value) { + /** + * Set the {@code constraint} property. + * + * @param value + * the constraint value to set + */ + public void setConstraint(@Nullable FieldConstraints value) { _constraint = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } + /** + * Get the example. + * + * @return the example value + */ + @NonNull public List getExamples() { + if (_examples == null) { + _examples = new LinkedList<>(); + } return _examples; } - public void setExamples(List value) { + /** + * Set the example. + * + * @param value + * the example value to set + */ + public void setExamples(@NonNull List value) { _examples = value; } @@ -1227,57 +2093,63 @@ public static class DefineFlag implements IBoundObject { valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = { @AllowedValue(value = "base64", - description = "The [base64](https://pages.nist.gov/metaschema/specification/datatypes/#base64) data type."), + description = "The [base64](https://framework.metaschema.dev/specification/datatypes/#base64) data type."), @AllowedValue(value = "boolean", - description = "The [boolean](https://pages.nist.gov/metaschema/specification/datatypes/#boolean) data type."), + description = "The [boolean](https://framework.metaschema.dev/specification/datatypes/#boolean) data type."), @AllowedValue(value = "date", - description = "The [date](https://pages.nist.gov/metaschema/specification/datatypes/#date) data type."), + description = "The [date](https://framework.metaschema.dev/specification/datatypes/#date) data type."), @AllowedValue(value = "date-time", - description = "The [date-time](https://pages.nist.gov/metaschema/specification/datatypes/#date-time) data type."), + description = "The [date-time](https://framework.metaschema.dev/specification/datatypes/#date-time) data type."), @AllowedValue(value = "date-time-with-timezone", - description = "The [date-time-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-time-with-timezone) data type."), + description = "The [date-time-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-time-with-timezone) data type."), @AllowedValue(value = "date-with-timezone", - description = "The [date-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-with-timezone) data type."), + description = "The [date-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-with-timezone) data type."), @AllowedValue(value = "day-time-duration", - description = "The [day-time-duration](https://pages.nist.gov/metaschema/specification/datatypes/#day-time-duration) data type."), + description = "The [day-time-duration](https://framework.metaschema.dev/specification/datatypes/#day-time-duration) data type."), @AllowedValue(value = "decimal", - description = "The [decimal](https://pages.nist.gov/metaschema/specification/datatypes/#decimal) data type."), + description = "The [decimal](https://framework.metaschema.dev/specification/datatypes/#decimal) data type."), @AllowedValue(value = "email-address", - description = "The [email-address](https://pages.nist.gov/metaschema/specification/datatypes/#email-address) data type."), + description = "The [email-address](https://framework.metaschema.dev/specification/datatypes/#email-address) data type."), @AllowedValue(value = "hostname", - description = "The [hostname](https://pages.nist.gov/metaschema/specification/datatypes/#hostname) data type."), + description = "The [hostname](https://framework.metaschema.dev/specification/datatypes/#hostname) data type."), @AllowedValue(value = "integer", - description = "The [integer](https://pages.nist.gov/metaschema/specification/datatypes/#integer) data type."), + description = "The [integer](https://framework.metaschema.dev/specification/datatypes/#integer) data type."), @AllowedValue(value = "ip-v4-address", - description = "The [ip-v4-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v4-address) data type."), + description = "The [ip-v4-address](https://framework.metaschema.dev/specification/datatypes/#ip-v4-address) data type."), @AllowedValue(value = "ip-v6-address", - description = "The [ip-v6-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v6-address) data type."), + description = "The [ip-v6-address](https://framework.metaschema.dev/specification/datatypes/#ip-v6-address) data type."), @AllowedValue(value = "non-negative-integer", - description = "The [non-negative-integer](https://pages.nist.gov/metaschema/specification/datatypes/#non-negative-integer) data type."), + description = "The [non-negative-integer](https://framework.metaschema.dev/specification/datatypes/#non-negative-integer) data type."), @AllowedValue(value = "positive-integer", - description = "The [positive-integer](https://pages.nist.gov/metaschema/specification/datatypes/#positive-integer) data type."), + description = "The [positive-integer](https://framework.metaschema.dev/specification/datatypes/#positive-integer) data type."), @AllowedValue(value = "string", - description = "The [string](https://pages.nist.gov/metaschema/specification/datatypes/#string) data type."), + description = "The [string](https://framework.metaschema.dev/specification/datatypes/#string) data type."), @AllowedValue(value = "token", - description = "The [token](https://pages.nist.gov/metaschema/specification/datatypes/#token) data type."), + description = "The [token](https://framework.metaschema.dev/specification/datatypes/#token) data type."), @AllowedValue(value = "uri", - description = "The [uri](https://pages.nist.gov/metaschema/specification/datatypes/#uri) data type."), + description = "The [uri](https://framework.metaschema.dev/specification/datatypes/#uri) data type."), @AllowedValue(value = "uri-reference", - description = "The [uri-reference](https://pages.nist.gov/metaschema/specification/datatypes/#uri-reference) data type."), + description = "The [uri-reference](https://framework.metaschema.dev/specification/datatypes/#uri-reference) data type."), @AllowedValue(value = "uuid", - description = "The [uuid](https://pages.nist.gov/metaschema/specification/datatypes/#uuid) data type."), + description = "The [uuid](https://framework.metaschema.dev/specification/datatypes/#uuid) data type."), @AllowedValue(value = "base64Binary", - description = "An old name which is deprecated for use in favor of the 'base64' data type."), + description = "An old name which is deprecated for use in favor of the 'base64' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime", - description = "An old name which is deprecated for use in favor of the 'date-time' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime-with-timezone", - description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "email", - description = "An old name which is deprecated for use in favor of the 'email-address' data type."), + description = "An old name which is deprecated for use in favor of the 'email-address' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "nonNegativeInteger", - description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type."), + description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "positiveInteger", - description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.") }))) + description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.", + deprecatedVersion = "1.0.0") }))) private String _asType; @BoundFlag( @@ -1286,6 +2158,9 @@ public static class DefineFlag implements IBoundObject { typeAdapter = StringAdapter.class) private String _default; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -1293,6 +2168,10 @@ public static class DefineFlag implements IBoundObject { typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -1307,6 +2186,9 @@ public static class DefineFlag implements IBoundObject { groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) private List _props; + /** + * Allows the name of the definition to be overridden. + */ @BoundField( formalName = "Use Name", description = "Allows the name of the definition to be overridden.", @@ -1317,6 +2199,10 @@ public static class DefineFlag implements IBoundObject { useName = "constraint") private FlagConstraints _constraint; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", @@ -1330,10 +2216,23 @@ public static class DefineFlag implements IBoundObject { groupAs = @GroupAs(name = "examples", inJson = JsonGroupAsBehavior.LIST)) private List _examples; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA.DefineFlag} + * instance with no metadata. + */ public DefineFlag() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA.DefineFlag} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public DefineFlag(IMetaschemaData data) { this.__metaschemaData = data; } @@ -1343,75 +2242,200 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the global Flag Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the global Flag Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the global Flag Binary Name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the global Flag Binary Name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + /** + * Get the definition Scope. + * + * @return the scope value, or {@code null} if not set + */ + @Nullable public String getScope() { return _scope; } - public void setScope(String value) { + /** + * Set the definition Scope. + * + * @param value + * the scope value to set + */ + public void setScope(@Nullable String value) { _scope = value; } + /** + * Get the deprecated Version. + * + * @return the deprecated value, or {@code null} if not set + */ + @Nullable public String getDeprecated() { return _deprecated; } - public void setDeprecated(String value) { + /** + * Set the deprecated Version. + * + * @param value + * the deprecated value to set + */ + public void setDeprecated(@Nullable String value) { _deprecated = value; } + /** + * Get the flag Value Data Type. + * + * @return the as-type value, or {@code null} if not set + */ + @Nullable public String getAsType() { return _asType; } - public void setAsType(String value) { + /** + * Set the flag Value Data Type. + * + * @param value + * the as-type value to set + */ + public void setAsType(@Nullable String value) { _asType = value; } + /** + * Get the default Flag Value. + * + * @return the default value, or {@code null} if not set + */ + @Nullable public String getDefault() { return _default; } - public void setDefault(String value) { + /** + * Set the default Flag Value. + * + * @param value + * the default value to set + */ + public void setDefault(@Nullable String value) { _default = value; } + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -1443,35 +2467,100 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @return the use-name value, or {@code null} if not set + */ + @Nullable public UseName getUseName() { return _useName; } - public void setUseName(UseName value) { + /** + * Set the use Name. + * + *

+ * Allows the name of the definition to be overridden. + * + * @param value + * the use-name value to set + */ + public void setUseName(@Nullable UseName value) { _useName = value; } + /** + * Get the {@code constraint} property. + * + * @return the constraint value, or {@code null} if not set + */ + @Nullable public FlagConstraints getConstraint() { return _constraint; } - public void setConstraint(FlagConstraints value) { + /** + * Set the {@code constraint} property. + * + * @param value + * the constraint value to set + */ + public void setConstraint(@Nullable FlagConstraints value) { _constraint = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } + /** + * Get the example. + * + * @return the example value + */ + @NonNull public List getExamples() { + if (_examples == null) { + _examples = new LinkedList<>(); + } return _examples; } - public void setExamples(List value) { + /** + * Set the example. + * + * @param value + * the example value to set + */ + public void setExamples(@NonNull List value) { _examples = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetapathContext.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetapathContext.java index 746e8c77f..f3814055f 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetapathContext.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetapathContext.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.core.model.JsonGroupAsBehavior; @@ -13,23 +17,21 @@ import gov.nist.secauto.metaschema.databind.model.annotations.BoundField; import gov.nist.secauto.metaschema.databind.model.annotations.GroupAs; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions", -}) @MetaschemaAssembly( name = "metapath-context", moduleClass = MetaschemaModelModule.class) public class MetapathContext implements IBoundObject { private final IMetaschemaData __metaschemaData; + /** + * A Metapath expression identifying the model node that the constraints will be + * applied to. + */ @BoundAssembly( description = "A Metapath expression identifying the model node that the constraints will be applied to.", useName = "metapath", @@ -48,16 +50,33 @@ public class MetapathContext implements IBoundObject { groupAs = @GroupAs(name = "contexts", inJson = JsonGroupAsBehavior.LIST)) private List _contexts; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetapathContext} + * instance with no metadata. + */ public MetapathContext() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetapathContext} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public MetapathContext(IMetaschemaData data) { this.__metaschemaData = data; } @@ -67,11 +86,34 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the {@code metapath} property. + * + *

+ * A Metapath expression identifying the model node that the constraints will be + * applied to. + * + * @return the metapath value + */ + @NonNull public List getMetapaths() { + if (_metapaths == null) { + _metapaths = new LinkedList<>(); + } return _metapaths; } - public void setMetapaths(List value) { + /** + * Set the {@code metapath} property. + * + *

+ * A Metapath expression identifying the model node that the constraints will be + * applied to. + * + * @param value + * the metapath value to set + */ + public void setMetapaths(@NonNull List value) { _metapaths = value; } @@ -103,19 +145,46 @@ public boolean removeMetapath(MetaschemaMetapath item) { return _metapaths != null && _metapaths.remove(value); } + /** + * Get the {@code constraints} property. + * + * @return the constraints value, or {@code null} if not set + */ + @Nullable public AssemblyConstraints getConstraints() { return _constraints; } - public void setConstraints(AssemblyConstraints value) { + /** + * Set the {@code constraints} property. + * + * @param value + * the constraints value to set + */ + public void setConstraints(@Nullable AssemblyConstraints value) { _constraints = value; } + /** + * Get the {@code context} property. + * + * @return the context value + */ + @NonNull public List getContexts() { + if (_contexts == null) { + _contexts = new LinkedList<>(); + } return _contexts; } - public void setContexts(List value) { + /** + * Set the {@code context} property. + * + * @param value + * the context value to set + */ + public void setContexts(@NonNull List value) { _contexts = value; } @@ -147,11 +216,31 @@ public boolean removeContext(MetapathContext item) { return _contexts != null && _contexts.remove(value); } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetapathNamespace.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetapathNamespace.java index c540c0e21..5889d6757 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetapathNamespace.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetapathNamespace.java @@ -2,29 +2,26 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.UriAdapter; import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; - +import java.net.URI; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -import java.net.URI; - /** * Assigns a Metapath namespace to a prefix for use in a Metapath expression in * a lexical qualified name. */ -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions", -}) @MetaschemaAssembly( formalName = "Metapath Namespace Declaration", description = "Assigns a Metapath namespace to a prefix for use in a Metapath expression in a lexical qualified name.", @@ -34,7 +31,7 @@ public class MetapathNamespace implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * "The namespace URI to bind to the prefix." + * The namespace URI to bind to the prefix. */ @BoundFlag( formalName = "Metapath Namespace URI", @@ -45,7 +42,7 @@ public class MetapathNamespace implements IBoundObject { private URI _uri; /** - * "The prefix that is bound to the namespace." + * The prefix that is bound to the namespace. */ @BoundFlag( formalName = "Metapath Namespace Prefix", @@ -55,10 +52,23 @@ public class MetapathNamespace implements IBoundObject { typeAdapter = TokenAdapter.class) private String _prefix; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetapathNamespace} + * instance with no metadata. + */ public MetapathNamespace() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetapathNamespace} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public MetapathNamespace(IMetaschemaData data) { this.__metaschemaData = data; } @@ -68,19 +78,55 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the metapath Namespace URI. + * + *

+ * The namespace URI to bind to the prefix. + * + * @return the uri value + */ + @NonNull public URI getUri() { return _uri; } - public void setUri(URI value) { + /** + * Set the metapath Namespace URI. + * + *

+ * The namespace URI to bind to the prefix. + * + * @param value + * the uri value to set + */ + public void setUri(@NonNull URI value) { _uri = value; } + /** + * Get the metapath Namespace Prefix. + * + *

+ * The prefix that is bound to the namespace. + * + * @return the prefix value + */ + @NonNull public String getPrefix() { return _prefix; } - public void setPrefix(String value) { + /** + * Set the metapath Namespace Prefix. + * + *

+ * The prefix that is bound to the namespace. + * + * @param value + * the prefix value to set + */ + public void setPrefix(@NonNull String value) { _prefix = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaMetaConstraints.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaMetaConstraints.java index f6a0c176a..469c9dd22 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaMetaConstraints.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaMetaConstraints.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.UriAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.UriReferenceAdapter; @@ -23,22 +27,16 @@ import gov.nist.secauto.metaschema.databind.model.annotations.Let; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.net.URI; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; /** * Defines constraint rules to be applied to an existing set of Metaschema * module-based models. */ -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions", -}) @MetaschemaAssembly( formalName = "External Module Constraints", description = "Defines constraint rules to be applied to an existing set of Metaschema module-based models.", @@ -64,6 +62,10 @@ public class MetaschemaMetaConstraints implements IBoundObject { private final IMetaschemaData __metaschemaData; + /** + * Declares a set of Metaschema constraints from an out-of-line resource to + * import, supporting composition of constraint sets. + */ @BoundAssembly( description = "Declares a set of Metaschema constraints from an out-of-line resource to import, supporting composition of constraint sets.", useName = "import", @@ -71,12 +73,16 @@ public class MetaschemaMetaConstraints implements IBoundObject { groupAs = @GroupAs(name = "imports", inJson = JsonGroupAsBehavior.LIST)) private List _imports; + /** + * Assigns a Metapath namespace to a prefix for use in a Metapath expression in + * a lexical qualified name. + */ @BoundAssembly( formalName = "Metapath Namespace Declaration", description = "Assigns a Metapath namespace to a prefix for use in a Metapath expression in a lexical qualified name.", useName = "namespace-binding", maxOccurs = -1, - groupAs = @GroupAs(name = "namespace-bindings")) + groupAs = @GroupAs(name = "namespace-bindings", inJson = JsonGroupAsBehavior.LIST)) private List _namespaceBindings; @BoundAssembly( @@ -90,10 +96,23 @@ public class MetaschemaMetaConstraints implements IBoundObject { groupAs = @GroupAs(name = "contexts", inJson = JsonGroupAsBehavior.LIST)) private List _contexts; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaMetaConstraints} + * instance with no metadata. + */ public MetaschemaMetaConstraints() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaMetaConstraints} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public MetaschemaMetaConstraints(IMetaschemaData data) { this.__metaschemaData = data; } @@ -103,11 +122,34 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the {@code import} property. + * + *

+ * Declares a set of Metaschema constraints from an out-of-line resource to + * import, supporting composition of constraint sets. + * + * @return the import value + */ + @NonNull public List getImports() { + if (_imports == null) { + _imports = new LinkedList<>(); + } return _imports; } - public void setImports(List value) { + /** + * Set the {@code import} property. + * + *

+ * Declares a set of Metaschema constraints from an out-of-line resource to + * import, supporting composition of constraint sets. + * + * @param value + * the import value to set + */ + public void setImports(@NonNull List value) { _imports = value; } @@ -138,11 +180,34 @@ public boolean removeImport(Import item) { return _imports != null && _imports.remove(value); } + /** + * Get the metapath Namespace Declaration. + * + *

+ * Assigns a Metapath namespace to a prefix for use in a Metapath expression in + * a lexical qualified name. + * + * @return the namespace-binding value + */ + @NonNull public List getNamespaceBindings() { + if (_namespaceBindings == null) { + _namespaceBindings = new LinkedList<>(); + } return _namespaceBindings; } - public void setNamespaceBindings(List value) { + /** + * Set the metapath Namespace Declaration. + * + *

+ * Assigns a Metapath namespace to a prefix for use in a Metapath expression in + * a lexical qualified name. + * + * @param value + * the namespace-binding value to set + */ + public void setNamespaceBindings(@NonNull List value) { _namespaceBindings = value; } @@ -174,19 +239,46 @@ public boolean removeNamespaceBinding(MetapathNamespace item) { return _namespaceBindings != null && _namespaceBindings.remove(value); } + /** + * Get the {@code definition-context} property. + * + * @return the definition-context value, or {@code null} if not set + */ + @Nullable public DefinitionContext getDefinitionContext() { return _definitionContext; } - public void setDefinitionContext(DefinitionContext value) { + /** + * Set the {@code definition-context} property. + * + * @param value + * the definition-context value to set + */ + public void setDefinitionContext(@Nullable DefinitionContext value) { _definitionContext = value; } + /** + * Get the {@code context} property. + * + * @return the context value + */ + @NonNull public List getContexts() { + if (_contexts == null) { + _contexts = new LinkedList<>(); + } return _contexts; } - public void setContexts(List value) { + /** + * Set the {@code context} property. + * + * @param value + * the context value to set + */ + public void setContexts(@NonNull List value) { _contexts = value; } @@ -235,8 +327,8 @@ public static class Import implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * "A relative or absolute URI for retrieving an out-of-line Metaschema - * constraint definition." + * A relative or absolute URI for retrieving an out-of-line Metaschema + * constraint definition. */ @BoundFlag( description = "A relative or absolute URI for retrieving an out-of-line Metaschema constraint definition.", @@ -245,10 +337,23 @@ public static class Import implements IBoundObject { typeAdapter = UriReferenceAdapter.class) private URI _href; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaMetaConstraints.Import} + * instance with no metadata. + */ public Import() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaMetaConstraints.Import} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Import(IMetaschemaData data) { this.__metaschemaData = data; } @@ -258,11 +363,31 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the {@code href} property. + * + *

+ * A relative or absolute URI for retrieving an out-of-line Metaschema + * constraint definition. + * + * @return the href value + */ + @NonNull public URI getHref() { return _href; } - public void setHref(URI value) { + /** + * Set the {@code href} property. + * + *

+ * A relative or absolute URI for retrieving an out-of-line Metaschema + * constraint definition. + * + * @param value + * the href value to set + */ + public void setHref(@NonNull URI value) { _href = value; } @@ -295,16 +420,33 @@ public static class DefinitionContext implements IBoundObject { minOccurs = 1) private AssemblyConstraints _constraints; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaMetaConstraints.DefinitionContext} + * instance with no metadata. + */ public DefinitionContext() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaMetaConstraints.DefinitionContext} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public DefinitionContext(IMetaschemaData data) { this.__metaschemaData = data; } @@ -314,35 +456,91 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the {@code name} property. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the {@code name} property. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the {@code namespace} property. + * + * @return the namespace value + */ + @NonNull public URI getNamespace() { return _namespace; } - public void setNamespace(URI value) { + /** + * Set the {@code namespace} property. + * + * @param value + * the namespace value to set + */ + public void setNamespace(@NonNull URI value) { _namespace = value; } + /** + * Get the {@code constraints} property. + * + * @return the constraints value + */ + @NonNull public AssemblyConstraints getConstraints() { return _constraints; } - public void setConstraints(AssemblyConstraints value) { + /** + * Set the {@code constraints} property. + * + * @param value + * the constraints value to set + */ + public void setConstraints(@NonNull AssemblyConstraints value) { _constraints = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaMetapath.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaMetapath.java index f8aa03925..08d29dfa5 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaMetapath.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaMetapath.java @@ -2,15 +2,17 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; - import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -18,10 +20,6 @@ * A Metapath expression identifying the model node that the constraints will be * applied to. */ -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions", -}) @MetaschemaAssembly( description = "A Metapath expression identifying the model node that the constraints will be applied to.", name = "metaschema-metapath", @@ -35,10 +33,23 @@ public class MetaschemaMetapath implements IBoundObject { typeAdapter = StringAdapter.class) private String _target; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaMetapath} + * instance with no metadata. + */ public MetaschemaMetapath() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaMetapath} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public MetaschemaMetapath(IMetaschemaData data) { this.__metaschemaData = data; } @@ -48,11 +59,23 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the {@code target} property. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the {@code target} property. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaModelModule.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaModelModule.java index 93930586f..8bf456cf7 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaModelModule.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaModelModule.java @@ -2,24 +2,23 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; -import gov.nist.secauto.metaschema.core.MetaschemaConstants; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultiline; import gov.nist.secauto.metaschema.databind.IBindingContext; import gov.nist.secauto.metaschema.databind.model.AbstractBoundModule; import gov.nist.secauto.metaschema.databind.model.IBoundModule; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaModule; - import java.net.URI; -import java.util.LinkedHashMap; import java.util.List; -import java.util.Map; - -import edu.umd.cs.findbugs.annotations.NonNull; +/** + * Metaschema Model + */ @MetaschemaModule( fields = { UseName.class, @@ -48,11 +47,13 @@ ConstraintLetExpression.class, FlagAllowedValues.class, FlagExpect.class, + FlagReport.class, FlagIndexHasKey.class, FlagMatches.class, TargetedAllowedValuesConstraint.class, TargetedMatchesConstraint.class, TargetedExpectConstraint.class, + TargetedReportConstraint.class, TargetedIndexHasKeyConstraint.class, KeyConstraintField.class, TargetedIsUniqueConstraint.class, @@ -65,34 +66,26 @@ }) public final class MetaschemaModelModule extends AbstractBoundModule { - @NonNull private static final MarkupLine NAME = MarkupLine.fromMarkdown("Metaschema Model"); - @NonNull private static final String SHORT_NAME = "metaschema-model"; - @NonNull - private static final String VERSION = "1.0.0-M2"; - - @NonNull - private static final URI XML_NAMESPACE = MetaschemaConstants.METASCHEMA_NAMESPACE_URI; - - @NonNull - private static final URI JSON_BASE_URI = MetaschemaConstants.METASCHEMA_NAMESPACE_URI; + private static final String VERSION = "1.0.0-rc.1"; - @NonNull - private static final Map NAMESPACE_BINDINGS; + private static final URI XML_NAMESPACE = URI.create("http://csrc.nist.gov/ns/oscal/metaschema/1.0"); - static { - @SuppressWarnings("PMD.UseConcurrentHashMap") - Map bindings = new LinkedHashMap<>(); + private static final URI JSON_BASE_URI = URI.create("http://csrc.nist.gov/ns/oscal/metaschema/1.0"); - NAMESPACE_BINDINGS = bindings; - } - - public MetaschemaModelModule( - @NonNull List importedModules, - @NonNull IBindingContext bindingContext) { + /** + * Construct a new module instance. + * + * @param importedModules + * modules imported by this module + * @param bindingContext + * the binding context to associate with this module + */ + public MetaschemaModelModule(List importedModules, + IBindingContext bindingContext) { super(importedModules, bindingContext); } @@ -125,9 +118,4 @@ public URI getJsonBaseUri() { public MarkupMultiline getRemarks() { return null; } - - @Override - public Map getNamespaceBindings() { - return NAMESPACE_BINDINGS; - } } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaModuleConstraints.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaModuleConstraints.java index 53164d09a..961a55947 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaModuleConstraints.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/MetaschemaModuleConstraints.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.UriAdapter; @@ -13,7 +17,6 @@ import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.core.model.JsonGroupAsBehavior; import gov.nist.secauto.metaschema.core.model.constraint.IConstraint; -import gov.nist.secauto.metaschema.core.util.CollectionUtil; import gov.nist.secauto.metaschema.core.util.ObjectUtils; import gov.nist.secauto.metaschema.databind.model.annotations.BoundAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.BoundChoiceGroup; @@ -25,26 +28,20 @@ import gov.nist.secauto.metaschema.databind.model.annotations.Let; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; -import gov.nist.secauto.metaschema.databind.model.metaschema.IModelConstraintsBase; +import gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase; import gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase; import gov.nist.secauto.metaschema.databind.model.metaschema.IValueConstraintsBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - +import gov.nist.secauto.metaschema.databind.model.metaschema.IValueTargetedConstraintsBase; import java.net.URI; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; /** * Defines constraint rules to be applied to an existing set of Metaschema * module-based models. */ -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions", - "PMD.ShortClassName" -}) @MetaschemaAssembly( formalName = "External Module Constraints", description = "Defines constraint rules to be applied to an existing set of Metaschema module-based models.", @@ -61,6 +58,9 @@ public class MetaschemaModuleConstraints implements IBoundObject { private final IMetaschemaData __metaschemaData; + /** + * The name of this constraint set. + */ @BoundField( description = "The name of this constraint set.", useName = "name", @@ -68,6 +68,10 @@ public class MetaschemaModuleConstraints implements IBoundObject { typeAdapter = StringAdapter.class) private String _name; + /** + * The version of this constraint set. A version string used to distinguish + * between multiple revisions of the same resource. + */ @BoundField( description = "The version of this constraint set. A version string used to distinguish between multiple revisions of the same resource.", useName = "version", @@ -75,6 +79,10 @@ public class MetaschemaModuleConstraints implements IBoundObject { typeAdapter = StringAdapter.class) private String _version; + /** + * Declares a set of Metaschema constraints from an out-of-line resource to + * import, supporting composition of constraint sets. + */ @BoundAssembly( description = "Declares a set of Metaschema constraints from an out-of-line resource to import, supporting composition of constraint sets.", useName = "import", @@ -82,12 +90,16 @@ public class MetaschemaModuleConstraints implements IBoundObject { groupAs = @GroupAs(name = "imports", inJson = JsonGroupAsBehavior.LIST)) private List _imports; + /** + * Assigns a Metapath namespace to a prefix for use in a Metapath expression in + * a lexical qualified name. + */ @BoundAssembly( formalName = "Metapath Namespace Declaration", description = "Assigns a Metapath namespace to a prefix for use in a Metapath expression in a lexical qualified name.", useName = "namespace-binding", maxOccurs = -1, - groupAs = @GroupAs(name = "namespace-bindings")) + groupAs = @GroupAs(name = "namespace-bindings", inJson = JsonGroupAsBehavior.LIST)) private List _namespaceBindings; @BoundAssembly( @@ -97,10 +109,23 @@ public class MetaschemaModuleConstraints implements IBoundObject { groupAs = @GroupAs(name = "scopes", inJson = JsonGroupAsBehavior.LIST)) private List _scopes; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints} + * instance with no metadata. + */ public MetaschemaModuleConstraints() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public MetaschemaModuleConstraints(IMetaschemaData data) { this.__metaschemaData = data; } @@ -110,27 +135,88 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the {@code name} property. + * + *

+ * The name of this constraint set. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the {@code name} property. + * + *

+ * The name of this constraint set. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the {@code version} property. + * + *

+ * The version of this constraint set. A version string used to distinguish + * between multiple revisions of the same resource. + * + * @return the version value + */ + @NonNull public String getVersion() { return _version; } - public void setVersion(String value) { + /** + * Set the {@code version} property. + * + *

+ * The version of this constraint set. A version string used to distinguish + * between multiple revisions of the same resource. + * + * @param value + * the version value to set + */ + public void setVersion(@NonNull String value) { _version = value; } + /** + * Get the {@code import} property. + * + *

+ * Declares a set of Metaschema constraints from an out-of-line resource to + * import, supporting composition of constraint sets. + * + * @return the import value + */ + @NonNull public List getImports() { + if (_imports == null) { + _imports = new LinkedList<>(); + } return _imports; } - public void setImports(List value) { + /** + * Set the {@code import} property. + * + *

+ * Declares a set of Metaschema constraints from an out-of-line resource to + * import, supporting composition of constraint sets. + * + * @param value + * the import value to set + */ + public void setImports(@NonNull List value) { _imports = value; } @@ -161,11 +247,34 @@ public boolean removeImport(Import item) { return _imports != null && _imports.remove(value); } + /** + * Get the metapath Namespace Declaration. + * + *

+ * Assigns a Metapath namespace to a prefix for use in a Metapath expression in + * a lexical qualified name. + * + * @return the namespace-binding value + */ + @NonNull public List getNamespaceBindings() { + if (_namespaceBindings == null) { + _namespaceBindings = new LinkedList<>(); + } return _namespaceBindings; } - public void setNamespaceBindings(List value) { + /** + * Set the metapath Namespace Declaration. + * + *

+ * Assigns a Metapath namespace to a prefix for use in a Metapath expression in + * a lexical qualified name. + * + * @param value + * the namespace-binding value to set + */ + public void setNamespaceBindings(@NonNull List value) { _namespaceBindings = value; } @@ -197,11 +306,26 @@ public boolean removeNamespaceBinding(MetapathNamespace item) { return _namespaceBindings != null && _namespaceBindings.remove(value); } + /** + * Get the {@code scope} property. + * + * @return the scope value + */ + @NonNull public List getScopes() { + if (_scopes == null) { + _scopes = new LinkedList<>(); + } return _scopes; } - public void setScopes(List value) { + /** + * Set the {@code scope} property. + * + * @param value + * the scope value to set + */ + public void setScopes(@NonNull List value) { _scopes = value; } @@ -249,8 +373,8 @@ public static class Import implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * "A relative or absolute URI for retrieving an out-of-line Metaschema - * constraint definition." + * A relative or absolute URI for retrieving an out-of-line Metaschema + * constraint definition. */ @BoundFlag( description = "A relative or absolute URI for retrieving an out-of-line Metaschema constraint definition.", @@ -259,10 +383,23 @@ public static class Import implements IBoundObject { typeAdapter = UriReferenceAdapter.class) private URI _href; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints.Import} + * instance with no metadata. + */ public Import() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints.Import} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Import(IMetaschemaData data) { this.__metaschemaData = data; } @@ -272,11 +409,31 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the {@code href} property. + * + *

+ * A relative or absolute URI for retrieving an out-of-line Metaschema + * constraint definition. + * + * @return the href value + */ + @NonNull public URI getHref() { return _href; } - public void setHref(URI value) { + /** + * Set the {@code href} property. + * + *

+ * A relative or absolute URI for retrieving an out-of-line Metaschema + * constraint definition. + * + * @param value + * the href value to set + */ + public void setHref(@NonNull URI value) { _href = value; } @@ -307,12 +464,12 @@ public static class Scope implements IBoundObject { @BoundChoiceGroup( minOccurs = 1, maxOccurs = -1, + groupAs = @GroupAs(name = "constraints", inJson = JsonGroupAsBehavior.LIST), assemblies = { @BoundGroupedAssembly(useName = "assembly", binding = Assembly.class), @BoundGroupedAssembly(useName = "field", binding = Field.class), @BoundGroupedAssembly(useName = "flag", binding = Flag.class) - }, - groupAs = @GroupAs(name = "constraints", inJson = JsonGroupAsBehavior.LIST)) + }) private List _constraints; @BoundField( @@ -321,16 +478,33 @@ public static class Scope implements IBoundObject { typeAdapter = StringAdapter.class) private String _message; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints.Scope} + * instance with no metadata. + */ public Scope() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints.Scope} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Scope(IMetaschemaData data) { this.__metaschemaData = data; } @@ -340,43 +514,120 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the {@code metaschema-namespace} property. + * + * @return the metaschema-namespace value + */ + @NonNull public URI getMetaschemaNamespace() { return _metaschemaNamespace; } - public void setMetaschemaNamespace(URI value) { + /** + * Set the {@code metaschema-namespace} property. + * + * @param value + * the metaschema-namespace value to set + */ + public void setMetaschemaNamespace(@NonNull URI value) { _metaschemaNamespace = value; } + /** + * Get the {@code metaschema-short-name} property. + * + * @return the metaschema-short-name value + */ + @NonNull public String getMetaschemaShortName() { return _metaschemaShortName; } - public void setMetaschemaShortName(String value) { + /** + * Set the {@code metaschema-short-name} property. + * + * @param value + * the metaschema-short-name value to set + */ + public void setMetaschemaShortName(@NonNull String value) { _metaschemaShortName = value; } + /** + * Get the {@code constraints} choice group items. + * + *

+ * Items in this collection implement {@link IValueConstraintsBase}. + * + * @return the constraints items + */ + @NonNull public List getConstraints() { + if (_constraints == null) { + _constraints = new LinkedList<>(); + } return _constraints; } - public void setConstraints(List value) { + /** + * Set the {@code constraints} choice group items. + * + *

+ * Items in this collection must implement {@link IValueConstraintsBase}. + * + * @param value + * the constraints items to set + */ + public void setConstraints(@NonNull List value) { _constraints = value; } + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable public String getMessage() { return _message; } - public void setMessage(String value) { + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { _message = value; } + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } @@ -388,7 +639,7 @@ public String toString() { @MetaschemaAssembly( name = "assembly", moduleClass = MetaschemaModelModule.class) - public static class Assembly implements IModelConstraintsBase { + public static class Assembly implements IBoundObject, IValueTargetedConstraintsBase { private final IMetaschemaData __metaschemaData; @BoundFlag( @@ -401,6 +652,7 @@ public static class Assembly implements IModelConstraintsBase { @BoundChoiceGroup( minOccurs = 1, maxOccurs = -1, + groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST), assemblies = { @BoundGroupedAssembly(formalName = "Allowed Values Constraint", useName = "allowed-values", binding = TargetedAllowedValuesConstraint.class), @@ -415,15 +667,29 @@ public static class Assembly implements IModelConstraintsBase { @BoundGroupedAssembly(formalName = "Targeted Index Constraint", useName = "index", binding = TargetedIndexConstraint.class), @BoundGroupedAssembly(formalName = "Targeted Cardinality Constraint", useName = "has-cardinality", - binding = TargetedHasCardinalityConstraint.class) - }, - groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST)) + binding = TargetedHasCardinalityConstraint.class), + @BoundGroupedAssembly(formalName = "Report Condition Constraint", useName = "report", + binding = TargetedReportConstraint.class) + }) private List _rules; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints.Scope.Assembly} + * instance with no metadata. + */ public Assembly() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints.Scope.Assembly} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Assembly(IMetaschemaData data) { this.__metaschemaData = data; } @@ -433,25 +699,52 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } - @Override - public List getLets() { - return CollectionUtil.emptyList(); - } - - @Override + /** + * Get the {@code rules} choice group items. + * + *

+ * Items in this collection implement {@link ITargetedConstraintBase}. + * + * @return the rules items + */ + @NonNull public List getRules() { + if (_rules == null) { + _rules = new LinkedList<>(); + } return _rules; } - public void setRules(List value) { + /** + * Set the {@code rules} choice group items. + * + *

+ * Items in this collection must implement {@link ITargetedConstraintBase}. + * + * @param value + * the rules items to set + */ + public void setRules(@NonNull List value) { _rules = value; } @@ -464,7 +757,7 @@ public String toString() { @MetaschemaAssembly( name = "field", moduleClass = MetaschemaModelModule.class) - public static class Field implements IValueConstraintsBase { + public static class Field implements IBoundObject, IValueTargetedConstraintsBase { private final IMetaschemaData __metaschemaData; @BoundFlag( @@ -477,6 +770,7 @@ public static class Field implements IValueConstraintsBase { @BoundChoiceGroup( minOccurs = 1, maxOccurs = -1, + groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST), assemblies = { @BoundGroupedAssembly(formalName = "Allowed Values Constraint", useName = "allowed-values", binding = TargetedAllowedValuesConstraint.class), @@ -485,15 +779,29 @@ public static class Field implements IValueConstraintsBase { @BoundGroupedAssembly(formalName = "Targeted Index Has Key Constraint", useName = "index-has-key", binding = TargetedIndexHasKeyConstraint.class), @BoundGroupedAssembly(formalName = "Value Matches Constraint", useName = "matches", - binding = TargetedMatchesConstraint.class) - }, - groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST)) + binding = TargetedMatchesConstraint.class), + @BoundGroupedAssembly(formalName = "Report Condition Constraint", useName = "report", + binding = TargetedReportConstraint.class) + }) private List _rules; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints.Scope.Field} + * instance with no metadata. + */ public Field() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints.Scope.Field} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Field(IMetaschemaData data) { this.__metaschemaData = data; } @@ -503,25 +811,52 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } - @Override - public List getLets() { - return CollectionUtil.emptyList(); - } - - @Override + /** + * Get the {@code rules} choice group items. + * + *

+ * Items in this collection implement {@link ITargetedConstraintBase}. + * + * @return the rules items + */ + @NonNull public List getRules() { + if (_rules == null) { + _rules = new LinkedList<>(); + } return _rules; } - public void setRules(List value) { + /** + * Set the {@code rules} choice group items. + * + *

+ * Items in this collection must implement {@link ITargetedConstraintBase}. + * + * @param value + * the rules items to set + */ + public void setRules(@NonNull List value) { _rules = value; } @@ -534,7 +869,7 @@ public String toString() { @MetaschemaAssembly( name = "flag", moduleClass = MetaschemaModelModule.class) - public static class Flag implements IValueConstraintsBase { + public static class Flag implements IBoundObject, IValueConstraintsBase { private final IMetaschemaData __metaschemaData; @BoundFlag( @@ -547,6 +882,7 @@ public static class Flag implements IValueConstraintsBase { @BoundChoiceGroup( minOccurs = 1, maxOccurs = -1, + groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST), assemblies = { @BoundGroupedAssembly(formalName = "Allowed Values Constraint", useName = "allowed-values", binding = FlagAllowedValues.class), @@ -555,15 +891,29 @@ public static class Flag implements IValueConstraintsBase { @BoundGroupedAssembly(formalName = "Index Has Key Constraint", useName = "index-has-key", binding = FlagIndexHasKey.class), @BoundGroupedAssembly(formalName = "Value Matches Constraint", useName = "matches", - binding = FlagMatches.class) - }, - groupAs = @GroupAs(name = "rules", inJson = JsonGroupAsBehavior.LIST)) - private List _rules; - + binding = FlagMatches.class), + @BoundGroupedAssembly(formalName = "Report Condition Constraint", useName = "report", + binding = FlagReport.class) + }) + private List _rules; + + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints.Scope.Flag} + * instance with no metadata. + */ public Flag() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModuleConstraints.Scope.Flag} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Flag(IMetaschemaData data) { this.__metaschemaData = data; } @@ -573,25 +923,52 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override - public List getLets() { - return CollectionUtil.emptyList(); - } - + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } - @Override - public List getRules() { + /** + * Get the {@code rules} choice group items. + * + *

+ * Items in this collection implement {@link IConstraintBase}. + * + * @return the rules items + */ + @NonNull + public List getRules() { + if (_rules == null) { + _rules = new LinkedList<>(); + } return _rules; } - public void setRules(List value) { + /** + * Set the {@code rules} choice group items. + * + *

+ * Items in this collection must implement {@link IConstraintBase}. + * + * @param value + * the rules items to set + */ + public void setRules(@NonNull List value) { _rules = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Property.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Property.java index 2a2bc7123..42a6b1189 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Property.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Property.java @@ -2,27 +2,24 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.UriAdapter; -import gov.nist.secauto.metaschema.core.model.IAttributable; import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.metaschema.core.model.IMetaschemaData; import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; - +import java.net.URI; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -import java.net.URI; - -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Property", name = "property", @@ -40,7 +37,7 @@ public class Property implements IBoundObject { @BoundFlag( formalName = "Property Namespace", name = "namespace", - defaultValue = IAttributable.DEFAULT_PROPERY_NAMESPACE, + defaultValue = "http://csrc.nist.gov/ns/oscal/metaschema/1.0", typeAdapter = UriAdapter.class) private URI _namespace; @@ -51,10 +48,23 @@ public class Property implements IBoundObject { typeAdapter = StringAdapter.class) private String _value; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.Property} + * instance with no metadata. + */ public Property() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.Property} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Property(IMetaschemaData data) { this.__metaschemaData = data; } @@ -64,27 +74,63 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the property Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the property Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } + /** + * Get the property Namespace. + * + * @return the namespace value, or {@code null} if not set + */ + @Nullable public URI getNamespace() { return _namespace; } - public void setNamespace(URI value) { + /** + * Set the property Namespace. + * + * @param value + * the namespace value to set + */ + public void setNamespace(@Nullable URI value) { _namespace = value; } + /** + * Get the property Value. + * + * @return the value value + */ + @NonNull public String getValue() { return _value; } - public void setValue(String value) { + /** + * Set the property Value. + * + * @param value + * the value value to set + */ + public void setValue(@NonNull String value) { _value = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Remarks.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Remarks.java index 2d7fe79a3..af83d68df 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Remarks.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/Remarks.java @@ -2,9 +2,12 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultiline; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultilineAdapter; @@ -17,7 +20,6 @@ import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaField; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; - import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -25,10 +27,6 @@ * Any explanatory or helpful information to be provided about the remarks * parent. */ -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", @@ -38,8 +36,8 @@ public class Remarks implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * "Mark as ‘XML’ for XML-only or ‘JSON’ for JSON-only - * remarks." + * Mark as ‘XML’ for XML-only or ‘JSON’ for JSON-only + * remarks. */ @BoundFlag( formalName = "Remark Class", @@ -58,10 +56,23 @@ public class Remarks implements IBoundObject { typeAdapter = MarkupMultilineAdapter.class) private MarkupMultiline _remark; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.Remarks} + * instance with no metadata. + */ public Remarks() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.Remarks} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public Remarks(IMetaschemaData data) { this.__metaschemaData = data; } @@ -71,19 +82,40 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the remark Class. + * + *

+ * Mark as ‘XML’ for XML-only or ‘JSON’ for JSON-only + * remarks. + * + * @return the class value, or {@code null} if not set + */ + @Nullable public String getClazz() { return _clazz; } - public void setClazz(String value) { + /** + * Set the remark Class. + * + *

+ * Mark as ‘XML’ for XML-only or ‘JSON’ for JSON-only + * remarks. + * + * @param value + * the class value to set + */ + public void setClazz(@Nullable String value) { _clazz = value; } + @Nullable public MarkupMultiline getRemark() { return _remark; } - public void setRemark(MarkupMultiline value) { + public void setRemark(@Nullable MarkupMultiline value) { _remark = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedAllowedValuesConstraint.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedAllowedValuesConstraint.java index 3c083de9c..68bbea158 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedAllowedValuesConstraint.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedAllowedValuesConstraint.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -23,17 +27,11 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Allowed Values Constraint", name = "targeted-allowed-values-constraint", @@ -76,8 +74,8 @@ public class TargetedAllowedValuesConstraint implements IBoundObject, ITargetedC private String _allowOther; /** - * "Determines if the given enumerated values may be extended by other allowed - * value constraints." + * Determines if the given enumerated values may be extended by other allowed + * value constraints. */ @BoundFlag( formalName = "Allow Extension?", @@ -99,6 +97,9 @@ public class TargetedAllowedValuesConstraint implements IBoundObject, ITargetedC typeAdapter = StringAdapter.class) private String _target; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -106,6 +107,10 @@ public class TargetedAllowedValuesConstraint implements IBoundObject, ITargetedC typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -128,16 +133,33 @@ public class TargetedAllowedValuesConstraint implements IBoundObject, ITargetedC groupAs = @GroupAs(name = "enums", inJson = JsonGroupAsBehavior.LIST)) private List _enums; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedAllowedValuesConstraint} + * instance with no metadata. + */ public TargetedAllowedValuesConstraint() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedAllowedValuesConstraint} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public TargetedAllowedValuesConstraint(IMetaschemaData data) { this.__metaschemaData = data; } @@ -147,73 +169,188 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } + /** + * Get the allow Non-Enumerated Values?. + * + * @return the allow-other value, or {@code null} if not set + */ + @Nullable public String getAllowOther() { return _allowOther; } - public void setAllowOther(String value) { + /** + * Set the allow Non-Enumerated Values?. + * + * @param value + * the allow-other value to set + */ + public void setAllowOther(@Nullable String value) { _allowOther = value; } + /** + * Get the allow Extension?. + * + *

+ * Determines if the given enumerated values may be extended by other allowed + * value constraints. + * + * @return the extensible value, or {@code null} if not set + */ + @Nullable public String getExtensible() { return _extensible; } - public void setExtensible(String value) { + /** + * Set the allow Extension?. + * + *

+ * Determines if the given enumerated values may be extended by other allowed + * value constraints. + * + * @param value + * the extensible value to set + */ + public void setExtensible(@Nullable String value) { _extensible = value; } - @Override + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -245,11 +382,26 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the allowed Value Enumeration. + * + * @return the enum value + */ + @NonNull public List getEnums() { + if (_enums == null) { + _enums = new LinkedList<>(); + } return _enums; } - public void setEnums(List value) { + /** + * Set the allowed Value Enumeration. + * + * @param value + * the enum value to set + */ + public void setEnums(@NonNull List value) { _enums = value; } @@ -281,12 +433,31 @@ public boolean removeEnum(ConstraintValueEnum item) { return _enums != null && _enums.remove(value); } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedExpectConstraint.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedExpectConstraint.java index 45e54a158..1f7bbb546 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedExpectConstraint.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedExpectConstraint.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -23,24 +27,16 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; -import gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Expect Condition Constraint", name = "targeted-expect-constraint", moduleClass = MetaschemaModelModule.class) -public class TargetedExpectConstraint - implements IBoundObject, ITargetedConstraintBase, IConfigurableMessageConstraintBase { +public class TargetedExpectConstraint implements IBoundObject, IConfigurableMessageConstraintBase { private final IMetaschemaData __metaschemaData; @BoundFlag( @@ -81,6 +77,9 @@ public class TargetedExpectConstraint typeAdapter = StringAdapter.class) private String _target; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -88,6 +87,10 @@ public class TargetedExpectConstraint typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -108,16 +111,33 @@ public class TargetedExpectConstraint typeAdapter = StringAdapter.class) private String _message; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedExpectConstraint} + * instance with no metadata. + */ public TargetedExpectConstraint() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedExpectConstraint} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public TargetedExpectConstraint(IMetaschemaData data) { this.__metaschemaData = data; } @@ -127,65 +147,160 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } + /** + * Get the expect Test Condition. + * + * @return the test value + */ + @NonNull public String getTest() { return _test; } - public void setTest(String value) { + /** + * Set the expect Test Condition. + * + * @param value + * the test value to set + */ + public void setTest(@NonNull String value) { _test = value; } - @Override + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -217,21 +332,51 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } - @Override + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable public String getMessage() { return _message; } - public void setMessage(String value) { + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { _message = value; } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedHasCardinalityConstraint.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedHasCardinalityConstraint.java index 0181670f2..808f711de 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedHasCardinalityConstraint.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedHasCardinalityConstraint.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.NonNegativeIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; @@ -25,25 +29,17 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; -import gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.math.BigInteger; import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Targeted Cardinality Constraint", name = "targeted-has-cardinality-constraint", moduleClass = MetaschemaModelModule.class) -public class TargetedHasCardinalityConstraint - implements IBoundObject, ITargetedConstraintBase, IConfigurableMessageConstraintBase { +public class TargetedHasCardinalityConstraint implements IBoundObject, IConfigurableMessageConstraintBase { private final IMetaschemaData __metaschemaData; @BoundFlag( @@ -91,6 +87,9 @@ public class TargetedHasCardinalityConstraint typeAdapter = StringAdapter.class) private String _target; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -98,6 +97,10 @@ public class TargetedHasCardinalityConstraint typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -118,16 +121,33 @@ public class TargetedHasCardinalityConstraint typeAdapter = StringAdapter.class) private String _message; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedHasCardinalityConstraint} + * instance with no metadata. + */ public TargetedHasCardinalityConstraint() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedHasCardinalityConstraint} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public TargetedHasCardinalityConstraint(IMetaschemaData data) { this.__metaschemaData = data; } @@ -137,73 +157,180 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } + /** + * Get the minimum Occurrence. + * + * @return the min-occurs value, or {@code null} if not set + */ + @Nullable public BigInteger getMinOccurs() { return _minOccurs; } - public void setMinOccurs(BigInteger value) { + /** + * Set the minimum Occurrence. + * + * @param value + * the min-occurs value to set + */ + public void setMinOccurs(@Nullable BigInteger value) { _minOccurs = value; } + /** + * Get the maximum Occurrence. + * + * @return the max-occurs value, or {@code null} if not set + */ + @Nullable public String getMaxOccurs() { return _maxOccurs; } - public void setMaxOccurs(String value) { + /** + * Set the maximum Occurrence. + * + * @param value + * the max-occurs value to set + */ + public void setMaxOccurs(@Nullable String value) { _maxOccurs = value; } - @Override + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -235,21 +362,51 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } - @Override + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable public String getMessage() { return _message; } - public void setMessage(String value) { + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { _message = value; } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIndexConstraint.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIndexConstraint.java index bde7c772f..aee1b72d8 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIndexConstraint.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIndexConstraint.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -23,24 +27,16 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; -import gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Targeted Index Constraint", name = "targeted-index-constraint", moduleClass = MetaschemaModelModule.class) -public class TargetedIndexConstraint - implements IBoundObject, ITargetedConstraintBase, IConfigurableMessageConstraintBase { +public class TargetedIndexConstraint implements IBoundObject, IConfigurableMessageConstraintBase { private final IMetaschemaData __metaschemaData; @BoundFlag( @@ -81,6 +77,9 @@ public class TargetedIndexConstraint typeAdapter = StringAdapter.class) private String _target; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -88,6 +87,10 @@ public class TargetedIndexConstraint typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -116,16 +119,33 @@ public class TargetedIndexConstraint typeAdapter = StringAdapter.class) private String _message; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedIndexConstraint} + * instance with no metadata. + */ public TargetedIndexConstraint() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedIndexConstraint} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public TargetedIndexConstraint(IMetaschemaData data) { this.__metaschemaData = data; } @@ -135,65 +155,160 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } + /** + * Get the index Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the index Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } - @Override + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -225,11 +340,26 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the key Constraint Field. + * + * @return the key-field value + */ + @NonNull public List getKeyFields() { + if (_keyFields == null) { + _keyFields = new LinkedList<>(); + } return _keyFields; } - public void setKeyFields(List value) { + /** + * Set the key Constraint Field. + * + * @param value + * the key-field value to set + */ + public void setKeyFields(@NonNull List value) { _keyFields = value; } @@ -261,21 +391,51 @@ public boolean removeKeyField(KeyConstraintField item) { return _keyFields != null && _keyFields.remove(value); } - @Override + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable public String getMessage() { return _message; } - public void setMessage(String value) { + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { _message = value; } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIndexHasKeyConstraint.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIndexHasKeyConstraint.java index e54128d3e..186fe574b 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIndexHasKeyConstraint.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIndexHasKeyConstraint.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -23,24 +27,16 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; -import gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Targeted Index Has Key Constraint", name = "targeted-index-has-key-constraint", moduleClass = MetaschemaModelModule.class) -public class TargetedIndexHasKeyConstraint - implements IBoundObject, ITargetedConstraintBase, IConfigurableMessageConstraintBase { +public class TargetedIndexHasKeyConstraint implements IBoundObject, IConfigurableMessageConstraintBase { private final IMetaschemaData __metaschemaData; @BoundFlag( @@ -81,6 +77,9 @@ public class TargetedIndexHasKeyConstraint typeAdapter = StringAdapter.class) private String _target; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -88,6 +87,10 @@ public class TargetedIndexHasKeyConstraint typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -116,16 +119,33 @@ public class TargetedIndexHasKeyConstraint typeAdapter = StringAdapter.class) private String _message; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedIndexHasKeyConstraint} + * instance with no metadata. + */ public TargetedIndexHasKeyConstraint() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedIndexHasKeyConstraint} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public TargetedIndexHasKeyConstraint(IMetaschemaData data) { this.__metaschemaData = data; } @@ -135,65 +155,160 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } + /** + * Get the index Name. + * + * @return the name value + */ + @NonNull public String getName() { return _name; } - public void setName(String value) { + /** + * Set the index Name. + * + * @param value + * the name value to set + */ + public void setName(@NonNull String value) { _name = value; } - @Override + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -225,11 +340,26 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the key Constraint Field. + * + * @return the key-field value + */ + @NonNull public List getKeyFields() { + if (_keyFields == null) { + _keyFields = new LinkedList<>(); + } return _keyFields; } - public void setKeyFields(List value) { + /** + * Set the key Constraint Field. + * + * @param value + * the key-field value to set + */ + public void setKeyFields(@NonNull List value) { _keyFields = value; } @@ -261,21 +391,51 @@ public boolean removeKeyField(KeyConstraintField item) { return _keyFields != null && _keyFields.remove(value); } - @Override + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable public String getMessage() { return _message; } - public void setMessage(String value) { + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { _message = value; } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIsUniqueConstraint.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIsUniqueConstraint.java index 076e63907..03b9b7ea3 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIsUniqueConstraint.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedIsUniqueConstraint.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -23,24 +27,16 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; -import gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Targeted Unique Constraint", name = "targeted-is-unique-constraint", moduleClass = MetaschemaModelModule.class) -public class TargetedIsUniqueConstraint - implements IBoundObject, ITargetedConstraintBase, IConfigurableMessageConstraintBase { +public class TargetedIsUniqueConstraint implements IBoundObject, IConfigurableMessageConstraintBase { private final IMetaschemaData __metaschemaData; @BoundFlag( @@ -74,6 +70,9 @@ public class TargetedIsUniqueConstraint typeAdapter = StringAdapter.class) private String _target; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -81,6 +80,10 @@ public class TargetedIsUniqueConstraint typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -109,16 +112,33 @@ public class TargetedIsUniqueConstraint typeAdapter = StringAdapter.class) private String _message; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedIsUniqueConstraint} + * instance with no metadata. + */ public TargetedIsUniqueConstraint() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedIsUniqueConstraint} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public TargetedIsUniqueConstraint(IMetaschemaData data) { this.__metaschemaData = data; } @@ -128,57 +148,140 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } - @Override + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -210,11 +313,26 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } + /** + * Get the key Constraint Field. + * + * @return the key-field value + */ + @NonNull public List getKeyFields() { + if (_keyFields == null) { + _keyFields = new LinkedList<>(); + } return _keyFields; } - public void setKeyFields(List value) { + /** + * Set the key Constraint Field. + * + * @param value + * the key-field value to set + */ + public void setKeyFields(@NonNull List value) { _keyFields = value; } @@ -246,21 +364,51 @@ public boolean removeKeyField(KeyConstraintField item) { return _keyFields != null && _keyFields.remove(value); } - @Override + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable public String getMessage() { return _message; } - public void setMessage(String value) { + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { _message = value; } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedMatchesConstraint.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedMatchesConstraint.java index da1446fbc..47ae8e31c 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedMatchesConstraint.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedMatchesConstraint.java @@ -2,9 +2,13 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; @@ -23,24 +27,16 @@ import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; -import gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase; - -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.LinkedList; import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaAssembly( formalName = "Value Matches Constraint", name = "targeted-matches-constraint", moduleClass = MetaschemaModelModule.class) -public class TargetedMatchesConstraint - implements IBoundObject, ITargetedConstraintBase, IConfigurableMessageConstraintBase { +public class TargetedMatchesConstraint implements IBoundObject, IConfigurableMessageConstraintBase { private final IMetaschemaData __metaschemaData; @BoundFlag( @@ -80,57 +76,63 @@ public class TargetedMatchesConstraint valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = { @AllowedValue(value = "base64", - description = "The [base64](https://pages.nist.gov/metaschema/specification/datatypes/#base64) data type."), + description = "The [base64](https://framework.metaschema.dev/specification/datatypes/#base64) data type."), @AllowedValue(value = "boolean", - description = "The [boolean](https://pages.nist.gov/metaschema/specification/datatypes/#boolean) data type."), + description = "The [boolean](https://framework.metaschema.dev/specification/datatypes/#boolean) data type."), @AllowedValue(value = "date", - description = "The [date](https://pages.nist.gov/metaschema/specification/datatypes/#date) data type."), + description = "The [date](https://framework.metaschema.dev/specification/datatypes/#date) data type."), @AllowedValue(value = "date-time", - description = "The [date-time](https://pages.nist.gov/metaschema/specification/datatypes/#date-time) data type."), + description = "The [date-time](https://framework.metaschema.dev/specification/datatypes/#date-time) data type."), @AllowedValue(value = "date-time-with-timezone", - description = "The [date-time-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-time-with-timezone) data type."), + description = "The [date-time-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-time-with-timezone) data type."), @AllowedValue(value = "date-with-timezone", - description = "The [date-with-timezone](https://pages.nist.gov/metaschema/specification/datatypes/#date-with-timezone) data type."), + description = "The [date-with-timezone](https://framework.metaschema.dev/specification/datatypes/#date-with-timezone) data type."), @AllowedValue(value = "day-time-duration", - description = "The [day-time-duration](https://pages.nist.gov/metaschema/specification/datatypes/#day-time-duration) data type."), + description = "The [day-time-duration](https://framework.metaschema.dev/specification/datatypes/#day-time-duration) data type."), @AllowedValue(value = "decimal", - description = "The [decimal](https://pages.nist.gov/metaschema/specification/datatypes/#decimal) data type."), + description = "The [decimal](https://framework.metaschema.dev/specification/datatypes/#decimal) data type."), @AllowedValue(value = "email-address", - description = "The [email-address](https://pages.nist.gov/metaschema/specification/datatypes/#email-address) data type."), + description = "The [email-address](https://framework.metaschema.dev/specification/datatypes/#email-address) data type."), @AllowedValue(value = "hostname", - description = "The [hostname](https://pages.nist.gov/metaschema/specification/datatypes/#hostname) data type."), + description = "The [hostname](https://framework.metaschema.dev/specification/datatypes/#hostname) data type."), @AllowedValue(value = "integer", - description = "The [integer](https://pages.nist.gov/metaschema/specification/datatypes/#integer) data type."), + description = "The [integer](https://framework.metaschema.dev/specification/datatypes/#integer) data type."), @AllowedValue(value = "ip-v4-address", - description = "The [ip-v4-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v4-address) data type."), + description = "The [ip-v4-address](https://framework.metaschema.dev/specification/datatypes/#ip-v4-address) data type."), @AllowedValue(value = "ip-v6-address", - description = "The [ip-v6-address](https://pages.nist.gov/metaschema/specification/datatypes/#ip-v6-address) data type."), + description = "The [ip-v6-address](https://framework.metaschema.dev/specification/datatypes/#ip-v6-address) data type."), @AllowedValue(value = "non-negative-integer", - description = "The [non-negative-integer](https://pages.nist.gov/metaschema/specification/datatypes/#non-negative-integer) data type."), + description = "The [non-negative-integer](https://framework.metaschema.dev/specification/datatypes/#non-negative-integer) data type."), @AllowedValue(value = "positive-integer", - description = "The [positive-integer](https://pages.nist.gov/metaschema/specification/datatypes/#positive-integer) data type."), + description = "The [positive-integer](https://framework.metaschema.dev/specification/datatypes/#positive-integer) data type."), @AllowedValue(value = "string", - description = "The [string](https://pages.nist.gov/metaschema/specification/datatypes/#string) data type."), + description = "The [string](https://framework.metaschema.dev/specification/datatypes/#string) data type."), @AllowedValue(value = "token", - description = "The [token](https://pages.nist.gov/metaschema/specification/datatypes/#token) data type."), + description = "The [token](https://framework.metaschema.dev/specification/datatypes/#token) data type."), @AllowedValue(value = "uri", - description = "The [uri](https://pages.nist.gov/metaschema/specification/datatypes/#uri) data type."), + description = "The [uri](https://framework.metaschema.dev/specification/datatypes/#uri) data type."), @AllowedValue(value = "uri-reference", - description = "The [uri-reference](https://pages.nist.gov/metaschema/specification/datatypes/#uri-reference) data type."), + description = "The [uri-reference](https://framework.metaschema.dev/specification/datatypes/#uri-reference) data type."), @AllowedValue(value = "uuid", - description = "The [uuid](https://pages.nist.gov/metaschema/specification/datatypes/#uuid) data type."), + description = "The [uuid](https://framework.metaschema.dev/specification/datatypes/#uuid) data type."), @AllowedValue(value = "base64Binary", - description = "An old name which is deprecated for use in favor of the 'base64' data type."), + description = "An old name which is deprecated for use in favor of the 'base64' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime", - description = "An old name which is deprecated for use in favor of the 'date-time' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "dateTime-with-timezone", - description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type."), + description = "An old name which is deprecated for use in favor of the 'date-time-with-timezone' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "email", - description = "An old name which is deprecated for use in favor of the 'email-address' data type."), + description = "An old name which is deprecated for use in favor of the 'email-address' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "nonNegativeInteger", - description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type."), + description = "An old name which is deprecated for use in favor of the 'non-negative-integer' data type.", + deprecatedVersion = "1.0.0"), @AllowedValue(value = "positiveInteger", - description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.") }))) + description = "An old name which is deprecated for use in favor of the 'positive-integer' data type.", + deprecatedVersion = "1.0.0") }))) private String _datatype; @BoundFlag( @@ -140,6 +142,9 @@ public class TargetedMatchesConstraint typeAdapter = StringAdapter.class) private String _target; + /** + * A formal name for the data construct, to be presented in documentation. + */ @BoundField( formalName = "Formal Name", description = "A formal name for the data construct, to be presented in documentation.", @@ -147,6 +152,10 @@ public class TargetedMatchesConstraint typeAdapter = StringAdapter.class) private String _formalName; + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ @BoundField( formalName = "Description", description = "A short description of the data construct's purpose, describing the constructs semantics.", @@ -167,16 +176,33 @@ public class TargetedMatchesConstraint typeAdapter = StringAdapter.class) private String _message; + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ @BoundField( formalName = "Remarks", description = "Any explanatory or helpful information to be provided about the remarks parent.", useName = "remarks") private Remarks _remarks; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedMatchesConstraint} + * instance with no metadata. + */ public TargetedMatchesConstraint() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedMatchesConstraint} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public TargetedMatchesConstraint(IMetaschemaData data) { this.__metaschemaData = data; } @@ -186,73 +212,180 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } - @Override + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable public String getId() { return _id; } - public void setId(String value) { + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { _id = value; } - @Override + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable public String getLevel() { return _level; } - public void setLevel(String value) { + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { _level = value; } + /** + * Get the matches Regular Expression. + * + * @return the regex value, or {@code null} if not set + */ + @Nullable public String getRegex() { return _regex; } - public void setRegex(String value) { + /** + * Set the matches Regular Expression. + * + * @param value + * the regex value to set + */ + public void setRegex(@Nullable String value) { _regex = value; } + /** + * Get the matches Data Type. + * + * @return the datatype value, or {@code null} if not set + */ + @Nullable public String getDatatype() { return _datatype; } - public void setDatatype(String value) { + /** + * Set the matches Data Type. + * + * @param value + * the datatype value to set + */ + public void setDatatype(@Nullable String value) { _datatype = value; } - @Override + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull public String getTarget() { return _target; } - public void setTarget(String value) { + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { _target = value; } - @Override + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable public String getFormalName() { return _formalName; } - public void setFormalName(String value) { + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { _formalName = value; } - @Override + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable public MarkupLine getDescription() { return _description; } - public void setDescription(MarkupLine value) { + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { _description = value; } - @Override + /** + * Get the property. + * + * @return the prop value + */ + @NonNull public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } return _props; } - public void setProps(List value) { + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { _props = value; } @@ -284,21 +417,51 @@ public boolean removeProp(Property item) { return _props != null && _props.remove(value); } - @Override + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable public String getMessage() { return _message; } - public void setMessage(String value) { + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { _message = value; } - @Override + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable public Remarks getRemarks() { return _remarks; } - public void setRemarks(Remarks value) { + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { _remarks = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedReportConstraint.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedReportConstraint.java new file mode 100644 index 000000000..b3550b07d --- /dev/null +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/TargetedReportConstraint.java @@ -0,0 +1,387 @@ +/* + * SPDX-FileCopyrightText: none + * SPDX-License-Identifier: CC0-1.0 + */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. + +package gov.nist.secauto.metaschema.databind.model.metaschema.binding; + +import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.Nullable; +import gov.nist.secauto.metaschema.core.datatype.adapter.StringAdapter; +import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; +import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; +import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLineAdapter; +import gov.nist.secauto.metaschema.core.model.IBoundObject; +import gov.nist.secauto.metaschema.core.model.IMetaschemaData; +import gov.nist.secauto.metaschema.core.model.JsonGroupAsBehavior; +import gov.nist.secauto.metaschema.core.model.constraint.IConstraint; +import gov.nist.secauto.metaschema.core.util.ObjectUtils; +import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValue; +import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValues; +import gov.nist.secauto.metaschema.databind.model.annotations.BoundAssembly; +import gov.nist.secauto.metaschema.databind.model.annotations.BoundField; +import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; +import gov.nist.secauto.metaschema.databind.model.annotations.GroupAs; +import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; +import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; +import gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase; +import java.util.LinkedList; +import java.util.List; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +@MetaschemaAssembly( + formalName = "Report Condition Constraint", + name = "targeted-report-constraint", + moduleClass = MetaschemaModelModule.class) +public class TargetedReportConstraint implements IBoundObject, IConfigurableMessageConstraintBase { + private final IMetaschemaData __metaschemaData; + + @BoundFlag( + formalName = "Constraint Identifier", + name = "id", + typeAdapter = TokenAdapter.class) + private String _id; + + @BoundFlag( + formalName = "Constraint Severity Level", + name = "level", + defaultValue = "ERROR", + typeAdapter = TokenAdapter.class, + valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, values = { + @AllowedValue(value = "CRITICAL", + description = "A violation of the constraint represents a serious fault in the content that will prevent typical use of the content."), + @AllowedValue(value = "ERROR", + description = "A violation of the constraint represents a fault in the content. This may include issues around compatibility, integrity, consistency, etc."), + @AllowedValue(value = "WARNING", + description = "A violation of the constraint represents a potential issue with the content."), + @AllowedValue(value = "INFORMATIONAL", + description = "A violation of the constraint represents a point of interest."), + @AllowedValue(value = "DEBUG", + description = "A violation of the constraint represents a fault in the content that may warrant review by a developer when performing model or tool development.") }))) + private String _level; + + @BoundFlag( + formalName = "Report Test Condition", + name = "test", + required = true, + typeAdapter = StringAdapter.class) + private String _test; + + @BoundFlag( + formalName = "Constraint Target Metapath Expression", + name = "target", + required = true, + typeAdapter = StringAdapter.class) + private String _target; + + /** + * A formal name for the data construct, to be presented in documentation. + */ + @BoundField( + formalName = "Formal Name", + description = "A formal name for the data construct, to be presented in documentation.", + useName = "formal-name", + typeAdapter = StringAdapter.class) + private String _formalName; + + /** + * A short description of the data construct's purpose, describing the + * constructs semantics. + */ + @BoundField( + formalName = "Description", + description = "A short description of the data construct's purpose, describing the constructs semantics.", + useName = "description", + typeAdapter = MarkupLineAdapter.class) + private MarkupLine _description; + + @BoundAssembly( + formalName = "Property", + useName = "prop", + maxOccurs = -1, + groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)) + private List _props; + + @BoundField( + formalName = "Constraint Condition Violation Message", + useName = "message", + typeAdapter = StringAdapter.class) + private String _message; + + /** + * Any explanatory or helpful information to be provided about the remarks + * parent. + */ + @BoundField( + formalName = "Remarks", + description = "Any explanatory or helpful information to be provided about the remarks parent.", + useName = "remarks") + private Remarks _remarks; + + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedReportConstraint} + * instance with no metadata. + */ + public TargetedReportConstraint() { + this(null); + } + + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.TargetedReportConstraint} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ + public TargetedReportConstraint(IMetaschemaData data) { + this.__metaschemaData = data; + } + + @Override + public IMetaschemaData getMetaschemaData() { + return __metaschemaData; + } + + /** + * Get the constraint Identifier. + * + * @return the id value, or {@code null} if not set + */ + @Nullable + public String getId() { + return _id; + } + + /** + * Set the constraint Identifier. + * + * @param value + * the id value to set + */ + public void setId(@Nullable String value) { + _id = value; + } + + /** + * Get the constraint Severity Level. + * + * @return the level value, or {@code null} if not set + */ + @Nullable + public String getLevel() { + return _level; + } + + /** + * Set the constraint Severity Level. + * + * @param value + * the level value to set + */ + public void setLevel(@Nullable String value) { + _level = value; + } + + /** + * Get the report Test Condition. + * + * @return the test value + */ + @NonNull + public String getTest() { + return _test; + } + + /** + * Set the report Test Condition. + * + * @param value + * the test value to set + */ + public void setTest(@NonNull String value) { + _test = value; + } + + /** + * Get the constraint Target Metapath Expression. + * + * @return the target value + */ + @NonNull + public String getTarget() { + return _target; + } + + /** + * Set the constraint Target Metapath Expression. + * + * @param value + * the target value to set + */ + public void setTarget(@NonNull String value) { + _target = value; + } + + /** + * Get the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @return the formal-name value, or {@code null} if not set + */ + @Nullable + public String getFormalName() { + return _formalName; + } + + /** + * Set the formal Name. + * + *

+ * A formal name for the data construct, to be presented in documentation. + * + * @param value + * the formal-name value to set + */ + public void setFormalName(@Nullable String value) { + _formalName = value; + } + + /** + * Get the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @return the description value, or {@code null} if not set + */ + @Nullable + public MarkupLine getDescription() { + return _description; + } + + /** + * Set the description. + * + *

+ * A short description of the data construct's purpose, describing the + * constructs semantics. + * + * @param value + * the description value to set + */ + public void setDescription(@Nullable MarkupLine value) { + _description = value; + } + + /** + * Get the property. + * + * @return the prop value + */ + @NonNull + public List getProps() { + if (_props == null) { + _props = new LinkedList<>(); + } + return _props; + } + + /** + * Set the property. + * + * @param value + * the prop value to set + */ + public void setProps(@NonNull List value) { + _props = value; + } + + /** + * Add a new {@link Property} item to the underlying collection. + * + * @param item + * the item to add + * @return {@code true} + */ + public boolean addProp(Property item) { + Property value = ObjectUtils.requireNonNull(item, "item cannot be null"); + if (_props == null) { + _props = new LinkedList<>(); + } + return _props.add(value); + } + + /** + * Remove the first matching {@link Property} item from the underlying + * collection. + * + * @param item + * the item to remove + * @return {@code true} if the item was removed or {@code false} otherwise + */ + public boolean removeProp(Property item) { + Property value = ObjectUtils.requireNonNull(item, "item cannot be null"); + return _props != null && _props.remove(value); + } + + /** + * Get the constraint Condition Violation Message. + * + * @return the message value, or {@code null} if not set + */ + @Nullable + public String getMessage() { + return _message; + } + + /** + * Set the constraint Condition Violation Message. + * + * @param value + * the message value to set + */ + public void setMessage(@Nullable String value) { + _message = value; + } + + /** + * Get the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @return the remarks value, or {@code null} if not set + */ + @Nullable + public Remarks getRemarks() { + return _remarks; + } + + /** + * Set the remarks. + * + *

+ * Any explanatory or helpful information to be provided about the remarks + * parent. + * + * @param value + * the remarks value to set + */ + public void setRemarks(@Nullable Remarks value) { + _remarks = value; + } + + @Override + public String toString() { + return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString(); + } +} diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/UseName.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/UseName.java index e126d4877..c7a3c7af8 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/UseName.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/UseName.java @@ -2,9 +2,12 @@ * SPDX-FileCopyrightText: none * SPDX-License-Identifier: CC0-1.0 */ +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. package gov.nist.secauto.metaschema.databind.model.metaschema.binding; +import edu.umd.cs.findbugs.annotations.Nullable; import gov.nist.secauto.metaschema.core.datatype.adapter.NonNegativeIntegerAdapter; import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; import gov.nist.secauto.metaschema.core.model.IBoundObject; @@ -12,19 +15,13 @@ import gov.nist.secauto.metaschema.databind.model.annotations.BoundFieldValue; import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaField; - +import java.math.BigInteger; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -import java.math.BigInteger; - /** * Allows the name of the definition to be overridden. */ -@SuppressWarnings({ - "PMD.DataClass", - "PMD.FieldNamingConventions" -}) @MetaschemaField( formalName = "Use Name", description = "Allows the name of the definition to be overridden.", @@ -34,7 +31,7 @@ public class UseName implements IBoundObject { private final IMetaschemaData __metaschemaData; /** - * "Used for binary formats instead of the textual name." + * Used for binary formats instead of the textual name. */ @BoundFlag( formalName = "Numeric Index", @@ -48,10 +45,23 @@ public class UseName implements IBoundObject { typeAdapter = TokenAdapter.class) private String _name; + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.UseName} + * instance with no metadata. + */ public UseName() { this(null); } + /** + * Constructs a new + * {@code gov.nist.secauto.metaschema.databind.model.metaschema.binding.UseName} + * instance with the specified metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public UseName(IMetaschemaData data) { this.__metaschemaData = data; } @@ -61,19 +71,38 @@ public IMetaschemaData getMetaschemaData() { return __metaschemaData; } + /** + * Get the numeric Index. + * + *

+ * Used for binary formats instead of the textual name. + * + * @return the index value, or {@code null} if not set + */ + @Nullable public BigInteger getIndex() { return _index; } - public void setIndex(BigInteger value) { + /** + * Set the numeric Index. + * + *

+ * Used for binary formats instead of the textual name. + * + * @param value + * the index value to set + */ + public void setIndex(@Nullable BigInteger value) { _index = value; } + @Nullable public String getName() { return _name; } - public void setName(String value) { + public void setName(@Nullable String value) { _name = value; } diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/package-info.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/package-info.java index bc15dc0f0..1941c005c 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/package-info.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/binding/package-info.java @@ -3,14 +3,13 @@ * SPDX-License-Identifier: CC0-1.0 */ -/** - * A Metaschema module represented as a set of Metaschema module bindings. - */ - -@gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaPackage(moduleClass = { MetaschemaModelModule.class }) +// Generated from: ../../../../../../../../../../../../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml +// Do not edit - changes will be lost when regenerated. +@gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaPackage(moduleClass = { + gov.nist.secauto.metaschema.databind.model.metaschema.binding.MetaschemaModelModule.class }) @gov.nist.secauto.metaschema.databind.model.annotations.XmlSchema( - namespace = gov.nist.secauto.metaschema.core.MetaschemaConstants.METASCHEMA_NAMESPACE, + namespace = "http://csrc.nist.gov/ns/oscal/metaschema/1.0", xmlns = { @gov.nist.secauto.metaschema.databind.model.annotations.XmlNs(prefix = "", - namespace = gov.nist.secauto.metaschema.core.MetaschemaConstants.METASCHEMA_NAMESPACE) }, + namespace = "http://csrc.nist.gov/ns/oscal/metaschema/1.0") }, xmlElementFormDefault = gov.nist.secauto.metaschema.databind.model.annotations.XmlNsForm.QUALIFIED) package gov.nist.secauto.metaschema.databind.model.metaschema.binding; diff --git a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/impl/BindingModule.java b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/impl/BindingModule.java index 927bd07de..0557cb0f2 100644 --- a/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/impl/BindingModule.java +++ b/databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/impl/BindingModule.java @@ -148,20 +148,12 @@ public final URI getLocation() { @Override public MarkupLine getName() { - MarkupLine retval = getBinding().getSchemaName(); - if (retval == null) { - throw new IllegalStateException(String.format("The schema name is NULL for module '%s'.", getLocation())); - } - return retval; + return getBinding().getSchemaName(); } @Override public String getVersion() { - String retval = getBinding().getSchemaVersion(); - if (retval == null) { - throw new IllegalStateException(String.format("The schema version is NULL for module '%s'.", getLocation())); - } - return retval; + return getBinding().getSchemaVersion(); } @Override @@ -171,30 +163,17 @@ public MarkupMultiline getRemarks() { @Override public String getShortName() { - String retval = getBinding().getShortName(); - if (retval == null) { - throw new IllegalStateException(String.format("The schema short name is NULL for module '%s'.", getLocation())); - } - return retval; + return getBinding().getShortName(); } @Override public final URI getXmlNamespace() { - URI retval = getBinding().getNamespace(); - if (retval == null) { - throw new IllegalStateException( - String.format("The XML schema namespace is NULL for module '%s'.", getLocation())); - } - return retval; + return getBinding().getNamespace(); } @Override public URI getJsonBaseUri() { - URI retval = getBinding().getJsonBaseUri(); - if (retval == null) { - throw new IllegalStateException(String.format("The JSON schema URI is NULL for module '%s'.", getLocation())); - } - return retval; + return getBinding().getJsonBaseUri(); } @Override diff --git a/databind/src/main/metaschema-bindings/metaschema-binding-bindings.xml b/databind/src/main/metaschema-bindings/metaschema-config-bindings.xml similarity index 100% rename from databind/src/main/metaschema-bindings/metaschema-binding-bindings.xml rename to databind/src/main/metaschema-bindings/metaschema-config-bindings.xml diff --git a/databind/src/main/metaschema-bindings/metaschema-model-bindings.xml b/databind/src/main/metaschema-bindings/metaschema-model-bindings.xml new file mode 100644 index 000000000..a6ffece9a --- /dev/null +++ b/databind/src/main/metaschema-bindings/metaschema-model-bindings.xml @@ -0,0 +1,152 @@ + + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.binding + + + + + + + METASCHEMA + + + + + GroupingAs + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IModelConstraintsBase + + + gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IValueTargetedConstraintsBase + + + gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IValueConstraintsBase + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConfigurableMessageConstraintBase + + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IValueConstraintsBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IValueTargetedConstraintsBase + + + gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IValueTargetedConstraintsBase + + + gov.nist.secauto.metaschema.databind.model.metaschema.ITargetedConstraintBase + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.IValueConstraintsBase + + + gov.nist.secauto.metaschema.databind.model.metaschema.IConstraintBase + + + + + + gov.nist.secauto.metaschema.databind.model.metaschema.impl.AbstractAllowedValue + + + + diff --git a/databind/src/main/metaschema/metaschema-bindings.yaml b/databind/src/main/metaschema/metaschema-bindings.yaml index ef2db30b2..3a5949b4c 100644 --- a/databind/src/main/metaschema/metaschema-bindings.yaml +++ b/databind/src/main/metaschema/metaschema-bindings.yaml @@ -73,13 +73,25 @@ METASCHEMA: group-as: name: define-assembly-bindings in-json: ARRAY + constraints: + expect: + - id: assembly-binding-name-or-target + test: "exists(@name) or exists(@target)" + message: "Either 'name' or 'target' must be specified for define-assembly-binding." + - id: assembly-binding-name-xor-target + test: "not(exists(@name) and exists(@target))" + message: "Only one of 'name' or 'target' may be specified for define-assembly-binding, not both." flags: - object-type: flag name: name formal-name: Name - description: The name of the metaschema assembly. + description: The name of the metaschema assembly. Used for top-level definitions. as-type: token - required: "yes" + - object-type: flag + name: target + formal-name: Target + description: A Metapath expression targeting the assembly definition(s) within the metaschema. Used for inline definitions. + as-type: string model: instances: - object-type: assembly @@ -177,13 +189,25 @@ METASCHEMA: group-as: name: define-field-bindings in-json: ARRAY + constraints: + expect: + - id: field-binding-name-or-target + test: "exists(@name) or exists(@target)" + message: "Either 'name' or 'target' must be specified for define-field-binding." + - id: field-binding-name-xor-target + test: "not(exists(@name) and exists(@target))" + message: "Only one of 'name' or 'target' may be specified for define-field-binding, not both." flags: - object-type: flag name: name formal-name: Name - description: The name of the metaschema field. + description: The name of the metaschema field. Used for top-level definitions. as-type: token - required: "yes" + - object-type: flag + name: target + formal-name: Target + description: A Metapath expression targeting the field definition(s) within the metaschema. Used for inline definitions. + as-type: string model: instances: - object-type: assembly diff --git a/databind/src/test/java/gov/nist/secauto/metaschema/databind/io/MetaschemaModuleMetaschemaTest.java b/databind/src/test/java/gov/nist/secauto/metaschema/databind/io/MetaschemaModuleMetaschemaTest.java index 7c4b404f5..e242f9437 100644 --- a/databind/src/test/java/gov/nist/secauto/metaschema/databind/io/MetaschemaModuleMetaschemaTest.java +++ b/databind/src/test/java/gov/nist/secauto/metaschema/databind/io/MetaschemaModuleMetaschemaTest.java @@ -10,38 +10,33 @@ import gov.nist.secauto.metaschema.core.model.MetaschemaException; import gov.nist.secauto.metaschema.core.util.ObjectUtils; import gov.nist.secauto.metaschema.databind.IBindingContext; -import gov.nist.secauto.metaschema.databind.codegen.AbstractMetaschemaTest; import gov.nist.secauto.metaschema.databind.model.metaschema.IBindingMetaschemaModule; import gov.nist.secauto.metaschema.databind.model.metaschema.IBindingModuleLoader; import gov.nist.secauto.metaschema.databind.model.metaschema.binding.METASCHEMA; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.io.IOException; import java.net.URI; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import edu.umd.cs.findbugs.annotations.NonNull; -class MetaschemaModuleMetaschemaTest - extends AbstractMetaschemaTest { +class MetaschemaModuleMetaschemaTest { @NonNull private static final Path METASCHEMA_FILE = ObjectUtils.notNull(Paths.get("../core/metaschema/schema/metaschema/metaschema-module-metaschema.xml")); - @Test - @Disabled - void testMetaschemaMetaschema() throws MetaschemaException, IOException, ClassNotFoundException { - runTests( - ObjectUtils.notNull(METASCHEMA_FILE), - ObjectUtils.notNull( - Paths.get("../databind-metaschema/src/main/metaschema-bindings/metaschema-metaschema-bindings.xml")), - null, - ObjectUtils.notNull(METASCHEMA.class.getName()), - ObjectUtils.notNull(generationDir), - null); + @NonNull + private static IBindingContext newBindingContext() throws IOException { + Path generationDir = Paths.get("target/generated-modules"); + Files.createDirectories(generationDir); + + return IBindingContext.builder() + .compilePath(ObjectUtils.notNull(Files.createTempDirectory(generationDir, "modules-"))) + .build(); } @Test