001: //
002: // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.2-b01-fcs
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: 2006.10.04 at 03:08:16 PM PDT
006: //
007:
008: package org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress;
009:
010: import java.util.ArrayList;
011: import java.util.List;
012: import javax.xml.bind.annotation.XmlAccessType;
013: import javax.xml.bind.annotation.XmlAccessorType;
014: import javax.xml.bind.annotation.XmlElement;
015: import javax.xml.bind.annotation.XmlRootElement;
016: import javax.xml.bind.annotation.XmlType;
017:
018: /**
019: * <p>Java class for Address complex type.
020: *
021: * <p>The following schema fragment specifies the expected content contained within this class.
022: *
023: * <pre>
024: * <complexType name="Address">
025: * <complexContent>
026: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
027: * <sequence>
028: * <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/>
029: * <element name="Street" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="3"/>
030: * <element name="City" type="{http://www.w3.org/2001/XMLSchema}string"/>
031: * </sequence>
032: * </restriction>
033: * </complexContent>
034: * </complexType>
035: * </pre>
036: *
037: *
038: */
039:
040: @XmlRootElement
041: @XmlAccessorType(XmlAccessType.FIELD)
042: @XmlType(name="Address",propOrder={"name","street","city"})
043: public class Address {
044:
045: @XmlElement(name="Name")
046: protected String name;
047: @XmlElement(name="Street")
048: protected List<String> street;
049: @XmlElement(name="City")
050: protected String city;
051:
052: /**
053: * Gets the value of the name property.
054: *
055: * @return
056: * possible object is
057: * {@link String }
058: *
059: */
060: public String getName() {
061: return name;
062: }
063:
064: /**
065: * Sets the value of the name property.
066: *
067: * @param value
068: * allowed object is
069: * {@link String }
070: *
071: */
072: public void setName(String value) {
073: this .name = value;
074: }
075:
076: /**
077: * Gets the value of the street property.
078: *
079: * <p>
080: * This accessor method returns a reference to the live list,
081: * not a snapshot. Therefore any modification you make to the
082: * returned list will be present inside the JAXB object.
083: * This is why there is not a <CODE>set</CODE> method for the street property.
084: *
085: * <p>
086: * For example, to add a new item, do as follows:
087: * <pre>
088: * getStreet().add(newItem);
089: * </pre>
090: *
091: *
092: * <p>
093: * Objects of the following type(s) are allowed in the list
094: * {@link String }
095: *
096: *
097: */
098: public List<String> getStreet() {
099: if (street == null) {
100: street = new ArrayList<String>();
101: }
102: return this .street;
103: }
104:
105: /**
106: * Gets the value of the city property.
107: *
108: * @return
109: * possible object is
110: * {@link String }
111: *
112: */
113: public String getCity() {
114: return city;
115: }
116:
117: /**
118: * Sets the value of the city property.
119: *
120: * @param value
121: * allowed object is
122: * {@link String }
123: *
124: */
125: public void setCity(String value) {
126: this .city = value;
127: }
128:
129: public String toString() {
130: StringBuffer sb = new StringBuffer();
131: sb.append(this .name);
132: for (int i = 0; i < this .getStreet().size(); i++)
133: sb.append("\n " + this .getStreet().get(i));
134: sb.append("\n " + this.getCity());
135: return sb.toString();
136: }
137: }
|