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: 2011.02.20 at 01:29:24 PM MEZ 
  //
  
  
  package net.opengis.xls.v_1_1_0;
 
The AddressType is the Address_ADT for OpenLS and it supports the concepts of the OGC Geocoder document 01-026r1 with some modifications which resulted in both simplifications and improved handling capability. The definition is also broad enough to handle some of the more obscure occurrences of street addressing as well as handling the case of when all you have is an un-parsed string representing the complete address. We could generalize this even further to handle non-street addressing schemes found in other industries, such as the Municipal Survey Addressing schemes that are used by Municipalities to address the lots on which a building may be placed but that is probably a future requirement outside the scope of OLS1.

Java class for AbstractAddressType complex type.

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

 <complexType name="AbstractAddressType">
   <complexContent>
     <extension base="{http://www.opengis.net/xls}AbstractLocationType">
       <attribute name="addressee" type="{http://www.w3.org/2001/XMLSchema}string" />
       <attribute name="countryCode" use="required" type="{http://www.opengis.net/xls}CountryCodeType" />
     </extension>
   </complexContent>
 </complexType>
 
 
 @XmlType(name = "AbstractAddressType")
     AddressType.class
 })
 public abstract class AbstractAddressType
     extends AbstractLocationType
     implements CloneableCopyToEqualsHashCodeMergeFromToString
 {
 
     @XmlAttribute(name = "addressee")
     protected String addressee;
     @XmlAttribute(name = "countryCode", required = true)
     protected String countryCode;

    
Gets the value of the addressee property.

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

    
Sets the value of the addressee property.

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

    
Gets the value of the countryCode property.

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

    
Sets the value of the countryCode property.

Parameters:
value allowed object is
    public void setCountryCode(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 theAddressee;
            theAddressee = this.getAddressee();
            strategy.appendField(locatorthis"addressee"buffertheAddressee);
        }
        {
            String theCountryCode;
            theCountryCode = this.getCountryCode();
            strategy.appendField(locatorthis"countryCode"buffertheCountryCode);
        }
        return buffer;
    }
    public boolean equals(ObjectLocator thisLocatorObjectLocator thatLocatorObject objectEqualsStrategy strategy) {
        if (!(object instanceof AbstractAddressType)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        if (!super.equals(thisLocatorthatLocatorobjectstrategy)) {
            return false;
        }
        final AbstractAddressType that = ((AbstractAddressTypeobject);
        {
            String lhsAddressee;
            lhsAddressee = this.getAddressee();
            String rhsAddressee;
            rhsAddressee = that.getAddressee();
            if (!strategy.equals(LocatorUtils.property(thisLocator"addressee"lhsAddressee), LocatorUtils.property(thatLocator"addressee"rhsAddressee), lhsAddresseerhsAddressee)) {
                return false;
            }
        }
        {
            String lhsCountryCode;
            lhsCountryCode = this.getCountryCode();
            String rhsCountryCode;
            rhsCountryCode = that.getCountryCode();
            if (!strategy.equals(LocatorUtils.property(thisLocator"countryCode"lhsCountryCode), LocatorUtils.property(thatLocator"countryCode"rhsCountryCode), lhsCountryCoderhsCountryCode)) {
                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 theAddressee;
            theAddressee = this.getAddressee();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"addressee"theAddressee), currentHashCodetheAddressee);
        }
        {
            String theCountryCode;
            theCountryCode = this.getCountryCode();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"countryCode"theCountryCode), currentHashCodetheCountryCode);
        }
        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) {
        if (null == target) {
            throw new IllegalArgumentException("Target argument must not be null for abstract copyable classes.");
        }
        super.copyTo(locatortargetstrategy);
        if (target instanceof AbstractAddressType) {
            final AbstractAddressType copy = ((AbstractAddressTypetarget);
            if (this.!= null) {
                String sourceAddressee;
                sourceAddressee = this.getAddressee();
                String copyAddressee = ((Stringstrategy.copy(LocatorUtils.property(locator"addressee"sourceAddressee), sourceAddressee));
                copy.setAddressee(copyAddressee);
            } else {
                copy.addressee = null;
            }
            if (this.!= null) {
                String sourceCountryCode;
                sourceCountryCode = this.getCountryCode();
                String copyCountryCode = ((Stringstrategy.copy(LocatorUtils.property(locator"countryCode"sourceCountryCode), sourceCountryCode));
                copy.setCountryCode(copyCountryCode);
            } else {
                copy.countryCode = null;
            }
        }
        return target;
    }
    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 AbstractAddressType) {
            final AbstractAddressType target = this;
            final AbstractAddressType leftObject = ((AbstractAddressTypeleft);
            final AbstractAddressType rightObject = ((AbstractAddressTyperight);
            {
                String lhsAddressee;
                lhsAddressee = leftObject.getAddressee();
                String rhsAddressee;
                rhsAddressee = rightObject.getAddressee();
                target.setAddressee(((Stringstrategy.merge(LocatorUtils.property(leftLocator"addressee"lhsAddressee), LocatorUtils.property(rightLocator"addressee"rhsAddressee), lhsAddresseerhsAddressee)));
            }
            {
                String lhsCountryCode;
                lhsCountryCode = leftObject.getCountryCode();
                String rhsCountryCode;
                rhsCountryCode = rightObject.getCountryCode();
                target.setCountryCode(((Stringstrategy.merge(LocatorUtils.property(leftLocator"countryCode"lhsCountryCode), LocatorUtils.property(rightLocator"countryCode"rhsCountryCode), lhsCountryCoderhsCountryCode)));
            }
        }
    }
New to GrepCode? Check out our FAQ X