Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  //
  // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-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: 2010.09.03 at 10:11:56 AM MESZ 
  //
  
  
  package net.opengis.xls.v_1_1_0;
 
 import java.util.List;
Defines an address

Java class for AddressType complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="AddressType">
   <complexContent>
     <extension base="{http://www.opengis.net/xls}AbstractAddressType">
       <choice>
         <element name="freeFormAddress" type="{http://www.w3.org/2001/XMLSchema}string"/>
         <sequence>
           <element ref="{http://www.opengis.net/xls}StreetAddress"/>
           <element ref="{http://www.opengis.net/xls}Place" maxOccurs="unbounded" minOccurs="0"/>
           <element ref="{http://www.opengis.net/xls}PostalCode" minOccurs="0"/>
         </sequence>
       </choice>
     </extension>
   </complexContent>
 </complexType>
 
 
 @XmlType(name = "AddressType", propOrder = {
     "freeFormAddress",
     "streetAddress",
     "place",
     "postalCode"
 })
 public class AddressType
     extends AbstractAddressType
     implements CloneableCopyToEqualsHashCodeMergeFromToString
 {
 
     protected String freeFormAddress;
     @XmlElement(name = "StreetAddress")
     protected StreetAddressType streetAddress;
     @XmlElement(name = "Place")
     protected List<NamedPlaceTypeplace;
     @XmlElement(name = "PostalCode")
     protected String postalCode;

    
Gets the value of the freeFormAddress property.

Returns:
possible object is
 
     public String getFreeFormAddress() {
         return ;
     }

    
Sets the value of the freeFormAddress property.

Parameters:
value allowed object is
    public void setFreeFormAddress(String value) {
        this. = value;
    }

    
Gets the value of the streetAddress property.

Returns:
possible object is
        return ;
    }

    
Sets the value of the streetAddress property.

Parameters:
value allowed object is
    public void setStreetAddress(StreetAddressType value) {
        this. = value;
    }

    
Gets the value of the place 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 place property.

For example, to add a new item, do as follows:

    getPlace().add(newItem);
 

Objects of the following type(s) are allowed in the list

    public List<NamedPlaceTypegetPlace() {
        if ( == null) {
             = new ArrayList<NamedPlaceType>();
        }
        return this.;
    }

    
Gets the value of the postalCode property.

Returns:
possible object is
    public String getPostalCode() {
        return ;
    }

    
Sets the value of the postalCode property.

