001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_assessment-common_metaschema.xml 002// Do not edit - changes will be lost when regenerated. 003package dev.metaschema.oscal.lib.model; 004 005import dev.metaschema.core.datatype.adapter.UuidAdapter; 006import dev.metaschema.core.datatype.markup.MarkupLine; 007import dev.metaschema.core.datatype.markup.MarkupLineAdapter; 008import dev.metaschema.core.datatype.markup.MarkupMultiline; 009import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter; 010import dev.metaschema.core.model.IBoundObject; 011import dev.metaschema.core.model.IMetaschemaData; 012import dev.metaschema.core.model.JsonGroupAsBehavior; 013import dev.metaschema.core.model.constraint.IConstraint; 014import dev.metaschema.core.util.ObjectUtils; 015import dev.metaschema.databind.model.annotations.AssemblyConstraints; 016import dev.metaschema.databind.model.annotations.BoundAssembly; 017import dev.metaschema.databind.model.annotations.BoundField; 018import dev.metaschema.databind.model.annotations.BoundFlag; 019import dev.metaschema.databind.model.annotations.GroupAs; 020import dev.metaschema.databind.model.annotations.IsUnique; 021import dev.metaschema.databind.model.annotations.KeyField; 022import dev.metaschema.databind.model.annotations.MetaschemaAssembly; 023import edu.umd.cs.findbugs.annotations.NonNull; 024import edu.umd.cs.findbugs.annotations.Nullable; 025import java.util.LinkedList; 026import java.util.List; 027import java.util.UUID; 028import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 029import org.apache.commons.lang3.builder.ToStringStyle; 030 031/** 032 * Identifies the assets used to perform this assessment, such as the assessment team, scanning tools, and assumptions. 033 */ 034@MetaschemaAssembly( 035 formalName = "Assessment Assets", 036 description = "Identifies the assets used to perform this assessment, such as the assessment team, scanning tools, and assumptions.", 037 name = "assessment-assets", 038 moduleClass = OscalAssessmentCommonModule.class, 039 modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "oscal-unique-ssp-assessment-assets-component", level = IConstraint.Level.ERROR, target = "component", keyFields = @KeyField(target = "@uuid"), remarks = "Since multiple assessment `component` entries can be provided, each component must have a unique `uuid`.")) 040) 041public class AssessmentAssets implements IBoundObject { 042 private final IMetaschemaData __metaschemaData; 043 044 /** 045 * A defined component that can be part of an implemented system. 046 */ 047 @BoundAssembly( 048 formalName = "Component", 049 description = "A defined component that can be part of an implemented system.", 050 useName = "component", 051 remarks = "Used to add any components for tools used during the assessment. These are represented here to avoid mixing with system components.\n" 052 + "\n" 053 + "The technology tools used by the assessor to perform the assessment, such as vulnerability scanners. In the assessment plan these are the intended tools. In the assessment results, these are the actual tools used, including any differences from the assessment plan.", 054 maxOccurs = -1, 055 groupAs = @GroupAs(name = "components", inJson = JsonGroupAsBehavior.LIST) 056 ) 057 private List<SystemComponent> _components; 058 059 /** 060 * Used to represent the toolset used to perform aspects of the assessment. 061 */ 062 @BoundAssembly( 063 formalName = "Assessment Platform", 064 description = "Used to represent the toolset used to perform aspects of the assessment.", 065 useName = "assessment-platform", 066 minOccurs = 1, 067 maxOccurs = -1, 068 groupAs = @GroupAs(name = "assessment-platforms", inJson = JsonGroupAsBehavior.LIST) 069 ) 070 private List<AssessmentPlatform> _assessmentPlatforms; 071 072 /** 073 * Constructs a new {@code dev.metaschema.oscal.lib.model.AssessmentAssets} instance with no metadata. 074 */ 075 public AssessmentAssets() { 076 this(null); 077 } 078 079 /** 080 * Constructs a new {@code dev.metaschema.oscal.lib.model.AssessmentAssets} instance with the specified metadata. 081 * 082 * @param data 083 * the metaschema data, or {@code null} if none 084 */ 085 public AssessmentAssets(IMetaschemaData data) { 086 this.__metaschemaData = data; 087 } 088 089 @Override 090 public IMetaschemaData getMetaschemaData() { 091 return __metaschemaData; 092 } 093 094 /** 095 * Get the "{@literal Component}". 096 * 097 * <p> 098 * A defined component that can be part of an implemented system. 099 * 100 * @return the component value 101 */ 102 @NonNull 103 public List<SystemComponent> getComponents() { 104 if (_components == null) { 105 _components = new LinkedList<>(); 106 } 107 return ObjectUtils.notNull(_components); 108 } 109 110 /** 111 * Set the "{@literal Component}". 112 * 113 * <p> 114 * A defined component that can be part of an implemented system. 115 * 116 * @param value 117 * the component value to set 118 */ 119 public void setComponents(@NonNull List<SystemComponent> value) { 120 _components = value; 121 } 122 123 /** 124 * Add a new {@link SystemComponent} item to the underlying collection. 125 * @param item the item to add 126 * @return {@code true} 127 */ 128 public boolean addComponent(SystemComponent item) { 129 SystemComponent value = ObjectUtils.requireNonNull(item,"item cannot be null"); 130 if (_components == null) { 131 _components = new LinkedList<>(); 132 } 133 return _components.add(value); 134 } 135 136 /** 137 * Remove the first matching {@link SystemComponent} item from the underlying collection. 138 * @param item the item to remove 139 * @return {@code true} if the item was removed or {@code false} otherwise 140 */ 141 public boolean removeComponent(SystemComponent item) { 142 SystemComponent value = ObjectUtils.requireNonNull(item,"item cannot be null"); 143 return _components != null && _components.remove(value); 144 } 145 146 /** 147 * Get the "{@literal Assessment Platform}". 148 * 149 * <p> 150 * Used to represent the toolset used to perform aspects of the assessment. 151 * 152 * @return the assessment-platform value 153 */ 154 @NonNull 155 public List<AssessmentPlatform> getAssessmentPlatforms() { 156 if (_assessmentPlatforms == null) { 157 _assessmentPlatforms = new LinkedList<>(); 158 } 159 return ObjectUtils.notNull(_assessmentPlatforms); 160 } 161 162 /** 163 * Set the "{@literal Assessment Platform}". 164 * 165 * <p> 166 * Used to represent the toolset used to perform aspects of the assessment. 167 * 168 * @param value 169 * the assessment-platform value to set 170 */ 171 public void setAssessmentPlatforms(@NonNull List<AssessmentPlatform> value) { 172 _assessmentPlatforms = value; 173 } 174 175 /** 176 * Add a new {@link AssessmentPlatform} item to the underlying collection. 177 * @param item the item to add 178 * @return {@code true} 179 */ 180 public boolean addAssessmentPlatform(AssessmentPlatform item) { 181 AssessmentPlatform value = ObjectUtils.requireNonNull(item,"item cannot be null"); 182 if (_assessmentPlatforms == null) { 183 _assessmentPlatforms = new LinkedList<>(); 184 } 185 return _assessmentPlatforms.add(value); 186 } 187 188 /** 189 * Remove the first matching {@link AssessmentPlatform} item from the underlying collection. 190 * @param item the item to remove 191 * @return {@code true} if the item was removed or {@code false} otherwise 192 */ 193 public boolean removeAssessmentPlatform(AssessmentPlatform item) { 194 AssessmentPlatform value = ObjectUtils.requireNonNull(item,"item cannot be null"); 195 return _assessmentPlatforms != null && _assessmentPlatforms.remove(value); 196 } 197 198 @Override 199 public String toString() { 200 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 201 } 202 203 /** 204 * Used to represent the toolset used to perform aspects of the assessment. 205 */ 206 @MetaschemaAssembly( 207 formalName = "Assessment Platform", 208 description = "Used to represent the toolset used to perform aspects of the assessment.", 209 name = "assessment-platform", 210 moduleClass = OscalAssessmentCommonModule.class 211 ) 212 public static class AssessmentPlatform implements IBoundObject { 213 private final IMetaschemaData __metaschemaData; 214 215 /** 216 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this assessment platform elsewhere in this or other OSCAL instances. The locally defined <em>UUID</em> of the <code>assessment platform</code> can be used to reference the data item locally or globally (e.g., in an <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">imported OSCAL instance</a>). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 217 */ 218 @BoundFlag( 219 formalName = "Assessment Platform Universally Unique Identifier", 220 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented), [globally unique](https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique) identifier with [cross-instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance) scope that can be used to reference this assessment platform elsewhere in this or other OSCAL instances. The locally defined *UUID* of the `assessment platform` can be used to reference the data item locally or globally (e.g., in an [imported OSCAL instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope)). This UUID should be assigned [per-subject](https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency), which means it should be consistently used to identify the same subject across revisions of the document.", 221 name = "uuid", 222 required = true, 223 typeAdapter = UuidAdapter.class 224 ) 225 private UUID _uuid; 226 227 /** 228 * The title or name for the assessment platform. 229 */ 230 @BoundField( 231 formalName = "Assessment Platform Title", 232 description = "The title or name for the assessment platform.", 233 useName = "title", 234 typeAdapter = MarkupLineAdapter.class 235 ) 236 private MarkupLine _title; 237 238 /** 239 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 240 */ 241 @BoundAssembly( 242 formalName = "Property", 243 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.", 244 useName = "prop", 245 maxOccurs = -1, 246 groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST) 247 ) 248 private List<Property> _props; 249 250 /** 251 * A reference to a local or remote resource, that has a specific relation to the containing object. 252 */ 253 @BoundAssembly( 254 formalName = "Link", 255 description = "A reference to a local or remote resource, that has a specific relation to the containing object.", 256 useName = "link", 257 maxOccurs = -1, 258 groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST) 259 ) 260 private List<Link> _links; 261 262 /** 263 * The set of components that are used by the assessment platform. 264 */ 265 @BoundAssembly( 266 formalName = "Uses Component", 267 description = "The set of components that are used by the assessment platform.", 268 useName = "uses-component", 269 maxOccurs = -1, 270 groupAs = @GroupAs(name = "uses-components", inJson = JsonGroupAsBehavior.LIST) 271 ) 272 private List<UsesComponent> _usesComponents; 273 274 /** 275 * Additional commentary about the containing object. 276 */ 277 @BoundField( 278 formalName = "Remarks", 279 description = "Additional commentary about the containing object.", 280 useName = "remarks", 281 typeAdapter = MarkupMultilineAdapter.class 282 ) 283 private MarkupMultiline _remarks; 284 285 /** 286 * Constructs a new {@code dev.metaschema.oscal.lib.model.AssessmentAssets.AssessmentPlatform} instance with no metadata. 287 */ 288 public AssessmentPlatform() { 289 this(null); 290 } 291 292 /** 293 * Constructs a new {@code dev.metaschema.oscal.lib.model.AssessmentAssets.AssessmentPlatform} instance with the specified metadata. 294 * 295 * @param data 296 * the metaschema data, or {@code null} if none 297 */ 298 public AssessmentPlatform(IMetaschemaData data) { 299 this.__metaschemaData = data; 300 } 301 302 @Override 303 public IMetaschemaData getMetaschemaData() { 304 return __metaschemaData; 305 } 306 307 /** 308 * Get the "{@literal Assessment Platform Universally Unique Identifier}". 309 * 310 * <p> 311 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this assessment platform elsewhere in this or other OSCAL instances. The locally defined <em>UUID</em> of the <code>assessment platform</code> can be used to reference the data item locally or globally (e.g., in an <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">imported OSCAL instance</a>). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 312 * 313 * @return the uuid value 314 */ 315 @NonNull 316 public UUID getUuid() { 317 return _uuid; 318 } 319 320 /** 321 * Set the "{@literal Assessment Platform Universally Unique Identifier}". 322 * 323 * <p> 324 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this assessment platform elsewhere in this or other OSCAL instances. The locally defined <em>UUID</em> of the <code>assessment platform</code> can be used to reference the data item locally or globally (e.g., in an <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">imported OSCAL instance</a>). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 325 * 326 * @param value 327 * the uuid value to set 328 */ 329 public void setUuid(@NonNull UUID value) { 330 _uuid = value; 331 } 332 333 /** 334 * Get the "{@literal Assessment Platform Title}". 335 * 336 * <p> 337 * The title or name for the assessment platform. 338 * 339 * @return the title value, or {@code null} if not set 340 */ 341 @Nullable 342 public MarkupLine getTitle() { 343 return _title; 344 } 345 346 /** 347 * Set the "{@literal Assessment Platform Title}". 348 * 349 * <p> 350 * The title or name for the assessment platform. 351 * 352 * @param value 353 * the title value to set, or {@code null} to clear 354 */ 355 public void setTitle(@Nullable MarkupLine value) { 356 _title = value; 357 } 358 359 /** 360 * Get the "{@literal Property}". 361 * 362 * <p> 363 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 364 * 365 * @return the prop value 366 */ 367 @NonNull 368 public List<Property> getProps() { 369 if (_props == null) { 370 _props = new LinkedList<>(); 371 } 372 return ObjectUtils.notNull(_props); 373 } 374 375 /** 376 * Set the "{@literal Property}". 377 * 378 * <p> 379 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 380 * 381 * @param value 382 * the prop value to set 383 */ 384 public void setProps(@NonNull List<Property> value) { 385 _props = value; 386 } 387 388 /** 389 * Add a new {@link Property} item to the underlying collection. 390 * @param item the item to add 391 * @return {@code true} 392 */ 393 public boolean addProp(Property item) { 394 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 395 if (_props == null) { 396 _props = new LinkedList<>(); 397 } 398 return _props.add(value); 399 } 400 401 /** 402 * Remove the first matching {@link Property} item from the underlying collection. 403 * @param item the item to remove 404 * @return {@code true} if the item was removed or {@code false} otherwise 405 */ 406 public boolean removeProp(Property item) { 407 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 408 return _props != null && _props.remove(value); 409 } 410 411 /** 412 * Get the "{@literal Link}". 413 * 414 * <p> 415 * A reference to a local or remote resource, that has a specific relation to the containing object. 416 * 417 * @return the link value 418 */ 419 @NonNull 420 public List<Link> getLinks() { 421 if (_links == null) { 422 _links = new LinkedList<>(); 423 } 424 return ObjectUtils.notNull(_links); 425 } 426 427 /** 428 * Set the "{@literal Link}". 429 * 430 * <p> 431 * A reference to a local or remote resource, that has a specific relation to the containing object. 432 * 433 * @param value 434 * the link value to set 435 */ 436 public void setLinks(@NonNull List<Link> value) { 437 _links = value; 438 } 439 440 /** 441 * Add a new {@link Link} item to the underlying collection. 442 * @param item the item to add 443 * @return {@code true} 444 */ 445 public boolean addLink(Link item) { 446 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 447 if (_links == null) { 448 _links = new LinkedList<>(); 449 } 450 return _links.add(value); 451 } 452 453 /** 454 * Remove the first matching {@link Link} item from the underlying collection. 455 * @param item the item to remove 456 * @return {@code true} if the item was removed or {@code false} otherwise 457 */ 458 public boolean removeLink(Link item) { 459 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 460 return _links != null && _links.remove(value); 461 } 462 463 /** 464 * Get the "{@literal Uses Component}". 465 * 466 * <p> 467 * The set of components that are used by the assessment platform. 468 * 469 * @return the uses-component value 470 */ 471 @NonNull 472 public List<UsesComponent> getUsesComponents() { 473 if (_usesComponents == null) { 474 _usesComponents = new LinkedList<>(); 475 } 476 return ObjectUtils.notNull(_usesComponents); 477 } 478 479 /** 480 * Set the "{@literal Uses Component}". 481 * 482 * <p> 483 * The set of components that are used by the assessment platform. 484 * 485 * @param value 486 * the uses-component value to set 487 */ 488 public void setUsesComponents(@NonNull List<UsesComponent> value) { 489 _usesComponents = value; 490 } 491 492 /** 493 * Add a new {@link UsesComponent} item to the underlying collection. 494 * @param item the item to add 495 * @return {@code true} 496 */ 497 public boolean addUsesComponent(UsesComponent item) { 498 UsesComponent value = ObjectUtils.requireNonNull(item,"item cannot be null"); 499 if (_usesComponents == null) { 500 _usesComponents = new LinkedList<>(); 501 } 502 return _usesComponents.add(value); 503 } 504 505 /** 506 * Remove the first matching {@link UsesComponent} item from the underlying collection. 507 * @param item the item to remove 508 * @return {@code true} if the item was removed or {@code false} otherwise 509 */ 510 public boolean removeUsesComponent(UsesComponent item) { 511 UsesComponent value = ObjectUtils.requireNonNull(item,"item cannot be null"); 512 return _usesComponents != null && _usesComponents.remove(value); 513 } 514 515 /** 516 * Get the "{@literal Remarks}". 517 * 518 * <p> 519 * Additional commentary about the containing object. 520 * 521 * @return the remarks value, or {@code null} if not set 522 */ 523 @Nullable 524 public MarkupMultiline getRemarks() { 525 return _remarks; 526 } 527 528 /** 529 * Set the "{@literal Remarks}". 530 * 531 * <p> 532 * Additional commentary about the containing object. 533 * 534 * @param value 535 * the remarks value to set, or {@code null} to clear 536 */ 537 public void setRemarks(@Nullable MarkupMultiline value) { 538 _remarks = value; 539 } 540 541 @Override 542 public String toString() { 543 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 544 } 545 546 /** 547 * The set of components that are used by the assessment platform. 548 */ 549 @MetaschemaAssembly( 550 formalName = "Uses Component", 551 description = "The set of components that are used by the assessment platform.", 552 name = "uses-component", 553 moduleClass = OscalAssessmentCommonModule.class, 554 modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "oscal-unique-ssp-uses-component-responsible-party", level = IConstraint.Level.ERROR, target = "responsible-party", keyFields = @KeyField(target = "@role-id"), remarks = "Since `responsible-party` associates multiple `party-uuid` entries with a single `role-id`, each role-id must be referenced only once.")) 555 ) 556 public static class UsesComponent implements IBoundObject { 557 private final IMetaschemaData __metaschemaData; 558 559 /** 560 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a component that is implemented as part of an inventory item. 561 */ 562 @BoundFlag( 563 formalName = "Component Universally Unique Identifier Reference", 564 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to a component that is implemented as part of an inventory item.", 565 name = "component-uuid", 566 required = true, 567 typeAdapter = UuidAdapter.class 568 ) 569 private UUID _componentUuid; 570 571 /** 572 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 573 */ 574 @BoundAssembly( 575 formalName = "Property", 576 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.", 577 useName = "prop", 578 maxOccurs = -1, 579 groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST) 580 ) 581 private List<Property> _props; 582 583 /** 584 * A reference to a local or remote resource, that has a specific relation to the containing object. 585 */ 586 @BoundAssembly( 587 formalName = "Link", 588 description = "A reference to a local or remote resource, that has a specific relation to the containing object.", 589 useName = "link", 590 maxOccurs = -1, 591 groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST) 592 ) 593 private List<Link> _links; 594 595 /** 596 * A reference to a set of persons and/or organizations that have responsibility for performing the referenced role in the context of the containing object. 597 */ 598 @BoundAssembly( 599 formalName = "Responsible Party", 600 description = "A reference to a set of persons and/or organizations that have responsibility for performing the referenced role in the context of the containing object.", 601 useName = "responsible-party", 602 maxOccurs = -1, 603 groupAs = @GroupAs(name = "responsible-parties", inJson = JsonGroupAsBehavior.LIST) 604 ) 605 private List<ResponsibleParty> _responsibleParties; 606 607 /** 608 * Additional commentary about the containing object. 609 */ 610 @BoundField( 611 formalName = "Remarks", 612 description = "Additional commentary about the containing object.", 613 useName = "remarks", 614 typeAdapter = MarkupMultilineAdapter.class 615 ) 616 private MarkupMultiline _remarks; 617 618 /** 619 * Constructs a new {@code dev.metaschema.oscal.lib.model.AssessmentAssets.AssessmentPlatform.UsesComponent} instance with no metadata. 620 */ 621 public UsesComponent() { 622 this(null); 623 } 624 625 /** 626 * Constructs a new {@code dev.metaschema.oscal.lib.model.AssessmentAssets.AssessmentPlatform.UsesComponent} instance with the specified metadata. 627 * 628 * @param data 629 * the metaschema data, or {@code null} if none 630 */ 631 public UsesComponent(IMetaschemaData data) { 632 this.__metaschemaData = data; 633 } 634 635 @Override 636 public IMetaschemaData getMetaschemaData() { 637 return __metaschemaData; 638 } 639 640 /** 641 * Get the "{@literal Component Universally Unique Identifier Reference}". 642 * 643 * <p> 644 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a component that is implemented as part of an inventory item. 645 * 646 * @return the component-uuid value 647 */ 648 @NonNull 649 public UUID getComponentUuid() { 650 return _componentUuid; 651 } 652 653 /** 654 * Set the "{@literal Component Universally Unique Identifier Reference}". 655 * 656 * <p> 657 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a component that is implemented as part of an inventory item. 658 * 659 * @param value 660 * the component-uuid value to set 661 */ 662 public void setComponentUuid(@NonNull UUID value) { 663 _componentUuid = value; 664 } 665 666 /** 667 * Get the "{@literal Property}". 668 * 669 * <p> 670 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 671 * 672 * @return the prop value 673 */ 674 @NonNull 675 public List<Property> getProps() { 676 if (_props == null) { 677 _props = new LinkedList<>(); 678 } 679 return ObjectUtils.notNull(_props); 680 } 681 682 /** 683 * Set the "{@literal Property}". 684 * 685 * <p> 686 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 687 * 688 * @param value 689 * the prop value to set 690 */ 691 public void setProps(@NonNull List<Property> value) { 692 _props = value; 693 } 694 695 /** 696 * Add a new {@link Property} item to the underlying collection. 697 * @param item the item to add 698 * @return {@code true} 699 */ 700 public boolean addProp(Property item) { 701 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 702 if (_props == null) { 703 _props = new LinkedList<>(); 704 } 705 return _props.add(value); 706 } 707 708 /** 709 * Remove the first matching {@link Property} item from the underlying collection. 710 * @param item the item to remove 711 * @return {@code true} if the item was removed or {@code false} otherwise 712 */ 713 public boolean removeProp(Property item) { 714 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 715 return _props != null && _props.remove(value); 716 } 717 718 /** 719 * Get the "{@literal Link}". 720 * 721 * <p> 722 * A reference to a local or remote resource, that has a specific relation to the containing object. 723 * 724 * @return the link value 725 */ 726 @NonNull 727 public List<Link> getLinks() { 728 if (_links == null) { 729 _links = new LinkedList<>(); 730 } 731 return ObjectUtils.notNull(_links); 732 } 733 734 /** 735 * Set the "{@literal Link}". 736 * 737 * <p> 738 * A reference to a local or remote resource, that has a specific relation to the containing object. 739 * 740 * @param value 741 * the link value to set 742 */ 743 public void setLinks(@NonNull List<Link> value) { 744 _links = value; 745 } 746 747 /** 748 * Add a new {@link Link} item to the underlying collection. 749 * @param item the item to add 750 * @return {@code true} 751 */ 752 public boolean addLink(Link item) { 753 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 754 if (_links == null) { 755 _links = new LinkedList<>(); 756 } 757 return _links.add(value); 758 } 759 760 /** 761 * Remove the first matching {@link Link} item from the underlying collection. 762 * @param item the item to remove 763 * @return {@code true} if the item was removed or {@code false} otherwise 764 */ 765 public boolean removeLink(Link item) { 766 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 767 return _links != null && _links.remove(value); 768 } 769 770 /** 771 * Get the "{@literal Responsible Party}". 772 * 773 * <p> 774 * A reference to a set of persons and/or organizations that have responsibility for performing the referenced role in the context of the containing object. 775 * 776 * @return the responsible-party value 777 */ 778 @NonNull 779 public List<ResponsibleParty> getResponsibleParties() { 780 if (_responsibleParties == null) { 781 _responsibleParties = new LinkedList<>(); 782 } 783 return ObjectUtils.notNull(_responsibleParties); 784 } 785 786 /** 787 * Set the "{@literal Responsible Party}". 788 * 789 * <p> 790 * A reference to a set of persons and/or organizations that have responsibility for performing the referenced role in the context of the containing object. 791 * 792 * @param value 793 * the responsible-party value to set 794 */ 795 public void setResponsibleParties(@NonNull List<ResponsibleParty> value) { 796 _responsibleParties = value; 797 } 798 799 /** 800 * Add a new {@link ResponsibleParty} item to the underlying collection. 801 * @param item the item to add 802 * @return {@code true} 803 */ 804 public boolean addResponsibleParty(ResponsibleParty item) { 805 ResponsibleParty value = ObjectUtils.requireNonNull(item,"item cannot be null"); 806 if (_responsibleParties == null) { 807 _responsibleParties = new LinkedList<>(); 808 } 809 return _responsibleParties.add(value); 810 } 811 812 /** 813 * Remove the first matching {@link ResponsibleParty} item from the underlying collection. 814 * @param item the item to remove 815 * @return {@code true} if the item was removed or {@code false} otherwise 816 */ 817 public boolean removeResponsibleParty(ResponsibleParty item) { 818 ResponsibleParty value = ObjectUtils.requireNonNull(item,"item cannot be null"); 819 return _responsibleParties != null && _responsibleParties.remove(value); 820 } 821 822 /** 823 * Get the "{@literal Remarks}". 824 * 825 * <p> 826 * Additional commentary about the containing object. 827 * 828 * @return the remarks value, or {@code null} if not set 829 */ 830 @Nullable 831 public MarkupMultiline getRemarks() { 832 return _remarks; 833 } 834 835 /** 836 * Set the "{@literal Remarks}". 837 * 838 * <p> 839 * Additional commentary about the containing object. 840 * 841 * @param value 842 * the remarks value to set, or {@code null} to clear 843 */ 844 public void setRemarks(@Nullable MarkupMultiline value) { 845 _remarks = value; 846 } 847 848 @Override 849 public String toString() { 850 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 851 } 852 } 853 } 854}