001    //
002    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 
003    // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
004    // Any modifications to this file will be lost upon recompilation of the source schema. 
005    // Generated on: 2013.10.14 at 11:56:49 PM IST 
006    //
007    
008    
009    package org.apache.activemq.schema.core;
010    
011    import java.util.ArrayList;
012    import java.util.HashMap;
013    import java.util.List;
014    import java.util.Map;
015    import javax.xml.bind.JAXBElement;
016    import javax.xml.bind.annotation.XmlAccessType;
017    import javax.xml.bind.annotation.XmlAccessorType;
018    import javax.xml.bind.annotation.XmlAnyAttribute;
019    import javax.xml.bind.annotation.XmlAnyElement;
020    import javax.xml.bind.annotation.XmlAttribute;
021    import javax.xml.bind.annotation.XmlElementRef;
022    import javax.xml.bind.annotation.XmlID;
023    import javax.xml.bind.annotation.XmlRootElement;
024    import javax.xml.bind.annotation.XmlSchemaType;
025    import javax.xml.bind.annotation.XmlType;
026    import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
027    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
028    import javax.xml.namespace.QName;
029    import org.jvnet.jaxb2_commons.lang.Equals;
030    import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
031    import org.jvnet.jaxb2_commons.lang.HashCode;
032    import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
033    import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
034    import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
035    import org.jvnet.jaxb2_commons.lang.ToString;
036    import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
037    import org.jvnet.jaxb2_commons.locator.ObjectLocator;
038    import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
039    
040    
041    /**
042     * <p>Java class for anonymous complex type.
043     * 
044     * <p>The following schema fragment specifies the expected content contained within this class.
045     * 
046     * <pre>
047     * &lt;complexType>
048     *   &lt;complexContent>
049     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
050     *       &lt;choice maxOccurs="unbounded" minOccurs="0">
051     *         &lt;choice>
052     *           &lt;element name="forwardTo" maxOccurs="unbounded" minOccurs="0">
053     *             &lt;complexType>
054     *               &lt;complexContent>
055     *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
056     *                   &lt;sequence maxOccurs="unbounded" minOccurs="0">
057     *                     &lt;any maxOccurs="unbounded" minOccurs="0"/>
058     *                   &lt;/sequence>
059     *                 &lt;/restriction>
060     *               &lt;/complexContent>
061     *             &lt;/complexType>
062     *           &lt;/element>
063     *           &lt;any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
064     *         &lt;/choice>
065     *       &lt;/choice>
066     *       &lt;attribute name="copyMessage" type="{http://www.w3.org/2001/XMLSchema}boolean" />
067     *       &lt;attribute name="forwardOnly" type="{http://www.w3.org/2001/XMLSchema}boolean" />
068     *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
069     *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
070     *       &lt;anyAttribute processContents='lax' namespace='##other'/>
071     *     &lt;/restriction>
072     *   &lt;/complexContent>
073     * &lt;/complexType>
074     * </pre>
075     * 
076     * 
077     */
078    @XmlAccessorType(XmlAccessType.FIELD)
079    @XmlType(name = "", propOrder = {
080        "forwardToOrAny"
081    })
082    @XmlRootElement(name = "compositeTopic")
083    public class DtoCompositeTopic implements Equals, HashCode, ToString
084    {
085    
086        @XmlElementRef(name = "forwardTo", namespace = "http://activemq.apache.org/schema/core", type = JAXBElement.class)
087        @XmlAnyElement(lax = true)
088        protected List<Object> forwardToOrAny;
089        @XmlAttribute(name = "copyMessage")
090        protected Boolean copyMessage;
091        @XmlAttribute(name = "forwardOnly")
092        protected Boolean forwardOnly;
093        @XmlAttribute(name = "name")
094        protected String name;
095        @XmlAttribute(name = "id")
096        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
097        @XmlID
098        @XmlSchemaType(name = "ID")
099        protected String id;
100        @XmlAnyAttribute
101        private Map<QName, String> otherAttributes = new HashMap<QName, String>();
102    
103        /**
104         * Gets the value of the forwardToOrAny property.
105         * 
106         * <p>
107         * This accessor method returns a reference to the live list,
108         * not a snapshot. Therefore any modification you make to the
109         * returned list will be present inside the JAXB object.
110         * This is why there is not a <CODE>set</CODE> method for the forwardToOrAny property.
111         * 
112         * <p>
113         * For example, to add a new item, do as follows:
114         * <pre>
115         *    getForwardToOrAny().add(newItem);
116         * </pre>
117         * 
118         * 
119         * <p>
120         * Objects of the following type(s) are allowed in the list
121         * {@link JAXBElement }{@code <}{@link DtoCompositeTopic.ForwardTo }{@code >}
122         * {@link Object }
123         * 
124         * 
125         */
126        public List<Object> getForwardToOrAny() {
127            if (forwardToOrAny == null) {
128                forwardToOrAny = new ArrayList<Object>();
129            }
130            return this.forwardToOrAny;
131        }
132    
133        /**
134         * Gets the value of the copyMessage property.
135         * 
136         * @return
137         *     possible object is
138         *     {@link Boolean }
139         *     
140         */
141        public Boolean isCopyMessage() {
142            return copyMessage;
143        }
144    
145        /**
146         * Sets the value of the copyMessage property.
147         * 
148         * @param value
149         *     allowed object is
150         *     {@link Boolean }
151         *     
152         */
153        public void setCopyMessage(Boolean value) {
154            this.copyMessage = value;
155        }
156    
157        /**
158         * Gets the value of the forwardOnly property.
159         * 
160         * @return
161         *     possible object is
162         *     {@link Boolean }
163         *     
164         */
165        public Boolean isForwardOnly() {
166            return forwardOnly;
167        }
168    
169        /**
170         * Sets the value of the forwardOnly property.
171         * 
172         * @param value
173         *     allowed object is
174         *     {@link Boolean }
175         *     
176         */
177        public void setForwardOnly(Boolean value) {
178            this.forwardOnly = value;
179        }
180    
181        /**
182         * Gets the value of the name property.
183         * 
184         * @return
185         *     possible object is
186         *     {@link String }
187         *     
188         */
189        public String getName() {
190            return name;
191        }
192    
193        /**
194         * Sets the value of the name property.
195         * 
196         * @param value
197         *     allowed object is
198         *     {@link String }
199         *     
200         */
201        public void setName(String value) {
202            this.name = value;
203        }
204    
205        /**
206         * Gets the value of the id property.
207         * 
208         * @return
209         *     possible object is
210         *     {@link String }
211         *     
212         */
213        public String getId() {
214            return id;
215        }
216    
217        /**
218         * Sets the value of the id property.
219         * 
220         * @param value
221         *     allowed object is
222         *     {@link String }
223         *     
224         */
225        public void setId(String value) {
226            this.id = value;
227        }
228    
229        /**
230         * Gets a map that contains attributes that aren't bound to any typed property on this class.
231         * 
232         * <p>
233         * the map is keyed by the name of the attribute and 
234         * the value is the string value of the attribute.
235         * 
236         * the map returned by this method is live, and you can add new attribute
237         * by updating the map directly. Because of this design, there's no setter.
238         * 
239         * 
240         * @return
241         *     always non-null
242         */
243        public Map<QName, String> getOtherAttributes() {
244            return otherAttributes;
245        }
246    
247        public String toString() {
248            final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
249            final StringBuilder buffer = new StringBuilder();
250            append(null, buffer, strategy);
251            return buffer.toString();
252        }
253    
254        public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
255            strategy.appendStart(locator, this, buffer);
256            appendFields(locator, buffer, strategy);
257            strategy.appendEnd(locator, this, buffer);
258            return buffer;
259        }
260    
261        public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
262            {
263                List<Object> theForwardToOrAny;
264                theForwardToOrAny = (((this.forwardToOrAny!= null)&&(!this.forwardToOrAny.isEmpty()))?this.getForwardToOrAny():null);
265                strategy.appendField(locator, this, "forwardToOrAny", buffer, theForwardToOrAny);
266            }
267            {
268                Boolean theCopyMessage;
269                theCopyMessage = this.isCopyMessage();
270                strategy.appendField(locator, this, "copyMessage", buffer, theCopyMessage);
271            }
272            {
273                Boolean theForwardOnly;
274                theForwardOnly = this.isForwardOnly();
275                strategy.appendField(locator, this, "forwardOnly", buffer, theForwardOnly);
276            }
277            {
278                String theName;
279                theName = this.getName();
280                strategy.appendField(locator, this, "name", buffer, theName);
281            }
282            {
283                String theId;
284                theId = this.getId();
285                strategy.appendField(locator, this, "id", buffer, theId);
286            }
287            return buffer;
288        }
289    
290        public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
291            int currentHashCode = 1;
292            {
293                List<Object> theForwardToOrAny;
294                theForwardToOrAny = (((this.forwardToOrAny!= null)&&(!this.forwardToOrAny.isEmpty()))?this.getForwardToOrAny():null);
295                currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "forwardToOrAny", theForwardToOrAny), currentHashCode, theForwardToOrAny);
296            }
297            {
298                Boolean theCopyMessage;
299                theCopyMessage = this.isCopyMessage();
300                currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "copyMessage", theCopyMessage), currentHashCode, theCopyMessage);
301            }
302            {
303                Boolean theForwardOnly;
304                theForwardOnly = this.isForwardOnly();
305                currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "forwardOnly", theForwardOnly), currentHashCode, theForwardOnly);
306            }
307            {
308                String theName;
309                theName = this.getName();
310                currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName);
311            }
312            {
313                String theId;
314                theId = this.getId();
315                currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
316            }
317            return currentHashCode;
318        }
319    
320        public int hashCode() {
321            final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
322            return this.hashCode(null, strategy);
323        }
324    
325        public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
326            if (!(object instanceof DtoCompositeTopic)) {
327                return false;
328            }
329            if (this == object) {
330                return true;
331            }
332            final DtoCompositeTopic that = ((DtoCompositeTopic) object);
333            {
334                List<Object> lhsForwardToOrAny;
335                lhsForwardToOrAny = (((this.forwardToOrAny!= null)&&(!this.forwardToOrAny.isEmpty()))?this.getForwardToOrAny():null);
336                List<Object> rhsForwardToOrAny;
337                rhsForwardToOrAny = (((that.forwardToOrAny!= null)&&(!that.forwardToOrAny.isEmpty()))?that.getForwardToOrAny():null);
338                if (!strategy.equals(LocatorUtils.property(thisLocator, "forwardToOrAny", lhsForwardToOrAny), LocatorUtils.property(thatLocator, "forwardToOrAny", rhsForwardToOrAny), lhsForwardToOrAny, rhsForwardToOrAny)) {
339                    return false;
340                }
341            }
342            {
343                Boolean lhsCopyMessage;
344                lhsCopyMessage = this.isCopyMessage();
345                Boolean rhsCopyMessage;
346                rhsCopyMessage = that.isCopyMessage();
347                if (!strategy.equals(LocatorUtils.property(thisLocator, "copyMessage", lhsCopyMessage), LocatorUtils.property(thatLocator, "copyMessage", rhsCopyMessage), lhsCopyMessage, rhsCopyMessage)) {
348                    return false;
349                }
350            }
351            {
352                Boolean lhsForwardOnly;
353                lhsForwardOnly = this.isForwardOnly();
354                Boolean rhsForwardOnly;
355                rhsForwardOnly = that.isForwardOnly();
356                if (!strategy.equals(LocatorUtils.property(thisLocator, "forwardOnly", lhsForwardOnly), LocatorUtils.property(thatLocator, "forwardOnly", rhsForwardOnly), lhsForwardOnly, rhsForwardOnly)) {
357                    return false;
358                }
359            }
360            {
361                String lhsName;
362                lhsName = this.getName();
363                String rhsName;
364                rhsName = that.getName();
365                if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName)) {
366                    return false;
367                }
368            }
369            {
370                String lhsId;
371                lhsId = this.getId();
372                String rhsId;
373                rhsId = that.getId();
374                if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
375                    return false;
376                }
377            }
378            return true;
379        }
380    
381        public boolean equals(Object object) {
382            final EqualsStrategy strategy = new org.apache.activemq.plugin.jaxb2_commons.ElementAwareEqualsStrategy();
383            return equals(null, null, object, strategy);
384        }
385    
386    
387        /**
388         * <p>Java class for anonymous complex type.
389         * 
390         * <p>The following schema fragment specifies the expected content contained within this class.
391         * 
392         * <pre>
393         * &lt;complexType>
394         *   &lt;complexContent>
395         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
396         *       &lt;sequence maxOccurs="unbounded" minOccurs="0">
397         *         &lt;any maxOccurs="unbounded" minOccurs="0"/>
398         *       &lt;/sequence>
399         *     &lt;/restriction>
400         *   &lt;/complexContent>
401         * &lt;/complexType>
402         * </pre>
403         * 
404         * 
405         */
406        @XmlAccessorType(XmlAccessType.FIELD)
407        @XmlType(name = "", propOrder = {
408            "any"
409        })
410        public static class ForwardTo
411            implements Equals, HashCode, ToString
412        {
413    
414            @XmlAnyElement(lax = true)
415            protected List<Object> any;
416    
417            /**
418             * Gets the value of the any property.
419             * 
420             * <p>
421             * This accessor method returns a reference to the live list,
422             * not a snapshot. Therefore any modification you make to the
423             * returned list will be present inside the JAXB object.
424             * This is why there is not a <CODE>set</CODE> method for the any property.
425             * 
426             * <p>
427             * For example, to add a new item, do as follows:
428             * <pre>
429             *    getAny().add(newItem);
430             * </pre>
431             * 
432             * 
433             * <p>
434             * Objects of the following type(s) are allowed in the list
435             * {@link Object }
436             * 
437             * 
438             */
439            public List<Object> getAny() {
440                if (any == null) {
441                    any = new ArrayList<Object>();
442                }
443                return this.any;
444            }
445    
446            public String toString() {
447                final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
448                final StringBuilder buffer = new StringBuilder();
449                append(null, buffer, strategy);
450                return buffer.toString();
451            }
452    
453            public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
454                strategy.appendStart(locator, this, buffer);
455                appendFields(locator, buffer, strategy);
456                strategy.appendEnd(locator, this, buffer);
457                return buffer;
458            }
459    
460            public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
461                {
462                    List<Object> theAny;
463                    theAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null);
464                    strategy.appendField(locator, this, "any", buffer, theAny);
465                }
466                return buffer;
467            }
468    
469            public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
470                int currentHashCode = 1;
471                {
472                    List<Object> theAny;
473                    theAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null);
474                    currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "any", theAny), currentHashCode, theAny);
475                }
476                return currentHashCode;
477            }
478    
479            public int hashCode() {
480                final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
481                return this.hashCode(null, strategy);
482            }
483    
484            public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
485                if (!(object instanceof DtoCompositeTopic.ForwardTo)) {
486                    return false;
487                }
488                if (this == object) {
489                    return true;
490                }
491                final DtoCompositeTopic.ForwardTo that = ((DtoCompositeTopic.ForwardTo) object);
492                {
493                    List<Object> lhsAny;
494                    lhsAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null);
495                    List<Object> rhsAny;
496                    rhsAny = (((that.any!= null)&&(!that.any.isEmpty()))?that.getAny():null);
497                    if (!strategy.equals(LocatorUtils.property(thisLocator, "any", lhsAny), LocatorUtils.property(thatLocator, "any", rhsAny), lhsAny, rhsAny)) {
498                        return false;
499                    }
500                }
501                return true;
502            }
503    
504            public boolean equals(Object object) {
505                final EqualsStrategy strategy = new org.apache.activemq.plugin.jaxb2_commons.ElementAwareEqualsStrategy();
506                return equals(null, null, object, strategy);
507            }
508    
509        }
510    
511    }