1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.databind.testing.model;
7   
8   import gov.nist.secauto.metaschema.core.datatype.adapter.IntegerAdapter;
9   import gov.nist.secauto.metaschema.core.model.IBoundObject;
10  import gov.nist.secauto.metaschema.core.model.IMetaschemaData;
11  import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag;
12  import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly;
13  
14  import java.math.BigInteger;
15  
16  @MetaschemaAssembly(
17      name = "assembly-with-flags",
18      rootName = "root-assembly-with-flags",
19      moduleClass = TestModule.class)
20  public class RootAssemblyWithFlags implements IBoundObject {
21    private final IMetaschemaData metaschemaData;
22  
23    @BoundFlag(name = "id", required = true)
24    private String id;
25  
26    @BoundFlag
27    private String defaultFlag;
28  
29    @BoundFlag(
30        description = "a number",
31        formalName = "number flag",
32        name = "number",
33        typeAdapter = IntegerAdapter.class,
34        defaultValue = "1",
35        remarks = "a remark")
36    private BigInteger number;
37  
38    public RootAssemblyWithFlags() {
39      this(null);
40    }
41  
42    public RootAssemblyWithFlags(IMetaschemaData metaschemaData) {
43      this.metaschemaData = metaschemaData;
44    }
45  
46    @Override
47    public IMetaschemaData getMetaschemaData() {
48      return metaschemaData;
49    }
50  
51    public String getId() {
52      return id;
53    }
54  
55    public void setId(String id) {
56      this.id = id;
57    }
58  
59    protected String getDefaultFlag() {
60      return defaultFlag;
61    }
62  
63    protected void setDefaultFlag(String defaultFlag) {
64      this.defaultFlag = defaultFlag;
65    }
66  
67    public BigInteger getNumber() {
68      return number;
69    }
70  
71    public void setNumber(BigInteger number) {
72      this.number = number;
73    }
74  }