1
2
3
4
5
6
7
8 package dev.metaschema.model.testing.testsuite;
9
10 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
11 import org.apache.commons.lang3.builder.ToStringStyle;
12
13 import java.net.URI;
14
15 import dev.metaschema.core.datatype.adapter.UriReferenceAdapter;
16 import dev.metaschema.core.model.IBoundObject;
17 import dev.metaschema.core.model.IMetaschemaData;
18 import dev.metaschema.core.util.ObjectUtils;
19 import dev.metaschema.databind.model.annotations.BoundFlag;
20 import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
21 import edu.umd.cs.findbugs.annotations.NonNull;
22
23
24
25
26 @MetaschemaAssembly(
27 formalName = "Metaschema",
28 description = "Reference to a metaschema module to load.",
29 name = "metaschema",
30 moduleClass = MetaschemaTestSuiteModule.class)
31 public class Metaschema implements IBoundObject {
32 private final IMetaschemaData __metaschemaData;
33
34
35
36
37 @BoundFlag(
38 formalName = "Location",
39 description = "A URI reference to the metaschema module location.",
40 name = "location",
41 required = true,
42 typeAdapter = UriReferenceAdapter.class)
43 private URI _location;
44
45
46
47
48
49 public Metaschema() {
50 this(null);
51 }
52
53
54
55
56
57
58
59
60 public Metaschema(IMetaschemaData data) {
61 this.__metaschemaData = data;
62 }
63
64 @Override
65 public IMetaschemaData getMetaschemaData() {
66 return __metaschemaData;
67 }
68
69
70
71
72
73
74
75
76
77 @NonNull
78 public URI getLocation() {
79 return _location;
80 }
81
82
83
84
85
86
87
88
89
90
91 public void setLocation(@NonNull URI value) {
92 _location = value;
93 }
94
95 @Override
96 public String toString() {
97 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
98 }
99 }