org.mitre.capec.capec_2.View Maven / Gradle / Ivy
Show all versions of stix Show documentation
/**
* 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.07.01 at 03:30:29 PM EDT
//
package org.mitre.capec.capec_2;
import java.io.StringReader;
import java.math.BigInteger;
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.XmlType;
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.stix.DocumentUtilities;
import org.mitre.stix.STIXSchema;
import org.mitre.stix.ValidationEventHandler;
import org.xml.sax.SAXException;
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <group ref="{http://capec.mitre.org/capec-2}View_Attributes"/>
* <attribute name="ID" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
* <attribute name="Name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="Status" use="required" type="{http://capec.mitre.org/capec-2}Status_Type" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "viewStructure", "viewObjective",
"viewAudience", "relationships", "relationshipNotes",
"maintenanceNotes", "otherNotes", "alternateTerms", "researchGaps",
"references", "viewFilter", "contentHistory" })
@XmlRootElement(name = "View")
public class View implements Equals, HashCode, ToString {
@XmlElement(name = "View_Structure", required = true)
protected String viewStructure;
@XmlElement(name = "View_Objective", required = true)
protected StructuredTextType viewObjective;
@XmlElement(name = "View_Audience")
protected View.ViewAudience viewAudience;
@XmlElement(name = "Relationships")
protected Relationships relationships;
@XmlElement(name = "Relationship_Notes")
protected RelationshipNotes relationshipNotes;
@XmlElement(name = "Maintenance_Notes")
protected MaintenanceNotes maintenanceNotes;
@XmlElement(name = "Other_Notes")
protected OtherNotes otherNotes;
@XmlElement(name = "Alternate_Terms")
protected AlternateTerms alternateTerms;
@XmlElement(name = "Research_Gaps")
protected ResearchGaps researchGaps;
@XmlElement(name = "References")
protected ReferenceListType references;
@XmlElement(name = "View_Filter")
protected String viewFilter;
@XmlElement(name = "Content_History")
protected ContentHistory contentHistory;
@XmlAttribute(name = "ID", required = true)
protected BigInteger id;
@XmlAttribute(name = "Name", required = true)
protected String name;
@XmlAttribute(name = "Status", required = true)
protected StatusType status;
/**
* Default no-arg constructor
*
*/
public View() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public View(final String viewStructure,
final StructuredTextType viewObjective,
final View.ViewAudience viewAudience,
final Relationships relationships,
final RelationshipNotes relationshipNotes,
final MaintenanceNotes maintenanceNotes,
final OtherNotes otherNotes, final AlternateTerms alternateTerms,
final ResearchGaps researchGaps,
final ReferenceListType references, final String viewFilter,
final ContentHistory contentHistory, final BigInteger id,
final String name, final StatusType status) {
this.viewStructure = viewStructure;
this.viewObjective = viewObjective;
this.viewAudience = viewAudience;
this.relationships = relationships;
this.relationshipNotes = relationshipNotes;
this.maintenanceNotes = maintenanceNotes;
this.otherNotes = otherNotes;
this.alternateTerms = alternateTerms;
this.researchGaps = researchGaps;
this.references = references;
this.viewFilter = viewFilter;
this.contentHistory = contentHistory;
this.id = id;
this.name = name;
this.status = status;
}
/**
* Gets the value of the viewStructure property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getViewStructure() {
return viewStructure;
}
/**
* Sets the value of the viewStructure property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setViewStructure(String value) {
this.viewStructure = value;
}
/**
* Gets the value of the viewObjective property.
*
* @return
* possible object is
* {@link StructuredTextType }
*
*/
public StructuredTextType getViewObjective() {
return viewObjective;
}
/**
* Sets the value of the viewObjective property.
*
* @param value
* allowed object is
* {@link StructuredTextType }
*
*/
public void setViewObjective(StructuredTextType value) {
this.viewObjective = value;
}
/**
* Gets the value of the viewAudience property.
*
* @return
* possible object is
* {@link View.ViewAudience }
*
*/
public View.ViewAudience getViewAudience() {
return viewAudience;
}
/**
* Sets the value of the viewAudience property.
*
* @param value
* allowed object is
* {@link View.ViewAudience }
*
*/
public void setViewAudience(View.ViewAudience value) {
this.viewAudience = value;
}
/**
* The Relationships structure contains one or more Relationship
* elements, each of which identifies an association between this structure,
* whether it is a Attack Pattern, Category, or Compound_Element and another
* structure.
*
* @return
* possible object is
* {@link Relationships }
*
*/
public Relationships getRelationships() {
return relationships;
}
/**
* Sets the value of the relationships property.
*
* @param value
* allowed object is
* {@link Relationships }
*
*/
public void setRelationships(Relationships value) {
this.relationships = value;
}
/**
* This structure houses one or more Relationship_Note elements,
* which each contain details regarding the relationships between CAPEC
* entries.
*
* @return
* possible object is
* {@link RelationshipNotes }
*
*/
public RelationshipNotes getRelationshipNotes() {
return relationshipNotes;
}
/**
* Sets the value of the relationshipNotes property.
*
* @param value
* allowed object is
* {@link RelationshipNotes }
*
*/
public void setRelationshipNotes(RelationshipNotes value) {
this.relationshipNotes = value;
}
/**
* This element contains one or more Maintenance_Note elements
* which each contain significant maintenance tasks within this entry that
* still need to be addressed, such as clarifying the concepts involved or
* improving relationships. It should be filled out in any entry that is still
* undergoing significant review by the CAPEC team.
*
* @return
* possible object is
* {@link MaintenanceNotes }
*
*/
public MaintenanceNotes getMaintenanceNotes() {
return maintenanceNotes;
}
/**
* Sets the value of the maintenanceNotes property.
*
* @param value
* allowed object is
* {@link MaintenanceNotes }
*
*/
public void setMaintenanceNotes(MaintenanceNotes value) {
this.maintenanceNotes = value;
}
/**
* This element contains one or more Note elements, each of which
* provide any additional notes or comments that cannot be captured using other
* elements. New elements might be defined in the future to contain this
* information. It should be filled out where needed.
*
* @return
* possible object is
* {@link OtherNotes }
*
*/
public OtherNotes getOtherNotes() {
return otherNotes;
}
/**
* Sets the value of the otherNotes property.
*
* @param value
* allowed object is
* {@link OtherNotes }
*
*/
public void setOtherNotes(OtherNotes value) {
this.otherNotes = value;
}
/**
* This element contains one or more Alternate_Term elements,
* each of which contains other names used to describe this attack pattern.
*
*
* @return
* possible object is
* {@link AlternateTerms }
*
*/
public AlternateTerms getAlternateTerms() {
return alternateTerms;
}
/**
* Sets the value of the alternateTerms property.
*
* @param value
* allowed object is
* {@link AlternateTerms }
*
*/
public void setAlternateTerms(AlternateTerms value) {
this.alternateTerms = value;
}
/**
* This structure contains one or more Research gap elements,
* each of which identifies potential opportunities for the vulnerability
* research community to conduct further exploration of issues related to this
* attack pattern. It is intended to highlight parts of CAPEC that have not
* received sufficient attention from researchers. This should be filled out
* where appropriate for attack patterns and categories.
*
* @return
* possible object is
* {@link ResearchGaps }
*
*/
public ResearchGaps getResearchGaps() {
return researchGaps;
}
/**
* Sets the value of the researchGaps property.
*
* @param value
* allowed object is
* {@link ResearchGaps }
*
*/
public void setResearchGaps(ResearchGaps value) {
this.researchGaps = value;
}
/**
* Gets the value of the references property.
*
* @return
* possible object is
* {@link ReferenceListType }
*
*/
public ReferenceListType getReferences() {
return references;
}
/**
* Sets the value of the references property.
*
* @param value
* allowed object is
* {@link ReferenceListType }
*
*/
public void setReferences(ReferenceListType value) {
this.references = value;
}
/**
* Gets the value of the viewFilter property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getViewFilter() {
return viewFilter;
}
/**
* Sets the value of the viewFilter property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setViewFilter(String value) {
this.viewFilter = value;
}
/**
* This element is used to keep track of the author of the attack
* pattern entry and anyone who has made modifications to the content. This
* provides a means of contacting the authors and modifiers for clarifying
* ambiguities, merging overlapping contributions, etc. This should be filled
* out for all entries.
*
* @return
* possible object is
* {@link ContentHistory }
*
*/
public ContentHistory getContentHistory() {
return contentHistory;
}
/**
* Sets the value of the contentHistory property.
*
* @param value
* allowed object is
* {@link ContentHistory }
*
*/
public void setContentHistory(ContentHistory value) {
this.contentHistory = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getID() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setID(BigInteger value) {
this.id = value;
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link StatusType }
*
*/
public StatusType getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link StatusType }
*
*/
public void setStatus(StatusType value) {
this.status = value;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator,
Object object, EqualsStrategy strategy) {
if (!(object instanceof View)) {
return false;
}
if (this == object) {
return true;
}
final View that = ((View) object);
{
String lhsViewStructure;
lhsViewStructure = this.getViewStructure();
String rhsViewStructure;
rhsViewStructure = that.getViewStructure();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"viewStructure", lhsViewStructure), LocatorUtils.property(
thatLocator, "viewStructure", rhsViewStructure),
lhsViewStructure, rhsViewStructure)) {
return false;
}
}
{
StructuredTextType lhsViewObjective;
lhsViewObjective = this.getViewObjective();
StructuredTextType rhsViewObjective;
rhsViewObjective = that.getViewObjective();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"viewObjective", lhsViewObjective), LocatorUtils.property(
thatLocator, "viewObjective", rhsViewObjective),
lhsViewObjective, rhsViewObjective)) {
return false;
}
}
{
View.ViewAudience lhsViewAudience;
lhsViewAudience = this.getViewAudience();
View.ViewAudience rhsViewAudience;
rhsViewAudience = that.getViewAudience();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"viewAudience", lhsViewAudience), LocatorUtils.property(
thatLocator, "viewAudience", rhsViewAudience),
lhsViewAudience, rhsViewAudience)) {
return false;
}
}
{
Relationships lhsRelationships;
lhsRelationships = this.getRelationships();
Relationships rhsRelationships;
rhsRelationships = that.getRelationships();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"relationships", lhsRelationships), LocatorUtils.property(
thatLocator, "relationships", rhsRelationships),
lhsRelationships, rhsRelationships)) {
return false;
}
}
{
RelationshipNotes lhsRelationshipNotes;
lhsRelationshipNotes = this.getRelationshipNotes();
RelationshipNotes rhsRelationshipNotes;
rhsRelationshipNotes = that.getRelationshipNotes();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"relationshipNotes", lhsRelationshipNotes), LocatorUtils
.property(thatLocator, "relationshipNotes",
rhsRelationshipNotes), lhsRelationshipNotes,
rhsRelationshipNotes)) {
return false;
}
}
{
MaintenanceNotes lhsMaintenanceNotes;
lhsMaintenanceNotes = this.getMaintenanceNotes();
MaintenanceNotes rhsMaintenanceNotes;
rhsMaintenanceNotes = that.getMaintenanceNotes();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"maintenanceNotes", lhsMaintenanceNotes), LocatorUtils
.property(thatLocator, "maintenanceNotes",
rhsMaintenanceNotes), lhsMaintenanceNotes,
rhsMaintenanceNotes)) {
return false;
}
}
{
OtherNotes lhsOtherNotes;
lhsOtherNotes = this.getOtherNotes();
OtherNotes rhsOtherNotes;
rhsOtherNotes = that.getOtherNotes();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"otherNotes", lhsOtherNotes), LocatorUtils.property(
thatLocator, "otherNotes", rhsOtherNotes), lhsOtherNotes,
rhsOtherNotes)) {
return false;
}
}
{
AlternateTerms lhsAlternateTerms;
lhsAlternateTerms = this.getAlternateTerms();
AlternateTerms rhsAlternateTerms;
rhsAlternateTerms = that.getAlternateTerms();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"alternateTerms", lhsAlternateTerms),
LocatorUtils.property(thatLocator, "alternateTerms",
rhsAlternateTerms), lhsAlternateTerms,
rhsAlternateTerms)) {
return false;
}
}
{
ResearchGaps lhsResearchGaps;
lhsResearchGaps = this.getResearchGaps();
ResearchGaps rhsResearchGaps;
rhsResearchGaps = that.getResearchGaps();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"researchGaps", lhsResearchGaps), LocatorUtils.property(
thatLocator, "researchGaps", rhsResearchGaps),
lhsResearchGaps, rhsResearchGaps)) {
return false;
}
}
{
ReferenceListType lhsReferences;
lhsReferences = this.getReferences();
ReferenceListType rhsReferences;
rhsReferences = that.getReferences();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"references", lhsReferences), LocatorUtils.property(
thatLocator, "references", rhsReferences), lhsReferences,
rhsReferences)) {
return false;
}
}
{
String lhsViewFilter;
lhsViewFilter = this.getViewFilter();
String rhsViewFilter;
rhsViewFilter = that.getViewFilter();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"viewFilter", lhsViewFilter), LocatorUtils.property(
thatLocator, "viewFilter", rhsViewFilter), lhsViewFilter,
rhsViewFilter)) {
return false;
}
}
{
ContentHistory lhsContentHistory;
lhsContentHistory = this.getContentHistory();
ContentHistory rhsContentHistory;
rhsContentHistory = that.getContentHistory();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"contentHistory", lhsContentHistory),
LocatorUtils.property(thatLocator, "contentHistory",
rhsContentHistory), lhsContentHistory,
rhsContentHistory)) {
return false;
}
}
{
BigInteger lhsID;
lhsID = this.getID();
BigInteger rhsID;
rhsID = that.getID();
if (!strategy.equals(
LocatorUtils.property(thisLocator, "id", lhsID),
LocatorUtils.property(thatLocator, "id", rhsID), lhsID,
rhsID)) {
return false;
}
}
{
String lhsName;
lhsName = this.getName();
String rhsName;
rhsName = that.getName();
if (!strategy.equals(
LocatorUtils.property(thisLocator, "name", lhsName),
LocatorUtils.property(thatLocator, "name", rhsName),
lhsName, rhsName)) {
return false;
}
}
{
StatusType lhsStatus;
lhsStatus = this.getStatus();
StatusType rhsStatus;
rhsStatus = that.getStatus();
if (!strategy.equals(
LocatorUtils.property(thisLocator, "status", lhsStatus),
LocatorUtils.property(thatLocator, "status", rhsStatus),
lhsStatus, rhsStatus)) {
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 = 1;
{
String theViewStructure;
theViewStructure = this.getViewStructure();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"viewStructure", theViewStructure), currentHashCode,
theViewStructure);
}
{
StructuredTextType theViewObjective;
theViewObjective = this.getViewObjective();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"viewObjective", theViewObjective), currentHashCode,
theViewObjective);
}
{
View.ViewAudience theViewAudience;
theViewAudience = this.getViewAudience();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"viewAudience", theViewAudience), currentHashCode,
theViewAudience);
}
{
Relationships theRelationships;
theRelationships = this.getRelationships();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"relationships", theRelationships), currentHashCode,
theRelationships);
}
{
RelationshipNotes theRelationshipNotes;
theRelationshipNotes = this.getRelationshipNotes();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"relationshipNotes", theRelationshipNotes),
currentHashCode, theRelationshipNotes);
}
{
MaintenanceNotes theMaintenanceNotes;
theMaintenanceNotes = this.getMaintenanceNotes();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"maintenanceNotes", theMaintenanceNotes), currentHashCode,
theMaintenanceNotes);
}
{
OtherNotes theOtherNotes;
theOtherNotes = this.getOtherNotes();
currentHashCode = strategy
.hashCode(LocatorUtils.property(locator, "otherNotes",
theOtherNotes), currentHashCode, theOtherNotes);
}
{
AlternateTerms theAlternateTerms;
theAlternateTerms = this.getAlternateTerms();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"alternateTerms", theAlternateTerms), currentHashCode,
theAlternateTerms);
}
{
ResearchGaps theResearchGaps;
theResearchGaps = this.getResearchGaps();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"researchGaps", theResearchGaps), currentHashCode,
theResearchGaps);
}
{
ReferenceListType theReferences;
theReferences = this.getReferences();
currentHashCode = strategy
.hashCode(LocatorUtils.property(locator, "references",
theReferences), currentHashCode, theReferences);
}
{
String theViewFilter;
theViewFilter = this.getViewFilter();
currentHashCode = strategy
.hashCode(LocatorUtils.property(locator, "viewFilter",
theViewFilter), currentHashCode, theViewFilter);
}
{
ContentHistory theContentHistory;
theContentHistory = this.getContentHistory();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator,
"contentHistory", theContentHistory), currentHashCode,
theContentHistory);
}
{
BigInteger theID;
theID = this.getID();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "id", theID),
currentHashCode, theID);
}
{
String theName;
theName = this.getName();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "name", theName),
currentHashCode, theName);
}
{
StatusType theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(
LocatorUtils.property(locator, "status", theStatus),
currentHashCode, theStatus);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public View withViewStructure(String value) {
setViewStructure(value);
return this;
}
public View withViewObjective(StructuredTextType value) {
setViewObjective(value);
return this;
}
public View withViewAudience(View.ViewAudience value) {
setViewAudience(value);
return this;
}
public View withRelationships(Relationships value) {
setRelationships(value);
return this;
}
public View withRelationshipNotes(RelationshipNotes value) {
setRelationshipNotes(value);
return this;
}
public View withMaintenanceNotes(MaintenanceNotes value) {
setMaintenanceNotes(value);
return this;
}
public View withOtherNotes(OtherNotes value) {
setOtherNotes(value);
return this;
}
public View withAlternateTerms(AlternateTerms value) {
setAlternateTerms(value);
return this;
}
public View withResearchGaps(ResearchGaps value) {
setResearchGaps(value);
return this;
}
public View withReferences(ReferenceListType value) {
setReferences(value);
return this;
}
public View withViewFilter(String value) {
setViewFilter(value);
return this;
}
public View withContentHistory(ContentHistory value) {
setContentHistory(value);
return this;
}
public View withID(BigInteger value) {
setID(value);
return this;
}
public View withName(String value) {
setName(value);
return this;
}
public View withStatus(StatusType value) {
setStatus(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) {
{
String theViewStructure;
theViewStructure = this.getViewStructure();
strategy.appendField(locator, this, "viewStructure", buffer,
theViewStructure);
}
{
StructuredTextType theViewObjective;
theViewObjective = this.getViewObjective();
strategy.appendField(locator, this, "viewObjective", buffer,
theViewObjective);
}
{
View.ViewAudience theViewAudience;
theViewAudience = this.getViewAudience();
strategy.appendField(locator, this, "viewAudience", buffer,
theViewAudience);
}
{
Relationships theRelationships;
theRelationships = this.getRelationships();
strategy.appendField(locator, this, "relationships", buffer,
theRelationships);
}
{
RelationshipNotes theRelationshipNotes;
theRelationshipNotes = this.getRelationshipNotes();
strategy.appendField(locator, this, "relationshipNotes", buffer,
theRelationshipNotes);
}
{
MaintenanceNotes theMaintenanceNotes;
theMaintenanceNotes = this.getMaintenanceNotes();
strategy.appendField(locator, this, "maintenanceNotes", buffer,
theMaintenanceNotes);
}
{
OtherNotes theOtherNotes;
theOtherNotes = this.getOtherNotes();
strategy.appendField(locator, this, "otherNotes", buffer,
theOtherNotes);
}
{
AlternateTerms theAlternateTerms;
theAlternateTerms = this.getAlternateTerms();
strategy.appendField(locator, this, "alternateTerms", buffer,
theAlternateTerms);
}
{
ResearchGaps theResearchGaps;
theResearchGaps = this.getResearchGaps();
strategy.appendField(locator, this, "researchGaps", buffer,
theResearchGaps);
}
{
ReferenceListType theReferences;
theReferences = this.getReferences();
strategy.appendField(locator, this, "references", buffer,
theReferences);
}
{
String theViewFilter;
theViewFilter = this.getViewFilter();
strategy.appendField(locator, this, "viewFilter", buffer,
theViewFilter);
}
{
ContentHistory theContentHistory;
theContentHistory = this.getContentHistory();
strategy.appendField(locator, this, "contentHistory", buffer,
theContentHistory);
}
{
BigInteger theID;
theID = this.getID();
strategy.appendField(locator, this, "id", buffer, theID);
}
{
String theName;
theName = this.getName();
strategy.appendField(locator, this, "name", buffer, theName);
}
{
StatusType theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus);
}
return buffer;
}
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Audience" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Stakeholder">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <whiteSpace value="collapse"/>
* <enumeration value="Developers"/>
* <enumeration value="Software_Vendors"/>
* <enumeration value="Assessment_Vendors"/>
* <enumeration value="Educators"/>
* <enumeration value="OWGV"/>
* <enumeration value="SAMATE"/>
* <enumeration value="CAPEC_Formalization"/>
* <enumeration value="CAPEC_Team"/>
* <enumeration value="Software_Customers"/>
* <enumeration value="Assessment_Customers"/>
* <enumeration value="Academic_Researchers"/>
* <enumeration value="Applied_Researchers"/>
* <enumeration value="Information_Providers"/>
* </restriction>
* </simpleType>
* </element>
* <element name="Stakeholder_Description" type="{http://capec.mitre.org/capec-2}Structured_Text_Type" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "audiences" })
public static class ViewAudience implements Equals, HashCode, ToString {
@XmlElement(name = "Audience", required = true)
protected List audiences;
/**
* Default no-arg constructor
*
*/
public ViewAudience() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public ViewAudience(final List audiences) {
this.audiences = audiences;
}
/**
* Gets the value of the audiences 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 audiences property.
*
*
* For example, to add a new item, do as follows:
*
* getAudiences().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link View.ViewAudience.Audience }
*
*
*/
public List getAudiences() {
if (audiences == null) {
audiences = new ArrayList();
}
return this.audiences;
}
public boolean equals(ObjectLocator thisLocator,
ObjectLocator thatLocator, Object object,
EqualsStrategy strategy) {
if (!(object instanceof View.ViewAudience)) {
return false;
}
if (this == object) {
return true;
}
final View.ViewAudience that = ((View.ViewAudience) object);
{
List lhsAudiences;
lhsAudiences = (((this.audiences != null) && (!this.audiences
.isEmpty())) ? this.getAudiences() : null);
List rhsAudiences;
rhsAudiences = (((that.audiences != null) && (!that.audiences
.isEmpty())) ? that.getAudiences() : null);
if (!strategy.equals(LocatorUtils.property(thisLocator,
"audiences", lhsAudiences), LocatorUtils.property(
thatLocator, "audiences", rhsAudiences), lhsAudiences,
rhsAudiences)) {
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 = 1;
{
List theAudiences;
theAudiences = (((this.audiences != null) && (!this.audiences
.isEmpty())) ? this.getAudiences() : null);
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "audiences", theAudiences), currentHashCode,
theAudiences);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public View.ViewAudience withAudiences(
View.ViewAudience.Audience... values) {
if (values != null) {
for (View.ViewAudience.Audience value : values) {
getAudiences().add(value);
}
}
return this;
}
public View.ViewAudience withAudiences(
Collection values) {
if (values != null) {
getAudiences().addAll(values);
}
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) {
{
List theAudiences;
theAudiences = (((this.audiences != null) && (!this.audiences
.isEmpty())) ? this.getAudiences() : null);
strategy.appendField(locator, this, "audiences", buffer,
theAudiences);
}
return buffer;
}
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Stakeholder">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <whiteSpace value="collapse"/>
* <enumeration value="Developers"/>
* <enumeration value="Software_Vendors"/>
* <enumeration value="Assessment_Vendors"/>
* <enumeration value="Educators"/>
* <enumeration value="OWGV"/>
* <enumeration value="SAMATE"/>
* <enumeration value="CAPEC_Formalization"/>
* <enumeration value="CAPEC_Team"/>
* <enumeration value="Software_Customers"/>
* <enumeration value="Assessment_Customers"/>
* <enumeration value="Academic_Researchers"/>
* <enumeration value="Applied_Researchers"/>
* <enumeration value="Information_Providers"/>
* </restriction>
* </simpleType>
* </element>
* <element name="Stakeholder_Description" type="{http://capec.mitre.org/capec-2}Structured_Text_Type" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "stakeholder",
"stakeholderDescription" })
public static class Audience implements Equals, HashCode, ToString {
@XmlElement(name = "Stakeholder", required = true)
protected String stakeholder;
@XmlElement(name = "Stakeholder_Description")
protected StructuredTextType stakeholderDescription;
/**
* Default no-arg constructor
*
*/
public Audience() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public Audience(final String stakeholder,
final StructuredTextType stakeholderDescription) {
this.stakeholder = stakeholder;
this.stakeholderDescription = stakeholderDescription;
}
/**
* Gets the value of the stakeholder property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStakeholder() {
return stakeholder;
}
/**
* Sets the value of the stakeholder property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStakeholder(String value) {
this.stakeholder = value;
}
/**
* Gets the value of the stakeholderDescription property.
*
* @return
* possible object is
* {@link StructuredTextType }
*
*/
public StructuredTextType getStakeholderDescription() {
return stakeholderDescription;
}
/**
* Sets the value of the stakeholderDescription property.
*
* @param value
* allowed object is
* {@link StructuredTextType }
*
*/
public void setStakeholderDescription(StructuredTextType value) {
this.stakeholderDescription = value;
}
public boolean equals(ObjectLocator thisLocator,
ObjectLocator thatLocator, Object object,
EqualsStrategy strategy) {
if (!(object instanceof View.ViewAudience.Audience)) {
return false;
}
if (this == object) {
return true;
}
final View.ViewAudience.Audience that = ((View.ViewAudience.Audience) object);
{
String lhsStakeholder;
lhsStakeholder = this.getStakeholder();
String rhsStakeholder;
rhsStakeholder = that.getStakeholder();
if (!strategy.equals(LocatorUtils.property(thisLocator,
"stakeholder", lhsStakeholder), LocatorUtils
.property(thatLocator, "stakeholder",
rhsStakeholder), lhsStakeholder,
rhsStakeholder)) {
return false;
}
}
{
StructuredTextType lhsStakeholderDescription;
lhsStakeholderDescription = this
.getStakeholderDescription();
StructuredTextType rhsStakeholderDescription;
rhsStakeholderDescription = that
.getStakeholderDescription();
if (!strategy.equals(LocatorUtils
.property(thisLocator, "stakeholderDescription",
lhsStakeholderDescription), LocatorUtils
.property(thatLocator, "stakeholderDescription",
rhsStakeholderDescription),
lhsStakeholderDescription,
rhsStakeholderDescription)) {
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 = 1;
{
String theStakeholder;
theStakeholder = this.getStakeholder();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "stakeholder", theStakeholder),
currentHashCode, theStakeholder);
}
{
StructuredTextType theStakeholderDescription;
theStakeholderDescription = this
.getStakeholderDescription();
currentHashCode = strategy.hashCode(LocatorUtils.property(
locator, "stakeholderDescription",
theStakeholderDescription), currentHashCode,
theStakeholderDescription);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public View.ViewAudience.Audience withStakeholder(String value) {
setStakeholder(value);
return this;
}
public View.ViewAudience.Audience withStakeholderDescription(
StructuredTextType value) {
setStakeholderDescription(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) {
{
String theStakeholder;
theStakeholder = this.getStakeholder();
strategy.appendField(locator, this, "stakeholder", buffer,
theStakeholder);
}
{
StructuredTextType theStakeholderDescription;
theStakeholderDescription = this
.getStakeholderDescription();
strategy.appendField(locator, this,
"stakeholderDescription", buffer,
theStakeholderDescription);
}
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, View.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 View instance for XML String
*
* @param text
* XML String for the document
* @return The View instance for the passed XML String
*/
public static View fromXMLString(String text) {
JAXBContext jaxbContext;
try {
jaxbContext = JAXBContext.newInstance(View.class.getPackage()
.getName());
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setSchema(STIXSchema.getInstance().getSchema());
unmarshaller.setEventHandler(new ValidationEventHandler());
StreamSource streamSource = new StreamSource(new StringReader(text));
return (View) unmarshaller.unmarshal(streamSource);
} catch (JAXBException e) {
throw new RuntimeException(e);
}
}
/**
* Validates the XML representation of this View instance
* Returning true indicating a successful validation, false if not.
*
* @return boolean True If it validates against the schema
* @throws SAXException
* If the a validation ErrorHandler has not been set, and
* validation throws a SAXException
*/
public boolean validate() throws SAXException {
return STIXSchema.getInstance().validate(toXMLString());
}
}