All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mitre.stix.incident_1.Incident Maven / Gradle / Ivy

There is a newer version: 1.2.0.2
Show newest version
/**
 * Copyright (c) 2015, The MITRE Corporation. All rights reserved.
 * See LICENSE for complete terms.
 */

//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2015.06.23 at 10:59:44 AM EDT 
//

package org.mitre.stix.incident_1;

import java.io.StringReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import javax.xml.transform.stream.StreamSource;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
import org.mitre.data_marking.marking_1.MarkingType;
import org.mitre.stix.DocumentUtilities;
import org.mitre.stix.STIXSchema;
import org.mitre.stix.ValidationEventHandler;
import org.mitre.stix.common_1.ConfidenceType;
import org.mitre.stix.common_1.ControlledVocabularyStringType;
import org.mitre.stix.common_1.IdentityType;
import org.mitre.stix.common_1.IncidentBaseType;
import org.mitre.stix.common_1.InformationSourceType;
import org.mitre.stix.common_1.RelatedPackageRefsType;
import org.mitre.stix.common_1.StatementType;
import org.mitre.stix.common_1.StructuredTextType;

/**
 * Incidents are discrete instances of Indicators affecting an organization along with information discovered or decided during an incident response investigation. They consist of data such as time-related information, parties involved, assets affected, impact assessment, related Indicators, related Observables, leveraged TTP, attributed Threat Actors, intended effects, nature of compromise, response Course of Action requested, response Course of Action taken, confidence in characterization, handling guidance, source of the Incident information, log of actions taken, etc.
 * 
 * 

Java class for IncidentType complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="IncidentType">
 *   <complexContent>
 *     <extension base="{http://stix.mitre.org/common-1}IncidentBaseType">
 *       <sequence>
 *         <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="External_ID" type="{http://stix.mitre.org/Incident-1}ExternalIDType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="Time" type="{http://stix.mitre.org/Incident-1}TimeType" minOccurs="0"/>
 *         <element name="Description" type="{http://stix.mitre.org/common-1}StructuredTextType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="Short_Description" type="{http://stix.mitre.org/common-1}StructuredTextType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="Categories" type="{http://stix.mitre.org/Incident-1}CategoriesType" minOccurs="0"/>
 *         <element name="Reporter" type="{http://stix.mitre.org/common-1}InformationSourceType" minOccurs="0"/>
 *         <element name="Responder" type="{http://stix.mitre.org/common-1}InformationSourceType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="Coordinator" type="{http://stix.mitre.org/common-1}InformationSourceType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="Victim" type="{http://stix.mitre.org/common-1}IdentityType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="Affected_Assets" type="{http://stix.mitre.org/Incident-1}AffectedAssetsType" minOccurs="0"/>
 *         <element name="Impact_Assessment" type="{http://stix.mitre.org/Incident-1}ImpactAssessmentType" minOccurs="0"/>
 *         <element name="Status" type="{http://stix.mitre.org/common-1}ControlledVocabularyStringType" minOccurs="0"/>
 *         <element name="Related_Indicators" type="{http://stix.mitre.org/Incident-1}RelatedIndicatorsType" minOccurs="0"/>
 *         <element name="Related_Observables" type="{http://stix.mitre.org/Incident-1}RelatedObservablesType" minOccurs="0"/>
 *         <element name="Leveraged_TTPs" type="{http://stix.mitre.org/Incident-1}LeveragedTTPsType" minOccurs="0"/>
 *         <element name="Attributed_Threat_Actors" type="{http://stix.mitre.org/Incident-1}AttributedThreatActorsType" minOccurs="0"/>
 *         <element name="Intended_Effect" type="{http://stix.mitre.org/common-1}StatementType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="Security_Compromise" type="{http://stix.mitre.org/common-1}ControlledVocabularyStringType" minOccurs="0"/>
 *         <element name="Discovery_Method" type="{http://stix.mitre.org/common-1}ControlledVocabularyStringType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="Related_Incidents" type="{http://stix.mitre.org/Incident-1}RelatedIncidentsType" minOccurs="0"/>
 *         <element name="COA_Requested" type="{http://stix.mitre.org/Incident-1}COARequestedType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="COA_Taken" type="{http://stix.mitre.org/Incident-1}COATakenType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="Confidence" type="{http://stix.mitre.org/common-1}ConfidenceType" minOccurs="0"/>
 *         <element name="Contact" type="{http://stix.mitre.org/common-1}InformationSourceType" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="History" type="{http://stix.mitre.org/Incident-1}HistoryType" minOccurs="0"/>
 *         <element name="Information_Source" type="{http://stix.mitre.org/common-1}InformationSourceType" minOccurs="0"/>
 *         <element name="Handling" type="{http://data-marking.mitre.org/Marking-1}MarkingType" minOccurs="0"/>
 *         <element name="Related_Packages" type="{http://stix.mitre.org/common-1}RelatedPackageRefsType" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="version" type="{http://stix.mitre.org/Incident-1}IncidentVersionType" />
 *       <attribute name="URL" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "IncidentType", propOrder = { "title", "externalIDs", "time", "descriptions", "shortDescriptions", "categories", "reporter", "responders", "coordinators", "victims", "affectedAssets", "impactAssessment", "status", "relatedIndicators", "relatedObservables", "leveragedTTPs", "attributedThreatActors", "intendedEffects", "securityCompromise", "discoveryMethods", "relatedIncidents", "coaRequesteds", "coaTakens", "confidence", "contacts", "history", "informationSource", "handling", "relatedPackages" }) @XmlRootElement(name = "Incident") public class Incident extends IncidentBaseType implements Equals, HashCode, ToString { @XmlElement(name = "Title") protected String title; @XmlElement(name = "External_ID") protected List externalIDs; @XmlElement(name = "Time") protected TimeType time; @XmlElement(name = "Description") protected List descriptions; @XmlElement(name = "Short_Description") protected List shortDescriptions; @XmlElement(name = "Categories") protected CategoriesType categories; @XmlElement(name = "Reporter") protected InformationSourceType reporter; @XmlElement(name = "Responder") protected List responders; @XmlElement(name = "Coordinator") protected List coordinators; @XmlElement(name = "Victim") protected List victims; @XmlElement(name = "Affected_Assets") protected AffectedAssetsType affectedAssets; @XmlElement(name = "Impact_Assessment") protected ImpactAssessmentType impactAssessment; @XmlElement(name = "Status") protected ControlledVocabularyStringType status; @XmlElement(name = "Related_Indicators") protected RelatedIndicatorsType relatedIndicators; @XmlElement(name = "Related_Observables") protected RelatedObservablesType relatedObservables; @XmlElement(name = "Leveraged_TTPs") protected LeveragedTTPsType leveragedTTPs; @XmlElement(name = "Attributed_Threat_Actors") protected AttributedThreatActorsType attributedThreatActors; @XmlElement(name = "Intended_Effect") protected List intendedEffects; @XmlElement(name = "Security_Compromise") protected ControlledVocabularyStringType securityCompromise; @XmlElement(name = "Discovery_Method") protected List discoveryMethods; @XmlElement(name = "Related_Incidents") protected RelatedIncidentsType relatedIncidents; @XmlElement(name = "COA_Requested") protected List coaRequesteds; @XmlElement(name = "COA_Taken") protected List coaTakens; @XmlElement(name = "Confidence") protected ConfidenceType confidence; @XmlElement(name = "Contact") protected List contacts; @XmlElement(name = "History") protected HistoryType history; @XmlElement(name = "Information_Source") protected InformationSourceType informationSource; @XmlElement(name = "Handling") protected MarkingType handling; @XmlElement(name = "Related_Packages") protected RelatedPackageRefsType relatedPackages; @XmlAttribute(name = "version") protected String version; @XmlAttribute(name = "URL") @XmlSchemaType(name = "anySimpleType") protected String url; /** * Default no-arg constructor * */ public Incident() { super(); } /** * Fully-initialising value constructor * */ public Incident(final QName id, final QName idref, final XMLGregorianCalendar timestamp, final String title, final List externalIDs, final TimeType time, final List descriptions, final List shortDescriptions, final CategoriesType categories, final InformationSourceType reporter, final List responders, final List coordinators, final List victims, final AffectedAssetsType affectedAssets, final ImpactAssessmentType impactAssessment, final ControlledVocabularyStringType status, final RelatedIndicatorsType relatedIndicators, final RelatedObservablesType relatedObservables, final LeveragedTTPsType leveragedTTPs, final AttributedThreatActorsType attributedThreatActors, final List intendedEffects, final ControlledVocabularyStringType securityCompromise, final List discoveryMethods, final RelatedIncidentsType relatedIncidents, final List coaRequesteds, final List coaTakens, final ConfidenceType confidence, final List contacts, final HistoryType history, final InformationSourceType informationSource, final MarkingType handling, final RelatedPackageRefsType relatedPackages, final String version, final String url) { super(id, idref, timestamp); this.title = title; this.externalIDs = externalIDs; this.time = time; this.descriptions = descriptions; this.shortDescriptions = shortDescriptions; this.categories = categories; this.reporter = reporter; this.responders = responders; this.coordinators = coordinators; this.victims = victims; this.affectedAssets = affectedAssets; this.impactAssessment = impactAssessment; this.status = status; this.relatedIndicators = relatedIndicators; this.relatedObservables = relatedObservables; this.leveragedTTPs = leveragedTTPs; this.attributedThreatActors = attributedThreatActors; this.intendedEffects = intendedEffects; this.securityCompromise = securityCompromise; this.discoveryMethods = discoveryMethods; this.relatedIncidents = relatedIncidents; this.coaRequesteds = coaRequesteds; this.coaTakens = coaTakens; this.confidence = confidence; this.contacts = contacts; this.history = history; this.informationSource = informationSource; this.handling = handling; this.relatedPackages = relatedPackages; this.version = version; this.url = url; } /** * Gets the value of the title property. * * @return * possible object is * {@link String } * */ public String getTitle() { return title; } /** * Sets the value of the title property. * * @param value * allowed object is * {@link String } * */ public void setTitle(String value) { this.title = value; } /** * Gets the value of the externalIDs property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the externalIDs property. * *

* For example, to add a new item, do as follows: *

	 *    getExternalIDs().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ExternalIDType } * * */ public List getExternalIDs() { if (externalIDs == null) { externalIDs = new ArrayList(); } return this.externalIDs; } /** * Gets the value of the time property. * * @return * possible object is * {@link TimeType } * */ public TimeType getTime() { return time; } /** * Sets the value of the time property. * * @param value * allowed object is * {@link TimeType } * */ public void setTime(TimeType value) { this.time = value; } /** * Gets the value of the descriptions property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the descriptions property. * *

* For example, to add a new item, do as follows: *

	 *    getDescriptions().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link StructuredTextType } * * */ public List getDescriptions() { if (descriptions == null) { descriptions = new ArrayList(); } return this.descriptions; } /** * Gets the value of the shortDescriptions property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the shortDescriptions property. * *

* For example, to add a new item, do as follows: *

	 *    getShortDescriptions().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link StructuredTextType } * * */ public List getShortDescriptions() { if (shortDescriptions == null) { shortDescriptions = new ArrayList(); } return this.shortDescriptions; } /** * Gets the value of the categories property. * * @return * possible object is * {@link CategoriesType } * */ public CategoriesType getCategories() { return categories; } /** * Sets the value of the categories property. * * @param value * allowed object is * {@link CategoriesType } * */ public void setCategories(CategoriesType value) { this.categories = value; } /** * Gets the value of the reporter property. * * @return * possible object is * {@link InformationSourceType } * */ public InformationSourceType getReporter() { return reporter; } /** * Sets the value of the reporter property. * * @param value * allowed object is * {@link InformationSourceType } * */ public void setReporter(InformationSourceType value) { this.reporter = value; } /** * Gets the value of the responders property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the responders property. * *

* For example, to add a new item, do as follows: *

	 *    getResponders().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link InformationSourceType } * * */ public List getResponders() { if (responders == null) { responders = new ArrayList(); } return this.responders; } /** * Gets the value of the coordinators property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the coordinators property. * *

* For example, to add a new item, do as follows: *

	 *    getCoordinators().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link InformationSourceType } * * */ public List getCoordinators() { if (coordinators == null) { coordinators = new ArrayList(); } return this.coordinators; } /** * Gets the value of the victims property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the victims property. * *

* For example, to add a new item, do as follows: *

	 *    getVictims().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link IdentityType } * * */ public List getVictims() { if (victims == null) { victims = new ArrayList(); } return this.victims; } /** * Gets the value of the affectedAssets property. * * @return * possible object is * {@link AffectedAssetsType } * */ public AffectedAssetsType getAffectedAssets() { return affectedAssets; } /** * Sets the value of the affectedAssets property. * * @param value * allowed object is * {@link AffectedAssetsType } * */ public void setAffectedAssets(AffectedAssetsType value) { this.affectedAssets = value; } /** * Gets the value of the impactAssessment property. * * @return * possible object is * {@link ImpactAssessmentType } * */ public ImpactAssessmentType getImpactAssessment() { return impactAssessment; } /** * Sets the value of the impactAssessment property. * * @param value * allowed object is * {@link ImpactAssessmentType } * */ public void setImpactAssessment(ImpactAssessmentType value) { this.impactAssessment = value; } /** * Gets the value of the status property. * * @return * possible object is * {@link ControlledVocabularyStringType } * */ public ControlledVocabularyStringType getStatus() { return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link ControlledVocabularyStringType } * */ public void setStatus(ControlledVocabularyStringType value) { this.status = value; } /** * Gets the value of the relatedIndicators property. * * @return * possible object is * {@link RelatedIndicatorsType } * */ public RelatedIndicatorsType getRelatedIndicators() { return relatedIndicators; } /** * Sets the value of the relatedIndicators property. * * @param value * allowed object is * {@link RelatedIndicatorsType } * */ public void setRelatedIndicators(RelatedIndicatorsType value) { this.relatedIndicators = value; } /** * Gets the value of the relatedObservables property. * * @return * possible object is * {@link RelatedObservablesType } * */ public RelatedObservablesType getRelatedObservables() { return relatedObservables; } /** * Sets the value of the relatedObservables property. * * @param value * allowed object is * {@link RelatedObservablesType } * */ public void setRelatedObservables(RelatedObservablesType value) { this.relatedObservables = value; } /** * Gets the value of the leveragedTTPs property. * * @return * possible object is * {@link LeveragedTTPsType } * */ public LeveragedTTPsType getLeveragedTTPs() { return leveragedTTPs; } /** * Sets the value of the leveragedTTPs property. * * @param value * allowed object is * {@link LeveragedTTPsType } * */ public void setLeveragedTTPs(LeveragedTTPsType value) { this.leveragedTTPs = value; } /** * Gets the value of the attributedThreatActors property. * * @return * possible object is * {@link AttributedThreatActorsType } * */ public AttributedThreatActorsType getAttributedThreatActors() { return attributedThreatActors; } /** * Sets the value of the attributedThreatActors property. * * @param value * allowed object is * {@link AttributedThreatActorsType } * */ public void setAttributedThreatActors(AttributedThreatActorsType value) { this.attributedThreatActors = value; } /** * Gets the value of the intendedEffects property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the intendedEffects property. * *

* For example, to add a new item, do as follows: *

	 *    getIntendedEffects().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link StatementType } * * */ public List getIntendedEffects() { if (intendedEffects == null) { intendedEffects = new ArrayList(); } return this.intendedEffects; } /** * Gets the value of the securityCompromise property. * * @return * possible object is * {@link ControlledVocabularyStringType } * */ public ControlledVocabularyStringType getSecurityCompromise() { return securityCompromise; } /** * Sets the value of the securityCompromise property. * * @param value * allowed object is * {@link ControlledVocabularyStringType } * */ public void setSecurityCompromise(ControlledVocabularyStringType value) { this.securityCompromise = value; } /** * Gets the value of the discoveryMethods property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the discoveryMethods property. * *

* For example, to add a new item, do as follows: *

	 *    getDiscoveryMethods().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ControlledVocabularyStringType } * * */ public List getDiscoveryMethods() { if (discoveryMethods == null) { discoveryMethods = new ArrayList(); } return this.discoveryMethods; } /** * Gets the value of the relatedIncidents property. * * @return * possible object is * {@link RelatedIncidentsType } * */ public RelatedIncidentsType getRelatedIncidents() { return relatedIncidents; } /** * Sets the value of the relatedIncidents property. * * @param value * allowed object is * {@link RelatedIncidentsType } * */ public void setRelatedIncidents(RelatedIncidentsType value) { this.relatedIncidents = value; } /** * Gets the value of the coaRequesteds property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the coaRequesteds property. * *

* For example, to add a new item, do as follows: *

	 *    getCOARequesteds().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link COARequestedType } * * */ public List getCOARequesteds() { if (coaRequesteds == null) { coaRequesteds = new ArrayList(); } return this.coaRequesteds; } /** * Gets the value of the coaTakens property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the coaTakens property. * *

* For example, to add a new item, do as follows: *

	 *    getCOATakens().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link COATakenType } * * */ public List getCOATakens() { if (coaTakens == null) { coaTakens = new ArrayList(); } return this.coaTakens; } /** * Gets the value of the confidence property. * * @return * possible object is * {@link ConfidenceType } * */ public ConfidenceType getConfidence() { return confidence; } /** * Sets the value of the confidence property. * * @param value * allowed object is * {@link ConfidenceType } * */ public void setConfidence(ConfidenceType value) { this.confidence = value; } /** * Gets the value of the contacts property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the contacts property. * *

* For example, to add a new item, do as follows: *

	 *    getContacts().add(newItem);
	 * 
* * *

* Objects of the following type(s) are allowed in the list * {@link InformationSourceType } * * */ public List getContacts() { if (contacts == null) { contacts = new ArrayList(); } return this.contacts; } /** * Gets the value of the history property. * * @return * possible object is * {@link HistoryType } * */ public HistoryType getHistory() { return history; } /** * Sets the value of the history property. * * @param value * allowed object is * {@link HistoryType } * */ public void setHistory(HistoryType value) { this.history = value; } /** * Gets the value of the informationSource property. * * @return * possible object is * {@link InformationSourceType } * */ public InformationSourceType getInformationSource() { return informationSource; } /** * Sets the value of the informationSource property. * * @param value * allowed object is * {@link InformationSourceType } * */ public void setInformationSource(InformationSourceType value) { this.informationSource = value; } /** * Gets the value of the handling property. * * @return * possible object is * {@link MarkingType } * */ public MarkingType getHandling() { return handling; } /** * Sets the value of the handling property. * * @param value * allowed object is * {@link MarkingType } * */ public void setHandling(MarkingType value) { this.handling = value; } /** * Gets the value of the relatedPackages property. * * @return * possible object is * {@link RelatedPackageRefsType } * */ public RelatedPackageRefsType getRelatedPackages() { return relatedPackages; } /** * Sets the value of the relatedPackages property. * * @param value * allowed object is * {@link RelatedPackageRefsType } * */ public void setRelatedPackages(RelatedPackageRefsType value) { this.relatedPackages = value; } /** * Gets the value of the version property. * * @return * possible object is * {@link String } * */ public String getVersion() { return version; } /** * Sets the value of the version property. * * @param value * allowed object is * {@link String } * */ public void setVersion(String value) { this.version = value; } /** * Gets the value of the url property. * * @return * possible object is * {@link String } * */ public String getURL() { return url; } /** * Sets the value of the url property. * * @param value * allowed object is * {@link String } * */ public void setURL(String value) { this.url = value; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Incident)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final Incident that = ((Incident) object); { String lhsTitle; lhsTitle = this.getTitle(); String rhsTitle; rhsTitle = that.getTitle(); if (!strategy.equals( LocatorUtils.property(thisLocator, "title", lhsTitle), LocatorUtils.property(thatLocator, "title", rhsTitle), lhsTitle, rhsTitle)) { return false; } } { List lhsExternalIDs; lhsExternalIDs = (((this.externalIDs != null) && (!this.externalIDs .isEmpty())) ? this.getExternalIDs() : null); List rhsExternalIDs; rhsExternalIDs = (((that.externalIDs != null) && (!that.externalIDs .isEmpty())) ? that.getExternalIDs() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "externalIDs", lhsExternalIDs), LocatorUtils.property( thatLocator, "externalIDs", rhsExternalIDs), lhsExternalIDs, rhsExternalIDs)) { return false; } } { TimeType lhsTime; lhsTime = this.getTime(); TimeType rhsTime; rhsTime = that.getTime(); if (!strategy.equals( LocatorUtils.property(thisLocator, "time", lhsTime), LocatorUtils.property(thatLocator, "time", rhsTime), lhsTime, rhsTime)) { return false; } } { List lhsDescriptions; lhsDescriptions = (((this.descriptions != null) && (!this.descriptions .isEmpty())) ? this.getDescriptions() : null); List rhsDescriptions; rhsDescriptions = (((that.descriptions != null) && (!that.descriptions .isEmpty())) ? that.getDescriptions() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "descriptions", lhsDescriptions), LocatorUtils.property( thatLocator, "descriptions", rhsDescriptions), lhsDescriptions, rhsDescriptions)) { return false; } } { List lhsShortDescriptions; lhsShortDescriptions = (((this.shortDescriptions != null) && (!this.shortDescriptions .isEmpty())) ? this.getShortDescriptions() : null); List rhsShortDescriptions; rhsShortDescriptions = (((that.shortDescriptions != null) && (!that.shortDescriptions .isEmpty())) ? that.getShortDescriptions() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "shortDescriptions", lhsShortDescriptions), LocatorUtils .property(thatLocator, "shortDescriptions", rhsShortDescriptions), lhsShortDescriptions, rhsShortDescriptions)) { return false; } } { CategoriesType lhsCategories; lhsCategories = this.getCategories(); CategoriesType rhsCategories; rhsCategories = that.getCategories(); if (!strategy.equals(LocatorUtils.property(thisLocator, "categories", lhsCategories), LocatorUtils.property( thatLocator, "categories", rhsCategories), lhsCategories, rhsCategories)) { return false; } } { InformationSourceType lhsReporter; lhsReporter = this.getReporter(); InformationSourceType rhsReporter; rhsReporter = that.getReporter(); if (!strategy .equals(LocatorUtils.property(thisLocator, "reporter", lhsReporter), LocatorUtils.property(thatLocator, "reporter", rhsReporter), lhsReporter, rhsReporter)) { return false; } } { List lhsResponders; lhsResponders = (((this.responders != null) && (!this.responders .isEmpty())) ? this.getResponders() : null); List rhsResponders; rhsResponders = (((that.responders != null) && (!that.responders .isEmpty())) ? that.getResponders() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "responders", lhsResponders), LocatorUtils.property( thatLocator, "responders", rhsResponders), lhsResponders, rhsResponders)) { return false; } } { List lhsCoordinators; lhsCoordinators = (((this.coordinators != null) && (!this.coordinators .isEmpty())) ? this.getCoordinators() : null); List rhsCoordinators; rhsCoordinators = (((that.coordinators != null) && (!that.coordinators .isEmpty())) ? that.getCoordinators() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "coordinators", lhsCoordinators), LocatorUtils.property( thatLocator, "coordinators", rhsCoordinators), lhsCoordinators, rhsCoordinators)) { return false; } } { List lhsVictims; lhsVictims = (((this.victims != null) && (!this.victims.isEmpty())) ? this .getVictims() : null); List rhsVictims; rhsVictims = (((that.victims != null) && (!that.victims.isEmpty())) ? that .getVictims() : null); if (!strategy.equals( LocatorUtils.property(thisLocator, "victims", lhsVictims), LocatorUtils.property(thatLocator, "victims", rhsVictims), lhsVictims, rhsVictims)) { return false; } } { AffectedAssetsType lhsAffectedAssets; lhsAffectedAssets = this.getAffectedAssets(); AffectedAssetsType rhsAffectedAssets; rhsAffectedAssets = that.getAffectedAssets(); if (!strategy.equals(LocatorUtils.property(thisLocator, "affectedAssets", lhsAffectedAssets), LocatorUtils.property(thatLocator, "affectedAssets", rhsAffectedAssets), lhsAffectedAssets, rhsAffectedAssets)) { return false; } } { ImpactAssessmentType lhsImpactAssessment; lhsImpactAssessment = this.getImpactAssessment(); ImpactAssessmentType rhsImpactAssessment; rhsImpactAssessment = that.getImpactAssessment(); if (!strategy.equals(LocatorUtils.property(thisLocator, "impactAssessment", lhsImpactAssessment), LocatorUtils .property(thatLocator, "impactAssessment", rhsImpactAssessment), lhsImpactAssessment, rhsImpactAssessment)) { return false; } } { ControlledVocabularyStringType lhsStatus; lhsStatus = this.getStatus(); ControlledVocabularyStringType rhsStatus; rhsStatus = that.getStatus(); if (!strategy.equals( LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus)) { return false; } } { RelatedIndicatorsType lhsRelatedIndicators; lhsRelatedIndicators = this.getRelatedIndicators(); RelatedIndicatorsType rhsRelatedIndicators; rhsRelatedIndicators = that.getRelatedIndicators(); if (!strategy.equals(LocatorUtils.property(thisLocator, "relatedIndicators", lhsRelatedIndicators), LocatorUtils .property(thatLocator, "relatedIndicators", rhsRelatedIndicators), lhsRelatedIndicators, rhsRelatedIndicators)) { return false; } } { RelatedObservablesType lhsRelatedObservables; lhsRelatedObservables = this.getRelatedObservables(); RelatedObservablesType rhsRelatedObservables; rhsRelatedObservables = that.getRelatedObservables(); if (!strategy.equals(LocatorUtils.property(thisLocator, "relatedObservables", lhsRelatedObservables), LocatorUtils .property(thatLocator, "relatedObservables", rhsRelatedObservables), lhsRelatedObservables, rhsRelatedObservables)) { return false; } } { LeveragedTTPsType lhsLeveragedTTPs; lhsLeveragedTTPs = this.getLeveragedTTPs(); LeveragedTTPsType rhsLeveragedTTPs; rhsLeveragedTTPs = that.getLeveragedTTPs(); if (!strategy.equals(LocatorUtils.property(thisLocator, "leveragedTTPs", lhsLeveragedTTPs), LocatorUtils.property( thatLocator, "leveragedTTPs", rhsLeveragedTTPs), lhsLeveragedTTPs, rhsLeveragedTTPs)) { return false; } } { AttributedThreatActorsType lhsAttributedThreatActors; lhsAttributedThreatActors = this.getAttributedThreatActors(); AttributedThreatActorsType rhsAttributedThreatActors; rhsAttributedThreatActors = that.getAttributedThreatActors(); if (!strategy.equals(LocatorUtils.property(thisLocator, "attributedThreatActors", lhsAttributedThreatActors), LocatorUtils .property(thatLocator, "attributedThreatActors", rhsAttributedThreatActors), lhsAttributedThreatActors, rhsAttributedThreatActors)) { return false; } } { List lhsIntendedEffects; lhsIntendedEffects = (((this.intendedEffects != null) && (!this.intendedEffects .isEmpty())) ? this.getIntendedEffects() : null); List rhsIntendedEffects; rhsIntendedEffects = (((that.intendedEffects != null) && (!that.intendedEffects .isEmpty())) ? that.getIntendedEffects() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "intendedEffects", lhsIntendedEffects), LocatorUtils .property(thatLocator, "intendedEffects", rhsIntendedEffects), lhsIntendedEffects, rhsIntendedEffects)) { return false; } } { ControlledVocabularyStringType lhsSecurityCompromise; lhsSecurityCompromise = this.getSecurityCompromise(); ControlledVocabularyStringType rhsSecurityCompromise; rhsSecurityCompromise = that.getSecurityCompromise(); if (!strategy.equals(LocatorUtils.property(thisLocator, "securityCompromise", lhsSecurityCompromise), LocatorUtils .property(thatLocator, "securityCompromise", rhsSecurityCompromise), lhsSecurityCompromise, rhsSecurityCompromise)) { return false; } } { List lhsDiscoveryMethods; lhsDiscoveryMethods = (((this.discoveryMethods != null) && (!this.discoveryMethods .isEmpty())) ? this.getDiscoveryMethods() : null); List rhsDiscoveryMethods; rhsDiscoveryMethods = (((that.discoveryMethods != null) && (!that.discoveryMethods .isEmpty())) ? that.getDiscoveryMethods() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "discoveryMethods", lhsDiscoveryMethods), LocatorUtils .property(thatLocator, "discoveryMethods", rhsDiscoveryMethods), lhsDiscoveryMethods, rhsDiscoveryMethods)) { return false; } } { RelatedIncidentsType lhsRelatedIncidents; lhsRelatedIncidents = this.getRelatedIncidents(); RelatedIncidentsType rhsRelatedIncidents; rhsRelatedIncidents = that.getRelatedIncidents(); if (!strategy.equals(LocatorUtils.property(thisLocator, "relatedIncidents", lhsRelatedIncidents), LocatorUtils .property(thatLocator, "relatedIncidents", rhsRelatedIncidents), lhsRelatedIncidents, rhsRelatedIncidents)) { return false; } } { List lhsCOARequesteds; lhsCOARequesteds = (((this.coaRequesteds != null) && (!this.coaRequesteds .isEmpty())) ? this.getCOARequesteds() : null); List rhsCOARequesteds; rhsCOARequesteds = (((that.coaRequesteds != null) && (!that.coaRequesteds .isEmpty())) ? that.getCOARequesteds() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "coaRequesteds", lhsCOARequesteds), LocatorUtils.property( thatLocator, "coaRequesteds", rhsCOARequesteds), lhsCOARequesteds, rhsCOARequesteds)) { return false; } } { List lhsCOATakens; lhsCOATakens = (((this.coaTakens != null) && (!this.coaTakens .isEmpty())) ? this.getCOATakens() : null); List rhsCOATakens; rhsCOATakens = (((that.coaTakens != null) && (!that.coaTakens .isEmpty())) ? that.getCOATakens() : null); if (!strategy.equals(LocatorUtils.property(thisLocator, "coaTakens", lhsCOATakens), LocatorUtils.property( thatLocator, "coaTakens", rhsCOATakens), lhsCOATakens, rhsCOATakens)) { return false; } } { ConfidenceType lhsConfidence; lhsConfidence = this.getConfidence(); ConfidenceType rhsConfidence; rhsConfidence = that.getConfidence(); if (!strategy.equals(LocatorUtils.property(thisLocator, "confidence", lhsConfidence), LocatorUtils.property( thatLocator, "confidence", rhsConfidence), lhsConfidence, rhsConfidence)) { return false; } } { List lhsContacts; lhsContacts = (((this.contacts != null) && (!this.contacts .isEmpty())) ? this.getContacts() : null); List rhsContacts; rhsContacts = (((that.contacts != null) && (!that.contacts .isEmpty())) ? that.getContacts() : null); if (!strategy .equals(LocatorUtils.property(thisLocator, "contacts", lhsContacts), LocatorUtils.property(thatLocator, "contacts", rhsContacts), lhsContacts, rhsContacts)) { return false; } } { HistoryType lhsHistory; lhsHistory = this.getHistory(); HistoryType rhsHistory; rhsHistory = that.getHistory(); if (!strategy.equals( LocatorUtils.property(thisLocator, "history", lhsHistory), LocatorUtils.property(thatLocator, "history", rhsHistory), lhsHistory, rhsHistory)) { return false; } } { InformationSourceType lhsInformationSource; lhsInformationSource = this.getInformationSource(); InformationSourceType rhsInformationSource; rhsInformationSource = that.getInformationSource(); if (!strategy.equals(LocatorUtils.property(thisLocator, "informationSource", lhsInformationSource), LocatorUtils .property(thatLocator, "informationSource", rhsInformationSource), lhsInformationSource, rhsInformationSource)) { return false; } } { MarkingType lhsHandling; lhsHandling = this.getHandling(); MarkingType rhsHandling; rhsHandling = that.getHandling(); if (!strategy .equals(LocatorUtils.property(thisLocator, "handling", lhsHandling), LocatorUtils.property(thatLocator, "handling", rhsHandling), lhsHandling, rhsHandling)) { return false; } } { RelatedPackageRefsType lhsRelatedPackages; lhsRelatedPackages = this.getRelatedPackages(); RelatedPackageRefsType rhsRelatedPackages; rhsRelatedPackages = that.getRelatedPackages(); if (!strategy.equals(LocatorUtils.property(thisLocator, "relatedPackages", lhsRelatedPackages), LocatorUtils .property(thatLocator, "relatedPackages", rhsRelatedPackages), lhsRelatedPackages, rhsRelatedPackages)) { return false; } } { String lhsVersion; lhsVersion = this.getVersion(); String rhsVersion; rhsVersion = that.getVersion(); if (!strategy.equals( LocatorUtils.property(thisLocator, "version", lhsVersion), LocatorUtils.property(thatLocator, "version", rhsVersion), lhsVersion, rhsVersion)) { return false; } } { String lhsURL; lhsURL = this.getURL(); String rhsURL; rhsURL = that.getURL(); if (!strategy.equals( LocatorUtils.property(thisLocator, "url", lhsURL), LocatorUtils.property(thatLocator, "url", rhsURL), lhsURL, rhsURL)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { String theTitle; theTitle = this.getTitle(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "title", theTitle), currentHashCode, theTitle); } { List theExternalIDs; theExternalIDs = (((this.externalIDs != null) && (!this.externalIDs .isEmpty())) ? this.getExternalIDs() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "externalIDs", theExternalIDs), currentHashCode, theExternalIDs); } { TimeType theTime; theTime = this.getTime(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "time", theTime), currentHashCode, theTime); } { List theDescriptions; theDescriptions = (((this.descriptions != null) && (!this.descriptions .isEmpty())) ? this.getDescriptions() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "descriptions", theDescriptions), currentHashCode, theDescriptions); } { List theShortDescriptions; theShortDescriptions = (((this.shortDescriptions != null) && (!this.shortDescriptions .isEmpty())) ? this.getShortDescriptions() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "shortDescriptions", theShortDescriptions), currentHashCode, theShortDescriptions); } { CategoriesType theCategories; theCategories = this.getCategories(); currentHashCode = strategy .hashCode(LocatorUtils.property(locator, "categories", theCategories), currentHashCode, theCategories); } { InformationSourceType theReporter; theReporter = this.getReporter(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "reporter", theReporter), currentHashCode, theReporter); } { List theResponders; theResponders = (((this.responders != null) && (!this.responders .isEmpty())) ? this.getResponders() : null); currentHashCode = strategy .hashCode(LocatorUtils.property(locator, "responders", theResponders), currentHashCode, theResponders); } { List theCoordinators; theCoordinators = (((this.coordinators != null) && (!this.coordinators .isEmpty())) ? this.getCoordinators() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "coordinators", theCoordinators), currentHashCode, theCoordinators); } { List theVictims; theVictims = (((this.victims != null) && (!this.victims.isEmpty())) ? this .getVictims() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "victims", theVictims), currentHashCode, theVictims); } { AffectedAssetsType theAffectedAssets; theAffectedAssets = this.getAffectedAssets(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "affectedAssets", theAffectedAssets), currentHashCode, theAffectedAssets); } { ImpactAssessmentType theImpactAssessment; theImpactAssessment = this.getImpactAssessment(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "impactAssessment", theImpactAssessment), currentHashCode, theImpactAssessment); } { ControlledVocabularyStringType theStatus; theStatus = this.getStatus(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus); } { RelatedIndicatorsType theRelatedIndicators; theRelatedIndicators = this.getRelatedIndicators(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "relatedIndicators", theRelatedIndicators), currentHashCode, theRelatedIndicators); } { RelatedObservablesType theRelatedObservables; theRelatedObservables = this.getRelatedObservables(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "relatedObservables", theRelatedObservables), currentHashCode, theRelatedObservables); } { LeveragedTTPsType theLeveragedTTPs; theLeveragedTTPs = this.getLeveragedTTPs(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "leveragedTTPs", theLeveragedTTPs), currentHashCode, theLeveragedTTPs); } { AttributedThreatActorsType theAttributedThreatActors; theAttributedThreatActors = this.getAttributedThreatActors(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "attributedThreatActors", theAttributedThreatActors), currentHashCode, theAttributedThreatActors); } { List theIntendedEffects; theIntendedEffects = (((this.intendedEffects != null) && (!this.intendedEffects .isEmpty())) ? this.getIntendedEffects() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "intendedEffects", theIntendedEffects), currentHashCode, theIntendedEffects); } { ControlledVocabularyStringType theSecurityCompromise; theSecurityCompromise = this.getSecurityCompromise(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "securityCompromise", theSecurityCompromise), currentHashCode, theSecurityCompromise); } { List theDiscoveryMethods; theDiscoveryMethods = (((this.discoveryMethods != null) && (!this.discoveryMethods .isEmpty())) ? this.getDiscoveryMethods() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "discoveryMethods", theDiscoveryMethods), currentHashCode, theDiscoveryMethods); } { RelatedIncidentsType theRelatedIncidents; theRelatedIncidents = this.getRelatedIncidents(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "relatedIncidents", theRelatedIncidents), currentHashCode, theRelatedIncidents); } { List theCOARequesteds; theCOARequesteds = (((this.coaRequesteds != null) && (!this.coaRequesteds .isEmpty())) ? this.getCOARequesteds() : null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "coaRequesteds", theCOARequesteds), currentHashCode, theCOARequesteds); } { List theCOATakens; theCOATakens = (((this.coaTakens != null) && (!this.coaTakens .isEmpty())) ? this.getCOATakens() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "coaTakens", theCOATakens), currentHashCode, theCOATakens); } { ConfidenceType theConfidence; theConfidence = this.getConfidence(); currentHashCode = strategy .hashCode(LocatorUtils.property(locator, "confidence", theConfidence), currentHashCode, theConfidence); } { List theContacts; theContacts = (((this.contacts != null) && (!this.contacts .isEmpty())) ? this.getContacts() : null); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "contacts", theContacts), currentHashCode, theContacts); } { HistoryType theHistory; theHistory = this.getHistory(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "history", theHistory), currentHashCode, theHistory); } { InformationSourceType theInformationSource; theInformationSource = this.getInformationSource(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "informationSource", theInformationSource), currentHashCode, theInformationSource); } { MarkingType theHandling; theHandling = this.getHandling(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "handling", theHandling), currentHashCode, theHandling); } { RelatedPackageRefsType theRelatedPackages; theRelatedPackages = this.getRelatedPackages(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "relatedPackages", theRelatedPackages), currentHashCode, theRelatedPackages); } { String theVersion; theVersion = this.getVersion(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "version", theVersion), currentHashCode, theVersion); } { String theURL; theURL = this.getURL(); currentHashCode = strategy.hashCode( LocatorUtils.property(locator, "url", theURL), currentHashCode, theURL); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public Incident withTitle(String value) { setTitle(value); return this; } public Incident withExternalIDs(ExternalIDType... values) { if (values != null) { for (ExternalIDType value : values) { getExternalIDs().add(value); } } return this; } public Incident withExternalIDs(Collection values) { if (values != null) { getExternalIDs().addAll(values); } return this; } public Incident withTime(TimeType value) { setTime(value); return this; } public Incident withDescriptions(StructuredTextType... values) { if (values != null) { for (StructuredTextType value : values) { getDescriptions().add(value); } } return this; } public Incident withDescriptions(Collection values) { if (values != null) { getDescriptions().addAll(values); } return this; } public Incident withShortDescriptions(StructuredTextType... values) { if (values != null) { for (StructuredTextType value : values) { getShortDescriptions().add(value); } } return this; } public Incident withShortDescriptions(Collection values) { if (values != null) { getShortDescriptions().addAll(values); } return this; } public Incident withCategories(CategoriesType value) { setCategories(value); return this; } public Incident withReporter(InformationSourceType value) { setReporter(value); return this; } public Incident withResponders(InformationSourceType... values) { if (values != null) { for (InformationSourceType value : values) { getResponders().add(value); } } return this; } public Incident withResponders(Collection values) { if (values != null) { getResponders().addAll(values); } return this; } public Incident withCoordinators(InformationSourceType... values) { if (values != null) { for (InformationSourceType value : values) { getCoordinators().add(value); } } return this; } public Incident withCoordinators(Collection values) { if (values != null) { getCoordinators().addAll(values); } return this; } public Incident withVictims(IdentityType... values) { if (values != null) { for (IdentityType value : values) { getVictims().add(value); } } return this; } public Incident withVictims(Collection values) { if (values != null) { getVictims().addAll(values); } return this; } public Incident withAffectedAssets(AffectedAssetsType value) { setAffectedAssets(value); return this; } public Incident withImpactAssessment(ImpactAssessmentType value) { setImpactAssessment(value); return this; } public Incident withStatus(ControlledVocabularyStringType value) { setStatus(value); return this; } public Incident withRelatedIndicators(RelatedIndicatorsType value) { setRelatedIndicators(value); return this; } public Incident withRelatedObservables(RelatedObservablesType value) { setRelatedObservables(value); return this; } public Incident withLeveragedTTPs(LeveragedTTPsType value) { setLeveragedTTPs(value); return this; } public Incident withAttributedThreatActors(AttributedThreatActorsType value) { setAttributedThreatActors(value); return this; } public Incident withIntendedEffects(StatementType... values) { if (values != null) { for (StatementType value : values) { getIntendedEffects().add(value); } } return this; } public Incident withIntendedEffects(Collection values) { if (values != null) { getIntendedEffects().addAll(values); } return this; } public Incident withSecurityCompromise(ControlledVocabularyStringType value) { setSecurityCompromise(value); return this; } public Incident withDiscoveryMethods( ControlledVocabularyStringType... values) { if (values != null) { for (ControlledVocabularyStringType value : values) { getDiscoveryMethods().add(value); } } return this; } public Incident withDiscoveryMethods( Collection values) { if (values != null) { getDiscoveryMethods().addAll(values); } return this; } public Incident withRelatedIncidents(RelatedIncidentsType value) { setRelatedIncidents(value); return this; } public Incident withCOARequesteds(COARequestedType... values) { if (values != null) { for (COARequestedType value : values) { getCOARequesteds().add(value); } } return this; } public Incident withCOARequesteds(Collection values) { if (values != null) { getCOARequesteds().addAll(values); } return this; } public Incident withCOATakens(COATakenType... values) { if (values != null) { for (COATakenType value : values) { getCOATakens().add(value); } } return this; } public Incident withCOATakens(Collection values) { if (values != null) { getCOATakens().addAll(values); } return this; } public Incident withConfidence(ConfidenceType value) { setConfidence(value); return this; } public Incident withContacts(InformationSourceType... values) { if (values != null) { for (InformationSourceType value : values) { getContacts().add(value); } } return this; } public Incident withContacts(Collection values) { if (values != null) { getContacts().addAll(values); } return this; } public Incident withHistory(HistoryType value) { setHistory(value); return this; } public Incident withInformationSource(InformationSourceType value) { setInformationSource(value); return this; } public Incident withHandling(MarkingType value) { setHandling(value); return this; } public Incident withRelatedPackages(RelatedPackageRefsType value) { setRelatedPackages(value); return this; } public Incident withVersion(String value) { setVersion(value); return this; } public Incident withURL(String value) { setURL(value); return this; } @Override public Incident withId(QName value) { setId(value); return this; } @Override public Incident withIdref(QName value) { setIdref(value); return this; } @Override public Incident withTimestamp(XMLGregorianCalendar value) { setTimestamp(value); return this; } public String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { String theTitle; theTitle = this.getTitle(); strategy.appendField(locator, this, "title", buffer, theTitle); } { List theExternalIDs; theExternalIDs = (((this.externalIDs != null) && (!this.externalIDs .isEmpty())) ? this.getExternalIDs() : null); strategy.appendField(locator, this, "externalIDs", buffer, theExternalIDs); } { TimeType theTime; theTime = this.getTime(); strategy.appendField(locator, this, "time", buffer, theTime); } { List theDescriptions; theDescriptions = (((this.descriptions != null) && (!this.descriptions .isEmpty())) ? this.getDescriptions() : null); strategy.appendField(locator, this, "descriptions", buffer, theDescriptions); } { List theShortDescriptions; theShortDescriptions = (((this.shortDescriptions != null) && (!this.shortDescriptions .isEmpty())) ? this.getShortDescriptions() : null); strategy.appendField(locator, this, "shortDescriptions", buffer, theShortDescriptions); } { CategoriesType theCategories; theCategories = this.getCategories(); strategy.appendField(locator, this, "categories", buffer, theCategories); } { InformationSourceType theReporter; theReporter = this.getReporter(); strategy.appendField(locator, this, "reporter", buffer, theReporter); } { List theResponders; theResponders = (((this.responders != null) && (!this.responders .isEmpty())) ? this.getResponders() : null); strategy.appendField(locator, this, "responders", buffer, theResponders); } { List theCoordinators; theCoordinators = (((this.coordinators != null) && (!this.coordinators .isEmpty())) ? this.getCoordinators() : null); strategy.appendField(locator, this, "coordinators", buffer, theCoordinators); } { List theVictims; theVictims = (((this.victims != null) && (!this.victims.isEmpty())) ? this .getVictims() : null); strategy.appendField(locator, this, "victims", buffer, theVictims); } { AffectedAssetsType theAffectedAssets; theAffectedAssets = this.getAffectedAssets(); strategy.appendField(locator, this, "affectedAssets", buffer, theAffectedAssets); } { ImpactAssessmentType theImpactAssessment; theImpactAssessment = this.getImpactAssessment(); strategy.appendField(locator, this, "impactAssessment", buffer, theImpactAssessment); } { ControlledVocabularyStringType theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus); } { RelatedIndicatorsType theRelatedIndicators; theRelatedIndicators = this.getRelatedIndicators(); strategy.appendField(locator, this, "relatedIndicators", buffer, theRelatedIndicators); } { RelatedObservablesType theRelatedObservables; theRelatedObservables = this.getRelatedObservables(); strategy.appendField(locator, this, "relatedObservables", buffer, theRelatedObservables); } { LeveragedTTPsType theLeveragedTTPs; theLeveragedTTPs = this.getLeveragedTTPs(); strategy.appendField(locator, this, "leveragedTTPs", buffer, theLeveragedTTPs); } { AttributedThreatActorsType theAttributedThreatActors; theAttributedThreatActors = this.getAttributedThreatActors(); strategy.appendField(locator, this, "attributedThreatActors", buffer, theAttributedThreatActors); } { List theIntendedEffects; theIntendedEffects = (((this.intendedEffects != null) && (!this.intendedEffects .isEmpty())) ? this.getIntendedEffects() : null); strategy.appendField(locator, this, "intendedEffects", buffer, theIntendedEffects); } { ControlledVocabularyStringType theSecurityCompromise; theSecurityCompromise = this.getSecurityCompromise(); strategy.appendField(locator, this, "securityCompromise", buffer, theSecurityCompromise); } { List theDiscoveryMethods; theDiscoveryMethods = (((this.discoveryMethods != null) && (!this.discoveryMethods .isEmpty())) ? this.getDiscoveryMethods() : null); strategy.appendField(locator, this, "discoveryMethods", buffer, theDiscoveryMethods); } { RelatedIncidentsType theRelatedIncidents; theRelatedIncidents = this.getRelatedIncidents(); strategy.appendField(locator, this, "relatedIncidents", buffer, theRelatedIncidents); } { List theCOARequesteds; theCOARequesteds = (((this.coaRequesteds != null) && (!this.coaRequesteds .isEmpty())) ? this.getCOARequesteds() : null); strategy.appendField(locator, this, "coaRequesteds", buffer, theCOARequesteds); } { List theCOATakens; theCOATakens = (((this.coaTakens != null) && (!this.coaTakens .isEmpty())) ? this.getCOATakens() : null); strategy.appendField(locator, this, "coaTakens", buffer, theCOATakens); } { ConfidenceType theConfidence; theConfidence = this.getConfidence(); strategy.appendField(locator, this, "confidence", buffer, theConfidence); } { List theContacts; theContacts = (((this.contacts != null) && (!this.contacts .isEmpty())) ? this.getContacts() : null); strategy.appendField(locator, this, "contacts", buffer, theContacts); } { HistoryType theHistory; theHistory = this.getHistory(); strategy.appendField(locator, this, "history", buffer, theHistory); } { InformationSourceType theInformationSource; theInformationSource = this.getInformationSource(); strategy.appendField(locator, this, "informationSource", buffer, theInformationSource); } { MarkingType theHandling; theHandling = this.getHandling(); strategy.appendField(locator, this, "handling", buffer, theHandling); } { RelatedPackageRefsType theRelatedPackages; theRelatedPackages = this.getRelatedPackages(); strategy.appendField(locator, this, "relatedPackages", buffer, theRelatedPackages); } { String theVersion; theVersion = this.getVersion(); strategy.appendField(locator, this, "version", buffer, theVersion); } { String theURL; theURL = this.getURL(); strategy.appendField(locator, this, "url", buffer, theURL); } return buffer; } /** * Returns A Document representation of this instance that is not formatted. * * @return The Document representation for this instance. */ public org.w3c.dom.Document toDocument() { return toDocument(false); } /** * Returns A Document representation for this instance. * * @param prettyPrint * True for pretty print, otherwise false * * @return The Document representation for this instance. */ public org.w3c.dom.Document toDocument(boolean prettyPrint) { return DocumentUtilities.toDocument(toJAXBElement(), prettyPrint); } /** * Returns JAXBElement for this instance. * * @return The JAXBElement for this instance. */ @SuppressWarnings({ "rawtypes", "unchecked" }) public JAXBElement toJAXBElement() { QName qualifiedName = STIXSchema.getQualifiedName(this); return new JAXBElement(qualifiedName, Incident.class, this); } /** * Returns String representation of this instance that is not formatted. * * @return The String containing the XML mark-up. */ public String toXMLString() { return toXMLString(false); } /** * Returns XML String for JAXB Document Object Model object. * * @param prettyPrint * True for pretty print, otherwise false * * @return The String containing the XML mark-up. */ public String toXMLString(boolean prettyPrint) { return DocumentUtilities.toXMLString(toDocument(), prettyPrint); } /** * Creates Incident instance for XML String * * @param text * XML String for the document * @return The Incident instance for the passed XML String */ public static Incident fromXMLString(String text) { JAXBContext jaxbContext; try { jaxbContext = JAXBContext.newInstance(Incident.class.getPackage() .getName()); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); unmarshaller.setSchema(STIXSchema.getInstance().getSchema()); unmarshaller.setEventHandler(new ValidationEventHandler()); StreamSource streamSource = new StreamSource(new StringReader(text)); return (Incident) unmarshaller.unmarshal(streamSource); } catch (JAXBException e) { throw new RuntimeException(e); } } /** * Validates the XML representation of this Incident instance * Returning true indicating a successful validation, false if not. * * @return boolean */ public boolean validate() { return STIXSchema.getInstance().validate(toXMLString()); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy