1 package gov.nist.secauto.oscal.lib.model;
2
3 import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValue;
4 import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValues;
5 import gov.nist.secauto.metaschema.binding.model.annotations.BoundAssembly;
6 import gov.nist.secauto.metaschema.binding.model.annotations.BoundField;
7 import gov.nist.secauto.metaschema.binding.model.annotations.BoundFieldValue;
8 import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag;
9 import gov.nist.secauto.metaschema.binding.model.annotations.GroupAs;
10 import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaAssembly;
11 import gov.nist.secauto.metaschema.binding.model.annotations.ValueConstraints;
12 import gov.nist.secauto.metaschema.model.common.JsonGroupAsBehavior;
13 import gov.nist.secauto.metaschema.model.common.constraint.IConstraint;
14 import gov.nist.secauto.metaschema.model.common.datatype.adapter.StringAdapter;
15 import gov.nist.secauto.metaschema.model.common.datatype.adapter.TokenAdapter;
16 import gov.nist.secauto.metaschema.model.common.datatype.adapter.UriAdapter;
17 import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline;
18 import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilineAdapter;
19 import gov.nist.secauto.metaschema.model.common.util.ObjectUtils;
20 import java.lang.Override;
21 import java.lang.String;
22 import java.net.URI;
23 import java.util.LinkedList;
24 import java.util.List;
25 import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle;
26 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
27
28
29
30
31 @MetaschemaAssembly(
32 formalName = "Characterization",
33 description = "A collection of descriptive data about the containing object from a specific origin.",
34 name = "characterization",
35 metaschema = OscalAssessmentCommonMetaschema.class
36 )
37 public class Characterization {
38 @BoundAssembly(
39 formalName = "Property",
40 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
41 useName = "prop",
42 maxOccurs = -1
43 )
44 @GroupAs(
45 name = "props",
46 inJson = JsonGroupAsBehavior.LIST
47 )
48 private List<Property> _props;
49
50 @BoundAssembly(
51 formalName = "Link",
52 description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
53 useName = "link",
54 maxOccurs = -1
55 )
56 @GroupAs(
57 name = "links",
58 inJson = JsonGroupAsBehavior.LIST
59 )
60 private List<Link> _links;
61
62 @BoundAssembly(
63 formalName = "Origin",
64 description = "Identifies the source of the finding, such as a tool, interviewed person, or activity.",
65 useName = "origin",
66 minOccurs = 1,
67 remarks = "metadata about the specific actor that generated this descriptive data."
68 )
69 private Origin _origin;
70
71
72
73
74 @BoundAssembly(
75 formalName = "Facet",
76 description = "An individual characteristic that is part of a larger set produced by the same actor.",
77 useName = "facet",
78 minOccurs = 1,
79 maxOccurs = -1
80 )
81 @GroupAs(
82 name = "facets",
83 inJson = JsonGroupAsBehavior.LIST
84 )
85 private List<Facet> _facets;
86
87 public Characterization() {
88 }
89
90 public List<Property> getProps() {
91 return _props;
92 }
93
94 public void setProps(List<Property> value) {
95 _props = value;
96 }
97
98
99
100
101
102
103 public boolean addProp(Property item) {
104 Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
105 if (_props == null) {
106 _props = new LinkedList<>();
107 }
108 return _props.add(value);
109 }
110
111
112
113
114
115
116 public boolean removeProp(Property item) {
117 Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
118 return _props == null ? false : _props.remove(value);
119 }
120
121 public List<Link> getLinks() {
122 return _links;
123 }
124
125 public void setLinks(List<Link> value) {
126 _links = value;
127 }
128
129
130
131
132
133
134 public boolean addLink(Link item) {
135 Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
136 if (_links == null) {
137 _links = new LinkedList<>();
138 }
139 return _links.add(value);
140 }
141
142
143
144
145
146
147 public boolean removeLink(Link item) {
148 Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
149 return _links == null ? false : _links.remove(value);
150 }
151
152 public Origin getOrigin() {
153 return _origin;
154 }
155
156 public void setOrigin(Origin value) {
157 _origin = value;
158 }
159
160 public List<Facet> getFacets() {
161 return _facets;
162 }
163
164 public void setFacets(List<Facet> value) {
165 _facets = value;
166 }
167
168
169
170
171
172
173 public boolean addFacet(Facet item) {
174 Facet value = ObjectUtils.requireNonNull(item,"item cannot be null");
175 if (_facets == null) {
176 _facets = new LinkedList<>();
177 }
178 return _facets.add(value);
179 }
180
181
182
183
184
185
186 public boolean removeFacet(Facet item) {
187 Facet value = ObjectUtils.requireNonNull(item,"item cannot be null");
188 return _facets == null ? false : _facets.remove(value);
189 }
190
191 @Override
192 public String toString() {
193 return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
194 }
195
196
197
198
199 @MetaschemaAssembly(
200 formalName = "Facet",
201 description = "An individual characteristic that is part of a larger set produced by the same actor.",
202 name = "facet",
203 metaschema = OscalAssessmentCommonMetaschema.class
204 )
205 @ValueConstraints(
206 allowedValues = {
207 @AllowedValues(level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = @AllowedValue(value = "state", description = "Indicates if the facet is 'initial' as first identified, or 'adjusted' indicating that the value has be changed after some adjustments have been made (e.g., to identify residual risk).")),
208 @AllowedValues(level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='state']/@value", values = {@AllowedValue(value = "initial", description = "As first identified."), @AllowedValue(value = "adjusted", description = "Indicates that residual risk remains after some adjustments have been made.")}),
209 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://csrc.nist.gov/ns/oscal']/@name", values = {@AllowedValue(value = "likelihood", description = "General likelihood rating."), @AllowedValue(value = "impact", description = "General impact rating."), @AllowedValue(value = "risk", description = "General risk rating."), @AllowedValue(value = "severity", description = "General severity rating.")}),
210 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://fedramp.gov','http://fedramp.gov/ns/oscal')]/@name", values = {@AllowedValue(value = "likelihood", description = "Likelihood as defined by FedRAMP. The `class` can be used to specify 'initial' and 'adjusted' risk states."), @AllowedValue(value = "impact", description = "Impact as defined by FedRAMP. The `class` can be used to specify 'initial' and 'adjusted' risk states."), @AllowedValue(value = "risk", description = "Risk as calculated according to FedRAMP. The `class` can be used to specify 'initial' and 'adjusted' risk states.")}),
211 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://cve.mitre.org']/@name", values = @AllowedValue(value = "cve-id", description = "An identifier managed by the CVE program (see https://cve.mitre.org/).")),
212 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://www.first.org/cvss/v2.0']/@name", values = {@AllowedValue(value = "access-vector", description = "Base: Access Vector"), @AllowedValue(value = "access-complexity", description = "Base: Access Complexity"), @AllowedValue(value = "authentication", description = "Base: Authentication"), @AllowedValue(value = "confidentiality-impact", description = "Base: Confidentiality Impact"), @AllowedValue(value = "integrity-impact", description = "Base: Integrity Impact"), @AllowedValue(value = "availability-impact", description = "Base: Availability Impact"), @AllowedValue(value = "exploitability", description = "Temporal: Exploitability"), @AllowedValue(value = "remediation-level", description = "Temporal: Remediation Level"), @AllowedValue(value = "report-confidence", description = "Temporal: Report Confidence"), @AllowedValue(value = "collateral-damage-potential", description = "Environmental: Collateral Damage Potential"), @AllowedValue(value = "target-distribution", description = "Environmental: Target Distribution"), @AllowedValue(value = "confidentiality-requirement", description = "Environmental: Confidentiality Requirement"), @AllowedValue(value = "integrity-requirement", description = "Environmental: Integrity Requirement"), @AllowedValue(value = "availability-requirement", description = "Environmental: Availability Requirement")}),
213 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://www.first.org/cvss/v2.0' and @name='access-vector']/@value", values = {@AllowedValue(value = "local", description = "Local"), @AllowedValue(value = "adjacent-network", description = "Network Adjacent"), @AllowedValue(value = "network", description = "Network")}),
214 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://www.first.org/cvss/v2.0' and @name='access-complexity']/@value", values = {@AllowedValue(value = "high", description = "High"), @AllowedValue(value = "medium", description = "Medium"), @AllowedValue(value = "low", description = "Low")}),
215 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://www.first.org/cvss/v2.0' and @name='authentication']/@value", values = {@AllowedValue(value = "multiple", description = "Multiple"), @AllowedValue(value = "single", description = "Single"), @AllowedValue(value = "none", description = "None")}),
216 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://www.first.org/cvss/v2.0' and @name=('confidentiality-impact', 'integrity-impact', 'availability-impact')]/@value", values = {@AllowedValue(value = "none", description = "None"), @AllowedValue(value = "partial", description = "Partial"), @AllowedValue(value = "complete", description = "Complete")}),
217 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://www.first.org/cvss/v2.0' and @name='exploitability']/@value", values = {@AllowedValue(value = "unproven", description = "Unproven"), @AllowedValue(value = "proof-of-concept", description = "Proof-of-Concept"), @AllowedValue(value = "functional", description = "Functional"), @AllowedValue(value = "high", description = "High"), @AllowedValue(value = "not-defined", description = "Not Defined")}),
218 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://www.first.org/cvss/v2.0' and @name='remediation-level']/@value", values = {@AllowedValue(value = "official-fix", description = "Official Fix"), @AllowedValue(value = "temporary-fix", description = "Temporary Fix"), @AllowedValue(value = "workaround", description = "Workaround"), @AllowedValue(value = "unavailable", description = "Unavailable"), @AllowedValue(value = "not-defined", description = "Not Defined")}),
219 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://www.first.org/cvss/v2.0' and @name='report-confidence']/@value", values = {@AllowedValue(value = "unconfirmed", description = "Unconfirmed"), @AllowedValue(value = "uncorroborated", description = "Uncorroborated"), @AllowedValue(value = "confirmed", description = "Confirmed"), @AllowedValue(value = "not-defined", description = "Not Defined")}),
220 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://www.first.org/cvss/v2.0' and @name='collateral-damage-potential']/@value", values = {@AllowedValue(value = "none", description = "None"), @AllowedValue(value = "low", description = "Low (light loss)"), @AllowedValue(value = "low-medium", description = "Low Medium"), @AllowedValue(value = "medium-high", description = "Medium High"), @AllowedValue(value = "high", description = "High (catastrophic loss)"), @AllowedValue(value = "not-defined", description = "Not Defined")}),
221 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system='http://www.first.org/cvss/v2.0' and @name=('target-distribution', 'confidentiality-requirement', 'integrity-requirement', 'availability-requirement')]/@value", values = {@AllowedValue(value = "none", description = ""), @AllowedValue(value = "low", description = ""), @AllowedValue(value = "medium", description = ""), @AllowedValue(value = "high", description = ""), @AllowedValue(value = "not-defined", description = "")}),
222 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1')]/@name", values = {@AllowedValue(value = "attack-vector", description = "Base: Attack Vector"), @AllowedValue(value = "access-complexity", description = "Base: Attack Complexity"), @AllowedValue(value = "privileges-required", description = "Base: Privileges Required"), @AllowedValue(value = "user-interaction", description = "Base: User Interaction"), @AllowedValue(value = "scope", description = "Base: Scope"), @AllowedValue(value = "confidentiality-impact", description = "Base: Confidentiality Impact"), @AllowedValue(value = "integrity-impact", description = "Base: Integrity Impact"), @AllowedValue(value = "availability-impact", description = "Base: Availability Impact"), @AllowedValue(value = "exploit-code-maturity", description = "Temporal: Exploit Code Maturity"), @AllowedValue(value = "remediation-level", description = "Temporal: Remediation Level"), @AllowedValue(value = "report-confidence", description = "Temporal: Report Confidence"), @AllowedValue(value = "modified-attack-vector", description = "Environmental: Modified Attack Vector"), @AllowedValue(value = "modified-attack-complexity", description = "Environmental: Modified Attack Complexity"), @AllowedValue(value = "modified-privileges-required", description = "Environmental: Modified Privileges Required"), @AllowedValue(value = "modified-user-interaction", description = "Environmental: Modified User Interaction"), @AllowedValue(value = "modified-scope", description = "Environmental: Modified Scope"), @AllowedValue(value = "modified-confidentiality", description = "Environmental: Modified Confidentiality"), @AllowedValue(value = "modified-integrity", description = "Environmental: Modified Integrity"), @AllowedValue(value = "modified-availability", description = "Environmental: Modified Availability"), @AllowedValue(value = "confidentiality-requirement", description = "Environmental: Confidentiality Requirement Modifier"), @AllowedValue(value = "integrity-requirement", description = "Environmental: Integrity Requirement Modifier"), @AllowedValue(value = "availability-requirement", description = "Environmental: Availability Requirement Modifier")}),
223 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='access-vector']/@value", values = {@AllowedValue(value = "network", description = "Network"), @AllowedValue(value = "adjacent", description = "Adjacent"), @AllowedValue(value = "local", description = "Local"), @AllowedValue(value = "physical", description = "Physical")}),
224 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='access-complexity']/@value", values = {@AllowedValue(value = "high", description = "High"), @AllowedValue(value = "low", description = "Low")}),
225 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name=('privileges-required', 'confidentiality-impact', 'integrity-impact', 'availability-impact')]/@value", values = {@AllowedValue(value = "none", description = "None"), @AllowedValue(value = "low", description = "Low"), @AllowedValue(value = "high", description = "High")}),
226 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='user-interaction']/@value", values = {@AllowedValue(value = "none", description = "None"), @AllowedValue(value = "required", description = "Required")}),
227 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='scope']/@value", values = {@AllowedValue(value = "unchanged", description = "Unchanged"), @AllowedValue(value = "changed", description = "Changed")}),
228 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='exploit-code-maturity']/@value", values = {@AllowedValue(value = "not-defined", description = "Not Defined"), @AllowedValue(value = "unproven", description = "Unproven"), @AllowedValue(value = "proof-of-concept", description = "Proof-of-Concept"), @AllowedValue(value = "functional", description = "Functional"), @AllowedValue(value = "high", description = "High")}),
229 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='remediation-level']/@value", values = {@AllowedValue(value = "not-defined", description = "Not Defined"), @AllowedValue(value = "official-fix", description = "Official Fix"), @AllowedValue(value = "temporary-fix", description = "Temporary Fix"), @AllowedValue(value = "workaround", description = "Workaround"), @AllowedValue(value = "unavailable", description = "Unavailable")}),
230 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='report-confidence']/@value", values = {@AllowedValue(value = "not-defined", description = "Not Defined"), @AllowedValue(value = "unknown", description = "Unknown"), @AllowedValue(value = "reasonable", description = "Reasonable"), @AllowedValue(value = "confirmed", description = "Confirmed")}),
231 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name=('confidentiality-requirement', 'integrity-requirement', 'availability-requirement')]/@value", values = {@AllowedValue(value = "not-defined", description = "Not Defined"), @AllowedValue(value = "low", description = "Low"), @AllowedValue(value = "medium", description = "Medium"), @AllowedValue(value = "high", description = "High")}),
232 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='modified-attack-vector']/@value", values = {@AllowedValue(value = "not-defined", description = "Not Defined"), @AllowedValue(value = "network", description = "Network"), @AllowedValue(value = "adjacent", description = "Adjacent"), @AllowedValue(value = "local", description = "Local"), @AllowedValue(value = "physical", description = "Physical")}),
233 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='modified-attack-complexity']/@value", values = {@AllowedValue(value = "not-defined", description = "Not Defined"), @AllowedValue(value = "high", description = "High"), @AllowedValue(value = "low", description = "Low")}),
234 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name=('modified-privileges-required', 'modified-confidentiality', 'modified-integrity', 'modified-availability')]/@value", values = {@AllowedValue(value = "not-defined", description = "Not Defined"), @AllowedValue(value = "none", description = "None"), @AllowedValue(value = "low", description = "Low"), @AllowedValue(value = "high", description = "High")}),
235 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='modified-user-interaction']/@value", values = {@AllowedValue(value = "not-defined", description = "Not Defined"), @AllowedValue(value = "none", description = "None"), @AllowedValue(value = "required", description = "Required")}),
236 @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@system=('http://www.first.org/cvss/v3.0', 'http://www.first.org/cvss/v3.1') and @name='modified-scope']/@value", values = {@AllowedValue(value = "not-defined", description = "Not Defined"), @AllowedValue(value = "unchanged", description = "Unchanged"), @AllowedValue(value = "changed", description = "Changed")})
237 }
238 )
239 public static class Facet {
240 @BoundFlag(
241 formalName = "Facet Name",
242 description = "The name of the risk metric within the specified system.",
243 useName = "name",
244 required = true,
245 typeAdapter = TokenAdapter.class
246 )
247 private String _name;
248
249 @BoundFlag(
250 formalName = "Naming System",
251 description = "Specifies the naming system under which this risk metric is organized, which allows for the same names to be used in different systems controlled by different parties. This avoids the potential of a name clash.",
252 useName = "system",
253 required = true,
254 typeAdapter = UriAdapter.class,
255 remarks = "This value must be an [absolute URI](https://pages.nist.gov/OSCAL/concepts/uri-use/#absolute-uri) that serves as a [naming system identifier](https://pages.nist.gov/OSCAL/concepts/uri-use/#use-as-a-naming-system-identifier)."
256 )
257 @ValueConstraints(
258 allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = {@AllowedValue(value = "http://fedramp.gov", description = "\\*\\*deprecated\\*\\* The FedRAMP naming system. This has been deprecated; use `http://fedramp.gov/ns/oscal` instead."), @AllowedValue(value = "http://fedramp.gov/ns/oscal", description = "The FedRAMP naming system."), @AllowedValue(value = "http://csrc.nist.gov/ns/oscal", description = ""), @AllowedValue(value = "http://csrc.nist.gov/ns/oscal/unknown", description = "The facet is from an unknown taxonomy. The meaning of the name is tool or organization specific."), @AllowedValue(value = "http://cve.mitre.org", description = ""), @AllowedValue(value = "http://www.first.org/cvss/v2.0", description = ""), @AllowedValue(value = "http://www.first.org/cvss/v3.0", description = ""), @AllowedValue(value = "http://www.first.org/cvss/v3.1", description = "")})
259 )
260 private URI _system;
261
262 @BoundFlag(
263 formalName = "Facet Value",
264 description = "Indicates the value of the facet.",
265 useName = "value",
266 required = true,
267 typeAdapter = StringAdapter.class
268 )
269 private String _value;
270
271 @BoundAssembly(
272 formalName = "Property",
273 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
274 useName = "prop",
275 maxOccurs = -1
276 )
277 @GroupAs(
278 name = "props",
279 inJson = JsonGroupAsBehavior.LIST
280 )
281 private List<Property> _props;
282
283 @BoundAssembly(
284 formalName = "Link",
285 description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
286 useName = "link",
287 maxOccurs = -1
288 )
289 @GroupAs(
290 name = "links",
291 inJson = JsonGroupAsBehavior.LIST
292 )
293 private List<Link> _links;
294
295 @BoundField(
296 formalName = "Remarks",
297 description = "Additional commentary about the containing object.",
298 useName = "remarks"
299 )
300 @BoundFieldValue(
301 typeAdapter = MarkupMultilineAdapter.class
302 )
303 private MarkupMultiline _remarks;
304
305 public Facet() {
306 }
307
308 public String getName() {
309 return _name;
310 }
311
312 public void setName(String value) {
313 _name = value;
314 }
315
316 public URI getSystem() {
317 return _system;
318 }
319
320 public void setSystem(URI value) {
321 _system = value;
322 }
323
324 public String getValue() {
325 return _value;
326 }
327
328 public void setValue(String value) {
329 _value = value;
330 }
331
332 public List<Property> getProps() {
333 return _props;
334 }
335
336 public void setProps(List<Property> value) {
337 _props = value;
338 }
339
340
341
342
343
344
345 public boolean addProp(Property item) {
346 Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
347 if (_props == null) {
348 _props = new LinkedList<>();
349 }
350 return _props.add(value);
351 }
352
353
354
355
356
357
358 public boolean removeProp(Property item) {
359 Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
360 return _props == null ? false : _props.remove(value);
361 }
362
363 public List<Link> getLinks() {
364 return _links;
365 }
366
367 public void setLinks(List<Link> value) {
368 _links = value;
369 }
370
371
372
373
374
375
376 public boolean addLink(Link item) {
377 Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
378 if (_links == null) {
379 _links = new LinkedList<>();
380 }
381 return _links.add(value);
382 }
383
384
385
386
387
388
389 public boolean removeLink(Link item) {
390 Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
391 return _links == null ? false : _links.remove(value);
392 }
393
394 public MarkupMultiline getRemarks() {
395 return _remarks;
396 }
397
398 public void setRemarks(MarkupMultiline value) {
399 _remarks = value;
400 }
401
402 @Override
403 public String toString() {
404 return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
405 }
406 }
407 }