001package gov.nist.secauto.oscal.lib.model;
002
003import gov.nist.secauto.metaschema.core.datatype.adapter.UuidAdapter;
004import gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultiline;
005import gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultilineAdapter;
006import gov.nist.secauto.metaschema.core.model.IBoundObject;
007import gov.nist.secauto.metaschema.core.model.IMetaschemaData;
008import gov.nist.secauto.metaschema.core.model.JsonGroupAsBehavior;
009import gov.nist.secauto.metaschema.core.model.constraint.IConstraint;
010import gov.nist.secauto.metaschema.core.util.ObjectUtils;
011import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValue;
012import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValues;
013import gov.nist.secauto.metaschema.databind.model.annotations.AssemblyConstraints;
014import gov.nist.secauto.metaschema.databind.model.annotations.BoundAssembly;
015import gov.nist.secauto.metaschema.databind.model.annotations.BoundField;
016import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag;
017import gov.nist.secauto.metaschema.databind.model.annotations.GroupAs;
018import gov.nist.secauto.metaschema.databind.model.annotations.HasCardinality;
019import gov.nist.secauto.metaschema.databind.model.annotations.IndexHasKey;
020import gov.nist.secauto.metaschema.databind.model.annotations.IsUnique;
021import gov.nist.secauto.metaschema.databind.model.annotations.KeyField;
022import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly;
023import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints;
024import java.lang.Override;
025import java.lang.String;
026import java.util.LinkedList;
027import java.util.List;
028import java.util.UUID;
029import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
030import org.apache.commons.lang3.builder.ToStringStyle;
031
032/**
033 * A single managed inventory item within the system.
034 */
035@MetaschemaAssembly(
036    formalName = "Inventory Item",
037    description = "A single managed inventory item within the system.",
038    name = "inventory-item",
039    moduleClass = OscalImplementationCommonModule.class,
040    valueConstraints = @ValueConstraints(allowedValues = {@AllowedValues(level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = {@AllowedValue(value = "ipv4-address", description = "The Internet Protocol v4 Address of the asset."), @AllowedValue(value = "ipv6-address", description = "The Internet Protocol v6 Address of the asset."), @AllowedValue(value = "fqdn", description = "The full-qualified domain name (FQDN) of the asset."), @AllowedValue(value = "uri", description = "A Uniform Resource Identifier (URI) for the asset."), @AllowedValue(value = "serial-number", description = "A serial number for the asset."), @AllowedValue(value = "netbios-name", description = "The NetBIOS name for the asset."), @AllowedValue(value = "mac-address", description = "The media access control (MAC) address for the asset."), @AllowedValue(value = "physical-location", description = "The physical location of the asset's hardware (e.g., Data Center ID, Cage#, Rack#, or other meaningful location identifiers)."), @AllowedValue(value = "is-scanned", description = "is the asset subjected to network scans? (yes/no)"), @AllowedValue(value = "hardware-model", description = "The model number of the hardware used by the asset."), @AllowedValue(value = "os-name", description = "The name of the operating system used by the asset."), @AllowedValue(value = "os-version", description = "The version of the operating system used by the asset."), @AllowedValue(value = "software-name", description = "The software product name used by the asset."), @AllowedValue(value = "software-version", description = "The software product version used by the asset."), @AllowedValue(value = "software-patch-level", description = "The software product patch level used by the asset."), @AllowedValue(value = "asset-type", description = "Simple indication of the asset's function, such as Router, Storage Array, DNS Server."), @AllowedValue(value = "asset-id", description = "An organizationally specific identifier that is used to uniquely identify a logical or tangible item by the organization that owns the item."), @AllowedValue(value = "asset-tag", description = "An asset tag assigned by the organization responsible for maintaining the logical or tangible item."), @AllowedValue(value = "public", description = "Identifies whether the asset is publicly accessible (yes/no)"), @AllowedValue(value = "virtual", description = "Identifies whether the asset is virtualized (yes/no)"), @AllowedValue(value = "vlan-id", description = "Virtual LAN identifier of the asset."), @AllowedValue(value = "network-id", description = "The network identifier of the asset."), @AllowedValue(value = "label", description = "A human-readable label for the parent context."), @AllowedValue(value = "sort-id", description = "An alternative identifier, whose value is easily sortable among other such values in the document."), @AllowedValue(value = "baseline-configuration-name", description = "The name of the baseline configuration for the asset."), @AllowedValue(value = "allows-authenticated-scan", description = "Can the asset be check with an authenticated scan? (yes/no)"), @AllowedValue(value = "function", description = "The function provided by the asset for the system.")}), @AllowedValues(level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='asset-type']/@value", allowOthers = true, values = {@AllowedValue(value = "operating-system", description = "System software that manages computer hardware, software resources, and provides common services for computer programs."), @AllowedValue(value = "database", description = "An electronic collection of data, or information, that is specially organized for rapid search and retrieval."), @AllowedValue(value = "web-server", description = "A system that delivers content or services to end users over the Internet or an intranet."), @AllowedValue(value = "dns-server", description = "A system that resolves domain names to internet protocol (IP) addresses."), @AllowedValue(value = "email-server", description = "A computer system that sends and receives electronic mail messages."), @AllowedValue(value = "directory-server", description = "A system that stores, organizes and provides access to directory information in order to unify network resources."), @AllowedValue(value = "pbx", description = "A private branch exchange (PBX) provides a a private telephone switchboard."), @AllowedValue(value = "firewall", description = "A network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules."), @AllowedValue(value = "router", description = "A physical or virtual networking device that forwards data packets between computer networks."), @AllowedValue(value = "switch", description = "A physical or virtual networking device that connects devices within a computer network by using packet switching to receive and forward data to the destination device."), @AllowedValue(value = "storage-array", description = "A consolidated, block-level data storage capability."), @AllowedValue(value = "appliance", description = "A physical or virtual machine that centralizes hardware, software, or services for a specific purpose.")}), @AllowedValues(level = IConstraint.Level.ERROR, target = "(.)[@type=('software', 'hardware', 'service')]/prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = @AllowedValue(value = "vendor-name", description = "The name of the company or organization")), @AllowedValues(level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='is-scanned']/@value", values = {@AllowedValue(value = "yes", description = "The asset is included in periodic vulnerability scanning."), @AllowedValue(value = "no", description = "The asset is not included in periodic vulnerability scanning.")}), @AllowedValues(level = IConstraint.Level.ERROR, target = "link/@rel", allowOthers = true, values = @AllowedValue(value = "baseline-template", description = "A reference to the baseline template used to configure the asset.")), @AllowedValues(level = IConstraint.Level.ERROR, target = "responsible-party/@role-id", allowOthers = true, values = {@AllowedValue(value = "asset-owner", description = "Accountable for ensuring the asset is managed in accordance with organizational policies and procedures."), @AllowedValue(value = "asset-administrator", description = "Responsible for administering a set of assets."), @AllowedValue(value = "security-operations", description = "Members of the security operations center (SOC)."), @AllowedValue(value = "network-operations", description = "Members of the network operations center (NOC)."), @AllowedValue(value = "incident-response", description = "Responsible for responding to an event that could lead to loss of, or disruption to, an organization's operations, services or functions."), @AllowedValue(value = "help-desk", description = "Responsible for providing information and support to users."), @AllowedValue(value = "configuration-management", description = "Responsible for the configuration management processes governing changes to the asset."), @AllowedValue(value = "maintainer", description = "Responsible for the creation and maintenance of a component."), @AllowedValue(value = "provider", description = "Organization responsible for providing the component, if this is different from the \"maintainer\" (e.g., a reseller).")})}, indexHasKey = {@IndexHasKey(level = IConstraint.Level.ERROR, target = "responsible-party", indexName = "index-metadata-role-id", keyFields = @KeyField(target = "@role-id")), @IndexHasKey(level = IConstraint.Level.ERROR, target = "responsible-party", indexName = "index-metadata-party-uuid", keyFields = @KeyField(target = "party-uuid"))}),
041    modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "unique-inventory-item-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."))
042)
043public class InventoryItem implements IBoundObject {
044  private final IMetaschemaData __metaschemaData;
045
046  /**
047   * "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 inventory item elsewhere in <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope\">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>inventory item</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). 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."
048   */
049  @BoundFlag(
050      formalName = "Inventory Item Universally Unique Identifier",
051      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 inventory item elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope). The locally defined *UUID* of the `inventory item` can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). 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.",
052      name = "uuid",
053      required = true,
054      typeAdapter = UuidAdapter.class
055  )
056  private UUID _uuid;
057
058  @BoundField(
059      formalName = "Inventory Item Description",
060      description = "A summary of the inventory item stating its purpose within the system.",
061      useName = "description",
062      minOccurs = 1,
063      typeAdapter = MarkupMultilineAdapter.class
064  )
065  private MarkupMultiline _description;
066
067  @BoundAssembly(
068      formalName = "Property",
069      description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
070      useName = "prop",
071      maxOccurs = -1,
072      groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
073  )
074  private List<Property> _props;
075
076  @BoundAssembly(
077      formalName = "Link",
078      description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
079      useName = "link",
080      maxOccurs = -1,
081      groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
082  )
083  private List<Link> _links;
084
085  @BoundAssembly(
086      formalName = "Responsible Party",
087      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.",
088      useName = "responsible-party",
089      maxOccurs = -1,
090      groupAs = @GroupAs(name = "responsible-parties", inJson = JsonGroupAsBehavior.LIST)
091  )
092  private List<ResponsibleParty> _responsibleParties;
093
094  @BoundAssembly(
095      formalName = "Implemented Component",
096      description = "The set of components that are implemented in a given system inventory item.",
097      useName = "implemented-component",
098      maxOccurs = -1,
099      groupAs = @GroupAs(name = "implemented-components", inJson = JsonGroupAsBehavior.LIST)
100  )
101  private List<ImplementedComponent> _implementedComponents;
102
103  @BoundField(
104      formalName = "Remarks",
105      description = "Additional commentary about the containing object.",
106      useName = "remarks",
107      typeAdapter = MarkupMultilineAdapter.class
108  )
109  private MarkupMultiline _remarks;
110
111  public InventoryItem() {
112    this(null);
113  }
114
115  public InventoryItem(IMetaschemaData data) {
116    this.__metaschemaData = data;
117  }
118
119  @Override
120  public IMetaschemaData getMetaschemaData() {
121    return __metaschemaData;
122  }
123
124  public UUID getUuid() {
125    return _uuid;
126  }
127
128  public void setUuid(UUID value) {
129    _uuid = value;
130  }
131
132  public MarkupMultiline getDescription() {
133    return _description;
134  }
135
136  public void setDescription(MarkupMultiline value) {
137    _description = value;
138  }
139
140  public List<Property> getProps() {
141    return _props;
142  }
143
144  public void setProps(List<Property> value) {
145    _props = value;
146  }
147
148  /**
149   * Add a new {@link Property} item to the underlying collection.
150   * @param item the item to add
151   * @return {@code true}
152   */
153  public boolean addProp(Property item) {
154    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
155    if (_props == null) {
156      _props = new LinkedList<>();
157    }
158    return _props.add(value);
159  }
160
161  /**
162   * Remove the first matching {@link Property} item from the underlying collection.
163   * @param item the item to remove
164   * @return {@code true} if the item was removed or {@code false} otherwise
165   */
166  public boolean removeProp(Property item) {
167    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
168    return _props != null && _props.remove(value);
169  }
170
171  public List<Link> getLinks() {
172    return _links;
173  }
174
175  public void setLinks(List<Link> value) {
176    _links = value;
177  }
178
179  /**
180   * Add a new {@link Link} item to the underlying collection.
181   * @param item the item to add
182   * @return {@code true}
183   */
184  public boolean addLink(Link item) {
185    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
186    if (_links == null) {
187      _links = new LinkedList<>();
188    }
189    return _links.add(value);
190  }
191
192  /**
193   * Remove the first matching {@link Link} item from the underlying collection.
194   * @param item the item to remove
195   * @return {@code true} if the item was removed or {@code false} otherwise
196   */
197  public boolean removeLink(Link item) {
198    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
199    return _links != null && _links.remove(value);
200  }
201
202  public List<ResponsibleParty> getResponsibleParties() {
203    return _responsibleParties;
204  }
205
206  public void setResponsibleParties(List<ResponsibleParty> value) {
207    _responsibleParties = value;
208  }
209
210  /**
211   * Add a new {@link ResponsibleParty} item to the underlying collection.
212   * @param item the item to add
213   * @return {@code true}
214   */
215  public boolean addResponsibleParty(ResponsibleParty item) {
216    ResponsibleParty value = ObjectUtils.requireNonNull(item,"item cannot be null");
217    if (_responsibleParties == null) {
218      _responsibleParties = new LinkedList<>();
219    }
220    return _responsibleParties.add(value);
221  }
222
223  /**
224   * Remove the first matching {@link ResponsibleParty} item from the underlying collection.
225   * @param item the item to remove
226   * @return {@code true} if the item was removed or {@code false} otherwise
227   */
228  public boolean removeResponsibleParty(ResponsibleParty item) {
229    ResponsibleParty value = ObjectUtils.requireNonNull(item,"item cannot be null");
230    return _responsibleParties != null && _responsibleParties.remove(value);
231  }
232
233  public List<ImplementedComponent> getImplementedComponents() {
234    return _implementedComponents;
235  }
236
237  public void setImplementedComponents(List<ImplementedComponent> value) {
238    _implementedComponents = value;
239  }
240
241  /**
242   * Add a new {@link ImplementedComponent} item to the underlying collection.
243   * @param item the item to add
244   * @return {@code true}
245   */
246  public boolean addImplementedComponent(ImplementedComponent item) {
247    ImplementedComponent value = ObjectUtils.requireNonNull(item,"item cannot be null");
248    if (_implementedComponents == null) {
249      _implementedComponents = new LinkedList<>();
250    }
251    return _implementedComponents.add(value);
252  }
253
254  /**
255   * Remove the first matching {@link ImplementedComponent} item from the underlying collection.
256   * @param item the item to remove
257   * @return {@code true} if the item was removed or {@code false} otherwise
258   */
259  public boolean removeImplementedComponent(ImplementedComponent item) {
260    ImplementedComponent value = ObjectUtils.requireNonNull(item,"item cannot be null");
261    return _implementedComponents != null && _implementedComponents.remove(value);
262  }
263
264  public MarkupMultiline getRemarks() {
265    return _remarks;
266  }
267
268  public void setRemarks(MarkupMultiline value) {
269    _remarks = value;
270  }
271
272  @Override
273  public String toString() {
274    return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
275  }
276
277  /**
278   * The set of components that are implemented in a given system inventory item.
279   */
280  @MetaschemaAssembly(
281      formalName = "Implemented Component",
282      description = "The set of components that are implemented in a given system inventory item.",
283      name = "implemented-component",
284      moduleClass = OscalImplementationCommonModule.class,
285      valueConstraints = @ValueConstraints(allowedValues = {@AllowedValues(level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = {@AllowedValue(value = "version", description = "The version of the component."), @AllowedValue(value = "patch-level", description = "The specific patch level of the component."), @AllowedValue(value = "model", description = "The model of the component."), @AllowedValue(value = "release-date", description = "The date the component was released, such as a software release date or policy publication date."), @AllowedValue(value = "validation-type", description = "Used with component-type='validation' to provide a well-known name for a kind of validation."), @AllowedValue(value = "validation-reference", description = "Used with component-type='validation' to indicate the validating body's assigned identifier for their validation of this component."), @AllowedValue(value = "asset-type", description = "Simple indication of the asset's function, such as Router, Storage Array, DNS Server."), @AllowedValue(value = "asset-id", description = "An organizationally specific identifier that is used to uniquely identify a logical or tangible item by the organization that owns the item."), @AllowedValue(value = "asset-tag", description = "An asset tag assigned by the organization responsible for maintaining the logical or tangible item."), @AllowedValue(value = "public", description = "Identifies whether the asset is publicly accessible (yes/no)"), @AllowedValue(value = "virtual", description = "Identifies whether the asset is virtualized (yes/no)"), @AllowedValue(value = "vlan-id", description = "Virtual LAN identifier of the asset."), @AllowedValue(value = "network-id", description = "The network identifier of the asset."), @AllowedValue(value = "label", description = "A human-readable label for the parent context."), @AllowedValue(value = "sort-id", description = "An alternative identifier, whose value is easily sortable among other such values in the document."), @AllowedValue(value = "baseline-configuration-name", description = "The name of the baseline configuration for the asset."), @AllowedValue(value = "allows-authenticated-scan", description = "Can the asset be check with an authenticated scan? (yes/no)"), @AllowedValue(value = "function", description = "The function provided by the asset for the system.")}), @AllowedValues(level = IConstraint.Level.ERROR, target = "responsible-party/@role-id", allowOthers = true, values = {@AllowedValue(value = "asset-owner", description = "Accountable for ensuring the asset is managed in accordance with organizational policies and procedures."), @AllowedValue(value = "asset-administrator", description = "Responsible for administering a set of assets."), @AllowedValue(value = "security-operations", description = "Members of the security operations center (SOC)."), @AllowedValue(value = "network-operations", description = "Members of the network operations center (NOC)."), @AllowedValue(value = "incident-response", description = "Responsible for responding to an event that could lead to loss of, or disruption to, an organization's operations, services or functions."), @AllowedValue(value = "help-desk", description = "Responsible for providing information and support to users."), @AllowedValue(value = "configuration-management", description = "Responsible for the configuration management processes governing changes to the asset.")})}),
286      modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "unique-implemented-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."), cardinality = @HasCardinality(level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='asset-id']", minOccurs = 1))
287  )
288  public static class ImplementedComponent implements IBoundObject {
289    private final IMetaschemaData __metaschemaData;
290
291    /**
292     * "A <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented\">machine-oriented</a> identifier reference to a <code>component</code> that is implemented as part of an inventory item."
293     */
294    @BoundFlag(
295        formalName = "Component Universally Unique Identifier Reference",
296        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.",
297        name = "component-uuid",
298        required = true,
299        typeAdapter = UuidAdapter.class
300    )
301    private UUID _componentUuid;
302
303    @BoundAssembly(
304        formalName = "Property",
305        description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
306        useName = "prop",
307        maxOccurs = -1,
308        groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
309    )
310    private List<Property> _props;
311
312    @BoundAssembly(
313        formalName = "Link",
314        description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
315        useName = "link",
316        maxOccurs = -1,
317        groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
318    )
319    private List<Link> _links;
320
321    @BoundAssembly(
322        formalName = "Responsible Party",
323        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.",
324        useName = "responsible-party",
325        remarks = "This construct is used to either: 1) associate a party or parties to a role defined on the component using the `responsible-role` construct, or 2) to define a party or parties that are responsible for a role defined within the context of the containing `inventory-item`.",
326        maxOccurs = -1,
327        groupAs = @GroupAs(name = "responsible-parties", inJson = JsonGroupAsBehavior.LIST)
328    )
329    private List<ResponsibleParty> _responsibleParties;
330
331    @BoundField(
332        formalName = "Remarks",
333        description = "Additional commentary about the containing object.",
334        useName = "remarks",
335        typeAdapter = MarkupMultilineAdapter.class
336    )
337    private MarkupMultiline _remarks;
338
339    public ImplementedComponent() {
340      this(null);
341    }
342
343    public ImplementedComponent(IMetaschemaData data) {
344      this.__metaschemaData = data;
345    }
346
347    @Override
348    public IMetaschemaData getMetaschemaData() {
349      return __metaschemaData;
350    }
351
352    public UUID getComponentUuid() {
353      return _componentUuid;
354    }
355
356    public void setComponentUuid(UUID value) {
357      _componentUuid = value;
358    }
359
360    public List<Property> getProps() {
361      return _props;
362    }
363
364    public void setProps(List<Property> value) {
365      _props = value;
366    }
367
368    /**
369     * Add a new {@link Property} item to the underlying collection.
370     * @param item the item to add
371     * @return {@code true}
372     */
373    public boolean addProp(Property item) {
374      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
375      if (_props == null) {
376        _props = new LinkedList<>();
377      }
378      return _props.add(value);
379    }
380
381    /**
382     * Remove the first matching {@link Property} item from the underlying collection.
383     * @param item the item to remove
384     * @return {@code true} if the item was removed or {@code false} otherwise
385     */
386    public boolean removeProp(Property item) {
387      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
388      return _props != null && _props.remove(value);
389    }
390
391    public List<Link> getLinks() {
392      return _links;
393    }
394
395    public void setLinks(List<Link> value) {
396      _links = value;
397    }
398
399    /**
400     * Add a new {@link Link} item to the underlying collection.
401     * @param item the item to add
402     * @return {@code true}
403     */
404    public boolean addLink(Link item) {
405      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
406      if (_links == null) {
407        _links = new LinkedList<>();
408      }
409      return _links.add(value);
410    }
411
412    /**
413     * Remove the first matching {@link Link} item from the underlying collection.
414     * @param item the item to remove
415     * @return {@code true} if the item was removed or {@code false} otherwise
416     */
417    public boolean removeLink(Link item) {
418      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
419      return _links != null && _links.remove(value);
420    }
421
422    public List<ResponsibleParty> getResponsibleParties() {
423      return _responsibleParties;
424    }
425
426    public void setResponsibleParties(List<ResponsibleParty> value) {
427      _responsibleParties = value;
428    }
429
430    /**
431     * Add a new {@link ResponsibleParty} item to the underlying collection.
432     * @param item the item to add
433     * @return {@code true}
434     */
435    public boolean addResponsibleParty(ResponsibleParty item) {
436      ResponsibleParty value = ObjectUtils.requireNonNull(item,"item cannot be null");
437      if (_responsibleParties == null) {
438        _responsibleParties = new LinkedList<>();
439      }
440      return _responsibleParties.add(value);
441    }
442
443    /**
444     * Remove the first matching {@link ResponsibleParty} item from the underlying collection.
445     * @param item the item to remove
446     * @return {@code true} if the item was removed or {@code false} otherwise
447     */
448    public boolean removeResponsibleParty(ResponsibleParty item) {
449      ResponsibleParty value = ObjectUtils.requireNonNull(item,"item cannot be null");
450      return _responsibleParties != null && _responsibleParties.remove(value);
451    }
452
453    public MarkupMultiline getRemarks() {
454      return _remarks;
455    }
456
457    public void setRemarks(MarkupMultiline value) {
458      _remarks = value;
459    }
460
461    @Override
462    public String toString() {
463      return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
464    }
465  }
466}