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, v2.2.11 
  // 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: 2015.04.16 at 07:39:09 AM CEST 
  //
  
  
  package net.opengis.iso19139.gmd.v_20060504;
 
 import java.util.List;
Information about the distributor of and options for obtaining the dataset

Java class for MD_Distribution_Type complex type.

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

 <complexType name="MD_Distribution_Type">
   <complexContent>
     <extension base="{http://www.isotc211.org/2005/gco}AbstractObject_Type">
       <sequence>
         <element name="distributionFormat" type="{http://www.isotc211.org/2005/gmd}MD_Format_PropertyType" maxOccurs="unbounded" minOccurs="0"/>
         <element name="distributor" type="{http://www.isotc211.org/2005/gmd}MD_Distributor_PropertyType" maxOccurs="unbounded" minOccurs="0"/>
         <element name="transferOptions" type="{http://www.isotc211.org/2005/gmd}MD_DigitalTransferOptions_PropertyType" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
     </extension>
   </complexContent>
 </complexType>
 
 
 @XmlType(name = "MD_Distribution_Type", propOrder = {
     "distributionFormat",
     "distributor",
     "transferOptions"
 })
 public class MDDistributionType
     extends AbstractObjectType
     implements CloneableCopyToEqualsHashCodeMergeFromToString
 {
 
Gets the value of the distributionFormat 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 distributionFormat property.

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

    getDistributionFormat().add(newItem);
 

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

 
         if ( == null) {
              = new ArrayList<MDFormatPropertyType>();
        }
        return this.;
    }

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

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

    getDistributor().add(newItem);
 

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

        if ( == null) {
             = new ArrayList<MDDistributorPropertyType>();
        }
        return this.;
    }

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

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

    getTransferOptions().add(newItem);
 

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

        if ( == null) {
        }
        return this.;
    }
    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);
        {
            List<MDFormatPropertyTypetheDistributionFormat;
            theDistributionFormat = (((this.!= null)&&(!this..isEmpty()))?this.getDistributionFormat():null);
            strategy.appendField(locatorthis"distributionFormat"buffertheDistributionFormat);
        }
        {
            List<MDDistributorPropertyTypetheDistributor;
            theDistributor = (((this.!= null)&&(!this..isEmpty()))?this.getDistributor():null);
            strategy.appendField(locatorthis"distributor"buffertheDistributor);
        }
        {
            List<MDDigitalTransferOptionsPropertyTypetheTransferOptions;
            theTransferOptions = (((this.!= null)&&(!this..isEmpty()))?this.getTransferOptions():null);
            strategy.appendField(locatorthis"transferOptions"buffertheTransferOptions);
        }
        return buffer;
    }
    public boolean equals(ObjectLocator thisLocatorObjectLocator thatLocatorObject objectEqualsStrategy strategy) {
        if (!(object instanceof MDDistributionType)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        if (!super.equals(thisLocatorthatLocatorobjectstrategy)) {
            return false;
        }
        final MDDistributionType that = ((MDDistributionTypeobject);
        {
            List<MDFormatPropertyTypelhsDistributionFormat;
            lhsDistributionFormat = (((this.!= null)&&(!this..isEmpty()))?this.getDistributionFormat():null);
            List<MDFormatPropertyTyperhsDistributionFormat;
            rhsDistributionFormat = (((that.distributionFormat!= null)&&(!that.distributionFormat.isEmpty()))?that.getDistributionFormat():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator"distributionFormat"lhsDistributionFormat), LocatorUtils.property(thatLocator"distributionFormat"rhsDistributionFormat), lhsDistributionFormatrhsDistributionFormat)) {
                return false;
            }
        }
        {
            List<MDDistributorPropertyTypelhsDistributor;
            lhsDistributor = (((this.!= null)&&(!this..isEmpty()))?this.getDistributor():null);
            List<MDDistributorPropertyTyperhsDistributor;
            rhsDistributor = (((that.distributor!= null)&&(!that.distributor.isEmpty()))?that.getDistributor():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator"distributor"lhsDistributor), LocatorUtils.property(thatLocator"distributor"rhsDistributor), lhsDistributorrhsDistributor)) {
                return false;
            }
        }
        {
            List<MDDigitalTransferOptionsPropertyTypelhsTransferOptions;
            lhsTransferOptions = (((this.!= null)&&(!this..isEmpty()))?this.getTransferOptions():null);
            List<MDDigitalTransferOptionsPropertyTyperhsTransferOptions;
            rhsTransferOptions = (((that.transferOptions!= null)&&(!that.transferOptions.isEmpty()))?that.getTransferOptions():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator"transferOptions"lhsTransferOptions), LocatorUtils.property(thatLocator"transferOptions"rhsTransferOptions), lhsTransferOptionsrhsTransferOptions)) {
                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);
        {
            List<MDFormatPropertyTypetheDistributionFormat;
            theDistributionFormat = (((this.!= null)&&(!this..isEmpty()))?this.getDistributionFormat():null);
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"distributionFormat"theDistributionFormat), currentHashCodetheDistributionFormat);
        }
        {
            List<MDDistributorPropertyTypetheDistributor;
            theDistributor = (((this.!= null)&&(!this..isEmpty()))?this.getDistributor():null);
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"distributor"theDistributor), currentHashCodetheDistributor);
        }
        {
            List<MDDigitalTransferOptionsPropertyTypetheTransferOptions;
            theTransferOptions = (((this.!= null)&&(!this..isEmpty()))?this.getTransferOptions():null);
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"transferOptions"theTransferOptions), currentHashCodetheTransferOptions);
        }
        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 MDDistributionType) {
            final MDDistributionType copy = ((MDDistributionTypedraftCopy);
            if ((this.!= null)&&(!this..isEmpty())) {
                List<MDFormatPropertyTypesourceDistributionFormat;
                sourceDistributionFormat = (((this.!= null)&&(!this..isEmpty()))?this.getDistributionFormat():null);
                @SuppressWarnings("unchecked")
                List<MDFormatPropertyTypecopyDistributionFormat = ((List<MDFormatPropertyType> ) strategy.copy(LocatorUtils.property(locator"distributionFormat"sourceDistributionFormat), sourceDistributionFormat));
                copy.distributionFormat = null;
                if (copyDistributionFormat!= null) {
                    List<MDFormatPropertyTypeuniqueDistributionFormatl = copy.getDistributionFormat();
                    uniqueDistributionFormatl.addAll(copyDistributionFormat);
                }
            } else {
                copy.distributionFormat = null;
            }
            if ((this.!= null)&&(!this..isEmpty())) {
                List<MDDistributorPropertyTypesourceDistributor;
                sourceDistributor = (((this.!= null)&&(!this..isEmpty()))?this.getDistributor():null);
                @SuppressWarnings("unchecked")
                List<MDDistributorPropertyTypecopyDistributor = ((List<MDDistributorPropertyType> ) strategy.copy(LocatorUtils.property(locator"distributor"sourceDistributor), sourceDistributor));
                copy.distributor = null;
                if (copyDistributor!= null) {
                    List<MDDistributorPropertyTypeuniqueDistributorl = copy.getDistributor();
                    uniqueDistributorl.addAll(copyDistributor);
                }
            } else {
                copy.distributor = null;
            }
            if ((this.!= null)&&(!this..isEmpty())) {
                List<MDDigitalTransferOptionsPropertyTypesourceTransferOptions;
                sourceTransferOptions = (((this.!= null)&&(!this..isEmpty()))?this.getTransferOptions():null);
                @SuppressWarnings("unchecked")
                List<MDDigitalTransferOptionsPropertyTypecopyTransferOptions = ((List<MDDigitalTransferOptionsPropertyType> ) strategy.copy(LocatorUtils.property(locator"transferOptions"sourceTransferOptions), sourceTransferOptions));
                copy.transferOptions = null;
                if (copyTransferOptions!= null) {
                    List<MDDigitalTransferOptionsPropertyTypeuniqueTransferOptionsl = copy.getTransferOptions();
                    uniqueTransferOptionsl.addAll(copyTransferOptions);
                }
            } else {
                copy.transferOptions = null;
            }
        }
        return draftCopy;
    }
    public Object createNewInstance() {
        return new MDDistributionType();
    }
    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 MDDistributionType) {
            final MDDistributionType target = this;
            final MDDistributionType leftObject = ((MDDistributionTypeleft);
            final MDDistributionType rightObject = ((MDDistributionTyperight);
            {
                List<MDFormatPropertyTypelhsDistributionFormat;
                lhsDistributionFormat = (((leftObject.distributionFormat!= null)&&(!leftObject.distributionFormat.isEmpty()))?leftObject.getDistributionFormat():null);
                List<MDFormatPropertyTyperhsDistributionFormat;
                rhsDistributionFormat = (((rightObject.distributionFormat!= null)&&(!rightObject.distributionFormat.isEmpty()))?rightObject.getDistributionFormat():null);
                List<MDFormatPropertyTypemergedDistributionFormat = ((List<MDFormatPropertyType> ) strategy.merge(LocatorUtils.property(leftLocator"distributionFormat"lhsDistributionFormat), LocatorUtils.property(rightLocator"distributionFormat"rhsDistributionFormat), lhsDistributionFormatrhsDistributionFormat));
                target.distributionFormat = null;
                if (mergedDistributionFormat!= null) {
                    List<MDFormatPropertyTypeuniqueDistributionFormatl = target.getDistributionFormat();
                    uniqueDistributionFormatl.addAll(mergedDistributionFormat);
                }
            }
            {
                List<MDDistributorPropertyTypelhsDistributor;
                lhsDistributor = (((leftObject.distributor!= null)&&(!leftObject.distributor.isEmpty()))?leftObject.getDistributor():null);
                List<MDDistributorPropertyTyperhsDistributor;
                rhsDistributor = (((rightObject.distributor!= null)&&(!rightObject.distributor.isEmpty()))?rightObject.getDistributor():null);
                List<MDDistributorPropertyTypemergedDistributor = ((List<MDDistributorPropertyType> ) strategy.merge(LocatorUtils.property(leftLocator"distributor"lhsDistributor), LocatorUtils.property(rightLocator"distributor"rhsDistributor), lhsDistributorrhsDistributor));
                target.distributor = null;
                if (mergedDistributor!= null) {
                    List<MDDistributorPropertyTypeuniqueDistributorl = target.getDistributor();
                    uniqueDistributorl.addAll(mergedDistributor);
                }
            }
            {
                List<MDDigitalTransferOptionsPropertyTypelhsTransferOptions;
                lhsTransferOptions = (((leftObject.transferOptions!= null)&&(!leftObject.transferOptions.isEmpty()))?leftObject.getTransferOptions():null);
                List<MDDigitalTransferOptionsPropertyTyperhsTransferOptions;
                rhsTransferOptions = (((rightObject.transferOptions!= null)&&(!rightObject.transferOptions.isEmpty()))?rightObject.getTransferOptions():null);
                List<MDDigitalTransferOptionsPropertyTypemergedTransferOptions = ((List<MDDigitalTransferOptionsPropertyType> ) strategy.merge(LocatorUtils.property(leftLocator"transferOptions"lhsTransferOptions), LocatorUtils.property(rightLocator"transferOptions"rhsTransferOptions), lhsTransferOptionsrhsTransferOptions));
                target.transferOptions = null;
                if (mergedTransferOptions!= null) {
                    List<MDDigitalTransferOptionsPropertyTypeuniqueTransferOptionsl = target.getTransferOptions();
                    uniqueTransferOptionsl.addAll(mergedTransferOptions);
                }
            }
        }
    }
    public void setDistributionFormat(List<MDFormatPropertyTypevalue) {
        this. = null;
        List<MDFormatPropertyTypedraftl = this.getDistributionFormat();
        draftl.addAll(value);
    }
    public void setDistributor(List<MDDistributorPropertyTypevalue) {
        this. = null;
        List<MDDistributorPropertyTypedraftl = this.getDistributor();
        draftl.addAll(value);
    }
        this. = null;
        draftl.addAll(value);
    }
        if (values!= null) {
            for (MDFormatPropertyType valuevalues) {
                getDistributionFormat().add(value);
            }
        }
        return this;
    }
        if (values!= null) {
            getDistributionFormat().addAll(values);
        }
        return this;
    }
        if (values!= null) {
            for (MDDistributorPropertyType valuevalues) {
                getDistributor().add(value);
            }
        }
        return this;
    }
        if (values!= null) {
            getDistributor().addAll(values);
        }
        return this;
    }
        if (values!= null) {
            for (MDDigitalTransferOptionsPropertyType valuevalues) {
                getTransferOptions().add(value);
            }
        }
        return this;
    }
        if (values!= null) {
            getTransferOptions().addAll(values);
        }
        return this;
    }
        setDistributionFormat(value);
        return this;
    }
        setDistributor(value);
        return this;
    }
        setTransferOptions(value);
        return this;
    }
    @Override
    public MDDistributionType withId(String value) {
        setId(value);
        return this;
    }
    @Override
    public MDDistributionType withUuid(String value) {
        setUuid(value);
        return this;
    }
New to GrepCode? Check out our FAQ X