Parameters:
value allowed object is
    public void setPostalCode(String value) {
        this. = value;
    }
    public String toString() {
        final ToStringStrategy strategy = .;
        final StringBuilder buffer = new StringBuilder();
        append(nullbufferstrategy);
        return buffer.toString();
    }
    public StringBuilder append(ObjectLocator locatorStringBuilder bufferToStringStrategy strategy) {
        strategy.appendStart(locatorthisbuffer);
        appendFields(locatorbufferstrategy);
        strategy.appendEnd(locatorthisbuffer);
        return buffer;
    }
    public StringBuilder appendFields(ObjectLocator locatorStringBuilder bufferToStringStrategy strategy) {
        super.appendFields(locatorbufferstrategy);
        {
            String theFreeFormAddress;
            theFreeFormAddress = this.getFreeFormAddress();
            strategy.appendField(locatorthis"freeFormAddress"buffertheFreeFormAddress);
        }
        {
            StreetAddressType theStreetAddress;
            theStreetAddress = this.getStreetAddress();
            strategy.appendField(locatorthis"streetAddress"buffertheStreetAddress);
        }
        {
            List<NamedPlaceTypethePlace;
            thePlace = this.getPlace();
            strategy.appendField(locatorthis"place"bufferthePlace);
        }
        {
            String thePostalCode;
            thePostalCode = this.getPostalCode();
            strategy.appendField(locatorthis"postalCode"bufferthePostalCode);
        }
        return buffer;
    }
    public boolean equals(ObjectLocator thisLocatorObjectLocator thatLocatorObject objectEqualsStrategy strategy) {
        if (!(object instanceof AddressType)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        if (!super.equals(thisLocatorthatLocatorobjectstrategy)) {
            return false;
        }
        final AddressType that = ((AddressTypeobject);
        {
            String lhsFreeFormAddress;
            lhsFreeFormAddress = this.getFreeFormAddress();
            String rhsFreeFormAddress;
            rhsFreeFormAddress = that.getFreeFormAddress();
            if (!strategy.equals(LocatorUtils.property(thisLocator"freeFormAddress"lhsFreeFormAddress), LocatorUtils.property(thatLocator"freeFormAddress"rhsFreeFormAddress), lhsFreeFormAddressrhsFreeFormAddress)) {
                return false;
            }
        }
        {
            StreetAddressType lhsStreetAddress;
            lhsStreetAddress = this.getStreetAddress();
            StreetAddressType rhsStreetAddress;
            rhsStreetAddress = that.getStreetAddress();
            if (!strategy.equals(LocatorUtils.property(thisLocator"streetAddress"lhsStreetAddress), LocatorUtils.property(thatLocator"streetAddress"rhsStreetAddress), lhsStreetAddressrhsStreetAddress)) {
                return false;
            }
        }
        {
            List<NamedPlaceTypelhsPlace;
            lhsPlace = this.getPlace();
            List<NamedPlaceTyperhsPlace;
            rhsPlace = that.getPlace();
            if (!strategy.equals(LocatorUtils.property(thisLocator"place"lhsPlace), LocatorUtils.property(thatLocator"place"rhsPlace), lhsPlacerhsPlace)) {
                return false;
            }
        }
        {
            String lhsPostalCode;
            lhsPostalCode = this.getPostalCode();
            String rhsPostalCode;
            rhsPostalCode = that.getPostalCode();
            if (!strategy.equals(LocatorUtils.property(thisLocator"postalCode"lhsPostalCode), LocatorUtils.property(thatLocator"postalCode"rhsPostalCode), lhsPostalCoderhsPostalCode)) {
                return false;
            }
        }
        return true;
    }
    public boolean equals(Object object) {
        final EqualsStrategy strategy = .;
        return equals(nullnullobjectstrategy);
    }
    public int hashCode(ObjectLocator locatorHashCodeStrategy strategy) {
        int currentHashCode = super.hashCode(locatorstrategy);
        {
            String theFreeFormAddress;
            theFreeFormAddress = this.getFreeFormAddress();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"freeFormAddress"theFreeFormAddress), currentHashCodetheFreeFormAddress);
        }
        {
            StreetAddressType theStreetAddress;
            theStreetAddress = this.getStreetAddress();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"streetAddress"theStreetAddress), currentHashCodetheStreetAddress);
        }
        {
            List<NamedPlaceTypethePlace;
            thePlace = this.getPlace();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"place"thePlace), currentHashCodethePlace);
        }
        {
            String thePostalCode;
            thePostalCode = this.getPostalCode();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"postalCode"thePostalCode), currentHashCodethePostalCode);
        }
        return currentHashCode;
    }
    public int hashCode() {
        final HashCodeStrategy strategy = .;
        return this.hashCode(nullstrategy);
    }
    public Object clone() {
        return copyTo(createNewInstance());
    }
    public Object copyTo(Object target) {
        final CopyStrategy strategy = .;
        return copyTo(nulltargetstrategy);
    }
    public Object copyTo(ObjectLocator locatorObject targetCopyStrategy strategy) {
        final Object draftCopy = ((target == null)?createNewInstance():target);
        super.copyTo(locatordraftCopystrategy);
        if (draftCopy instanceof AddressType) {
            final AddressType copy = ((AddressTypedraftCopy);
            if (this.!= null) {
                String sourceFreeFormAddress;
                sourceFreeFormAddress = this.getFreeFormAddress();
                String copyFreeFormAddress = ((Stringstrategy.copy(LocatorUtils.property(locator"freeFormAddress"sourceFreeFormAddress), sourceFreeFormAddress));
                copy.setFreeFormAddress(copyFreeFormAddress);
            } else {
                copy.freeFormAddress = null;
            }
            if (this.!= null) {
                StreetAddressType sourceStreetAddress;
                sourceStreetAddress = this.getStreetAddress();
                StreetAddressType copyStreetAddress = ((StreetAddressTypestrategy.copy(LocatorUtils.property(locator"streetAddress"sourceStreetAddress), sourceStreetAddress));
                copy.setStreetAddress(copyStreetAddress);
            } else {
                copy.streetAddress = null;
            }
            if ((this.!= null)&&(!this..isEmpty())) {
                List<NamedPlaceTypesourcePlace;
                sourcePlace = this.getPlace();
                @SuppressWarnings("unchecked")
                List<NamedPlaceTypecopyPlace = ((List<NamedPlaceType> ) strategy.copy(LocatorUtils.property(locator"place"sourcePlace), sourcePlace));
                copy.place = null;
                List<NamedPlaceTypeuniquePlacel = copy.getPlace();
                uniquePlacel.addAll(copyPlace);
            } else {
                copy.place = null;
            }
            if (this.!= null) {
                String sourcePostalCode;
                sourcePostalCode = this.getPostalCode();
                String copyPostalCode = ((Stringstrategy.copy(LocatorUtils.property(locator"postalCode"sourcePostalCode), sourcePostalCode));
                copy.setPostalCode(copyPostalCode);
            } else {
                copy.postalCode = null;
            }
        }
        return draftCopy;
    }
    public Object createNewInstance() {
        return new AddressType();
    }
    public void mergeFrom(Object leftObject right) {
        final MergeStrategy strategy = .;
        mergeFrom(nullnullleftrightstrategy);
    }
    public void mergeFrom(ObjectLocator leftLocatorObjectLocator rightLocatorObject leftObject rightMergeStrategy strategy) {
        super.mergeFrom(leftLocatorrightLocatorleftrightstrategy);
        if (right instanceof AddressType) {
            final AddressType target = this;
            final AddressType leftObject = ((AddressTypeleft);
            final AddressType rightObject = ((AddressTyperight);
            {
                String lhsFreeFormAddress;
                lhsFreeFormAddress = leftObject.getFreeFormAddress();
                String rhsFreeFormAddress;
                rhsFreeFormAddress = rightObject.getFreeFormAddress();
                target.setFreeFormAddress(((Stringstrategy.merge(LocatorUtils.property(leftLocator"freeFormAddress"lhsFreeFormAddress), LocatorUtils.property(rightLocator"freeFormAddress"rhsFreeFormAddress), lhsFreeFormAddressrhsFreeFormAddress)));
            }
            {
                StreetAddressType lhsStreetAddress;
                lhsStreetAddress = leftObject.getStreetAddress();
                StreetAddressType rhsStreetAddress;
                rhsStreetAddress = rightObject.getStreetAddress();
                target.setStreetAddress(((StreetAddressTypestrategy.merge(LocatorUtils.property(leftLocator"streetAddress"lhsStreetAddress), LocatorUtils.property(rightLocator"streetAddress"rhsStreetAddress), lhsStreetAddressrhsStreetAddress)));
            }
            {
                List<NamedPlaceTypelhsPlace;
                lhsPlace = leftObject.getPlace();
                List<NamedPlaceTyperhsPlace;
                rhsPlace = rightObject.getPlace();
                target.place = null;
                List<NamedPlaceTypeuniquePlacel = target.getPlace();
                uniquePlacel.addAll(((List<NamedPlaceType> ) strategy.merge(LocatorUtils.property(leftLocator"place"lhsPlace), LocatorUtils.property(rightLocator"place"rhsPlace), lhsPlacerhsPlace)));
            }
            {
                String lhsPostalCode;
                lhsPostalCode = leftObject.getPostalCode();
                String rhsPostalCode;
                rhsPostalCode = rightObject.getPostalCode();
                target.setPostalCode(((Stringstrategy.merge(LocatorUtils.property(leftLocator"postalCode"lhsPostalCode), LocatorUtils.property(rightLocator"postalCode"rhsPostalCode), lhsPostalCoderhsPostalCode)));
            }
        }
    }
    public void setPlace(List<NamedPlaceTypevalue) {
        List<NamedPlaceTypedraftl = this.getPlace();
        draftl.addAll(value);
    }
New to GrepCode? Check out our FAQ X