| /* |
| * Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved. |
| * |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v. 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0, |
| * or the Eclipse Distribution License v. 1.0 which is available at |
| * http://www.eclipse.org/org/documents/edl-v10.php. |
| * |
| * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause |
| */ |
| |
| // |
| // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 |
| // 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: 2010, 2015 .05.05 at 01:57:10 PM EDT |
| // |
| |
| |
| package org.eclipse.persistence.testing.jaxb.substitution; |
| |
| import jakarta.xml.bind.JAXBElement; |
| import jakarta.xml.bind.annotation.XmlAccessType; |
| import jakarta.xml.bind.annotation.XmlAccessorType; |
| import jakarta.xml.bind.annotation.XmlElementRef; |
| import jakarta.xml.bind.annotation.XmlType; |
| |
| |
| /** |
| * <p>Java class for person complex type. |
| * |
| * <p>The following schema fragment specifies the expected content contained within this class. |
| * |
| * <pre>{@code |
| * <complexType name="person"> |
| * <complexContent> |
| * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
| * <sequence> |
| * <element ref="{myNamespace}name"/> |
| * </sequence> |
| * </restriction> |
| * </complexContent> |
| * </complexType> |
| * }</pre> |
| * |
| * |
| */ |
| @XmlAccessorType(XmlAccessType.FIELD) |
| @XmlType(name = "person", propOrder = { |
| "name" |
| }) |
| public class Person { |
| |
| @XmlElementRef(name = "name", namespace = "myNamespace", type = JAXBElement.class) |
| protected JAXBElement<String> name; |
| |
| /** |
| * Gets the value of the name property. |
| * |
| * @return |
| * possible object is |
| * {@link JAXBElement }{@code <}{@link String }{@code >} |
| * {@link JAXBElement }{@code <}{@link String }{@code >} |
| * |
| */ |
| public JAXBElement<String> getName() { |
| return name; |
| } |
| |
| /** |
| * Sets the value of the name property. |
| * |
| * @param value |
| * allowed object is |
| * {@link JAXBElement }{@code <}{@link String }{@code >} |
| * {@link JAXBElement }{@code <}{@link String }{@code >} |
| * |
| */ |
| public void setName(JAXBElement<String> value) { |
| this.name = value; |
| } |
| |
| public boolean equals(Object arg0) { |
| if (arg0 == null) { |
| return false; |
| } |
| |
| if (!(arg0 instanceof Person)) { |
| return false; |
| } |
| |
| Person aPerson = (Person) arg0; |
| |
| if (this.name == null && aPerson.name != null) { |
| return false; |
| } |
| |
| if (this.name != null && aPerson.name == null) { |
| return false; |
| } |
| |
| return this.name.getValue().equals(aPerson.name.getValue()); |
| } |
| |
| } |