// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.08.05 at 03:54:57 PM CEST // package com.ptc.tifworkbench.jaxbbinding; import java.util.ArrayList; import java.util.List; 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.XmlType; 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; /** * <p>Java class for ConstraintDefinition complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="ConstraintDefinition"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="source" minOccurs="0"> * <complexType> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/> * </sequence> * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /> * </restriction> * </complexContent> * </complexType> * </element> * <element name="target" type="{http://www.ptc.com/integrity-solution}ConstraintTargetDefinition"/> * <element name="rule" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </sequence> * <attribute name="type" type="{http://www.ptc.com/integrity-solution}ConstraintType" /> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ConstraintDefinition", propOrder = { "source", "target", "rule" }) public class ConstraintDefinition implements Equals, HashCode, ToString { protected ConstraintDefinition.Source source; @XmlElement(required = true) protected ConstraintTargetDefinition target; protected String rule; @XmlAttribute(name = "type") protected ConstraintType type; /** * Gets the value of the source property. * * @return * possible object is * {@link ConstraintDefinition.Source } * */ public ConstraintDefinition.Source getSource() { return source; } /** * Sets the value of the source property. * * @param value * allowed object is * {@link ConstraintDefinition.Source } * */ public void setSource(ConstraintDefinition.Source value) { this.source = value; } /** * Gets the value of the target property. * * @return * possible object is * {@link ConstraintTargetDefinition } * */ public ConstraintTargetDefinition getTarget() { return target; } /** * Sets the value of the target property. * * @param value * allowed object is * {@link ConstraintTargetDefinition } * */ public void setTarget(ConstraintTargetDefinition value) { this.target = value; } /** * Gets the value of the rule property. * * @return * possible object is * {@link String } * */ public String getRule() { return rule; } /** * Sets the value of the rule property. * * @param value * allowed object is * {@link String } * */ public void setRule(String value) { this.rule = value; } /** * Gets the value of the type property. * * @return * possible object is * {@link ConstraintType } * */ public ConstraintType getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link ConstraintType } * */ public void setType(ConstraintType value) { this.type = value; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof ConstraintDefinition)) { return false; } if (this == object) { return true; } final ConstraintDefinition that = ((ConstraintDefinition) object); { ConstraintDefinition.Source lhsSource; lhsSource = this.getSource(); ConstraintDefinition.Source rhsSource; rhsSource = that.getSource(); if (!strategy.equals(LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource)) { return false; } } { ConstraintTargetDefinition lhsTarget; lhsTarget = this.getTarget(); ConstraintTargetDefinition rhsTarget; rhsTarget = that.getTarget(); if (!strategy.equals(LocatorUtils.property(thisLocator, "target", lhsTarget), LocatorUtils.property(thatLocator, "target", rhsTarget), lhsTarget, rhsTarget)) { return false; } } { String lhsRule; lhsRule = this.getRule(); String rhsRule; rhsRule = that.getRule(); if (!strategy.equals(LocatorUtils.property(thisLocator, "rule", lhsRule), LocatorUtils.property(thatLocator, "rule", rhsRule), lhsRule, rhsRule)) { return false; } } { ConstraintType lhsType; lhsType = this.getType(); ConstraintType rhsType; rhsType = that.getType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) { 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; { ConstraintDefinition.Source theSource; theSource = this.getSource(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource); } { ConstraintTargetDefinition theTarget; theTarget = this.getTarget(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "target", theTarget), currentHashCode, theTarget); } { String theRule; theRule = this.getRule(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "rule", theRule), currentHashCode, theRule); } { ConstraintType theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } 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) { { ConstraintDefinition.Source theSource; theSource = this.getSource(); strategy.appendField(locator, this, "source", buffer, theSource); } { ConstraintTargetDefinition theTarget; theTarget = this.getTarget(); strategy.appendField(locator, this, "target", buffer, theTarget); } { String theRule; theRule = this.getRule(); strategy.appendField(locator, this, "rule", buffer, theRule); } { ConstraintType theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType); } return buffer; } /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/> * </sequence> * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "value" }) public static class Source implements Equals, HashCode, ToString { @XmlElement(required = true) protected List<String> value; @XmlAttribute(name = "name") protected String name; /** * Gets the value of the value property. * * <p> * 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 <CODE>set</CODE> method for the value property. * * <p> * For example, to add a new item, do as follows: * <pre> * getValue().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getValue() { if (value == null) { value = new ArrayList<String>(); } return this.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; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof ConstraintDefinition.Source)) { return false; } if (this == object) { return true; } final ConstraintDefinition.Source that = ((ConstraintDefinition.Source) object); { List<String> lhsValue; lhsValue = this.getValue(); List<String> rhsValue; rhsValue = that.getValue(); if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) { 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; } } 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<String> theValue; theValue = this.getValue(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue); } { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } 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<String> theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName); } return buffer; } } }