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;
Identifiable collection of data

Java class for DS_DataSet_Type complex type.

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

 <complexType name="DS_DataSet_Type">
   <complexContent>
     <extension base="{http://www.isotc211.org/2005/gco}AbstractObject_Type">
       <sequence>
         <element name="has" type="{http://www.isotc211.org/2005/gmd}MD_Metadata_PropertyType" maxOccurs="unbounded"/>
         <element name="partOf" type="{http://www.isotc211.org/2005/gmd}DS_Aggregate_PropertyType" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
     </extension>
   </complexContent>
 </complexType>
 
 
 @XmlType(name = "DS_DataSet_Type", propOrder = {
     "has",
     "partOf"
 })
     MXDataSetType.class
 })
 public class DSDataSetType
     extends AbstractObjectType
     implements CloneableCopyToEqualsHashCodeMergeFromToString
 {
 
     @XmlElement(required = true)
     protected List<MDMetadataPropertyTypehas;
     protected List<DSAggregatePropertyTypepartOf;

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

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

    getHas().add(newItem);
 

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

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

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

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

    getPartOf().add(newItem);
 

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

        if ( == null) {
             = new ArrayList<DSAggregatePropertyType>();
        }
        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<MDMetadataPropertyTypetheHas;
            theHas = (((this.!= null)&&(!this..isEmpty()))?this.getHas():null);
            strategy.appendField(locatorthis"has"buffertheHas);
        }
        {
            List<DSAggregatePropertyTypethePartOf;
            thePartOf = (((this.!= null)&&(!this..isEmpty()))?this.getPartOf():null);
            strategy.appendField(locatorthis"partOf"bufferthePartOf);
        }
        return buffer;
    }
    public boolean equals(ObjectLocator thisLocatorObjectLocator thatLocatorObject objectEqualsStrategy strategy) {
        if (!(object instanceof DSDataSetType)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        if (!super.equals(thisLocatorthatLocatorobjectstrategy)) {
            return false;
        }
        final DSDataSetType that = ((DSDataSetTypeobject);
        {
            List<MDMetadataPropertyTypelhsHas;
            lhsHas = (((this.!= null)&&(!this..isEmpty()))?this.getHas():null);
            List<MDMetadataPropertyTyperhsHas;
            rhsHas = (((that.has!= null)&&(!that.has.isEmpty()))?that.getHas():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator"has"lhsHas), LocatorUtils.property(thatLocator"has"rhsHas), lhsHasrhsHas)) {
                return false;
            }
        }
        {
            List<DSAggregatePropertyTypelhsPartOf;
            lhsPartOf = (((this.!= null)&&(!this..isEmpty()))?this.getPartOf():null);
            List<DSAggregatePropertyTyperhsPartOf;
            rhsPartOf = (((that.partOf!= null)&&(!that.partOf.isEmpty()))?that.getPartOf():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator"partOf"lhsPartOf), LocatorUtils.property(thatLocator"partOf"rhsPartOf), lhsPartOfrhsPartOf)) {
                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<MDMetadataPropertyTypetheHas;
            theHas = (((this.!= null)&&(!this..isEmpty()))?this.getHas():null);
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"has"theHas), currentHashCodetheHas);
        }
        {
            List<DSAggregatePropertyTypethePartOf;
            thePartOf = (((this.!= null)&&(!this..isEmpty()))?this.getPartOf():null);
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"partOf"thePartOf), currentHashCodethePartOf);
        }
        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 DSDataSetType) {
            final DSDataSetType copy = ((DSDataSetTypedraftCopy);
            if ((this.!= null)&&(!this..isEmpty())) {
                List<MDMetadataPropertyTypesourceHas;
                sourceHas = (((this.!= null)&&(!this..isEmpty()))?this.getHas():null);
                @SuppressWarnings("unchecked")
                List<MDMetadataPropertyTypecopyHas = ((List<MDMetadataPropertyType> ) strategy.copy(LocatorUtils.property(locator"has"sourceHas), sourceHas));
                copy.has = null;
                if (copyHas!= null) {
                    List<MDMetadataPropertyTypeuniqueHasl = copy.getHas();
                    uniqueHasl.addAll(copyHas);
                }
            } else {
                copy.has = null;
            }
            if ((this.!= null)&&(!this..isEmpty())) {
                List<DSAggregatePropertyTypesourcePartOf;
                sourcePartOf = (((this.!= null)&&(!this..isEmpty()))?this.getPartOf():null);
                @SuppressWarnings("unchecked")
                List<DSAggregatePropertyTypecopyPartOf = ((List<DSAggregatePropertyType> ) strategy.copy(LocatorUtils.property(locator"partOf"sourcePartOf), sourcePartOf));
                copy.partOf = null;
                if (copyPartOf!= null) {
                    List<DSAggregatePropertyTypeuniquePartOfl = copy.getPartOf();
                    uniquePartOfl.addAll(copyPartOf);
                }
            } else {
                copy.partOf = null;
            }
        }
        return draftCopy;
    }
    public Object createNewInstance() {
        return new DSDataSetType();
    }
    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 DSDataSetType) {
            final DSDataSetType target = this;
            final DSDataSetType leftObject = ((DSDataSetTypeleft);
            final DSDataSetType rightObject = ((DSDataSetTyperight);
            {
                List<MDMetadataPropertyTypelhsHas;
                lhsHas = (((leftObject.has!= null)&&(!leftObject.has.isEmpty()))?leftObject.getHas():null);
                List<MDMetadataPropertyTyperhsHas;
                rhsHas = (((rightObject.has!= null)&&(!rightObject.has.isEmpty()))?rightObject.getHas():null);
                List<MDMetadataPropertyTypemergedHas = ((List<MDMetadataPropertyType> ) strategy.merge(LocatorUtils.property(leftLocator"has"lhsHas), LocatorUtils.property(rightLocator"has"rhsHas), lhsHasrhsHas));
                target.has = null;
                if (mergedHas!= null) {
                    List<MDMetadataPropertyTypeuniqueHasl = target.getHas();
                    uniqueHasl.addAll(mergedHas);
                }
            }
            {
                List<DSAggregatePropertyTypelhsPartOf;
                lhsPartOf = (((leftObject.partOf!= null)&&(!leftObject.partOf.isEmpty()))?leftObject.getPartOf():null);
                List<DSAggregatePropertyTyperhsPartOf;
                rhsPartOf = (((rightObject.partOf!= null)&&(!rightObject.partOf.isEmpty()))?rightObject.getPartOf():null);
                List<DSAggregatePropertyTypemergedPartOf = ((List<DSAggregatePropertyType> ) strategy.merge(LocatorUtils.property(leftLocator"partOf"lhsPartOf), LocatorUtils.property(rightLocator"partOf"rhsPartOf), lhsPartOfrhsPartOf));
                target.partOf = null;
                if (mergedPartOf!= null) {
                    List<DSAggregatePropertyTypeuniquePartOfl = target.getPartOf();
                    uniquePartOfl.addAll(mergedPartOf);
                }
            }
        }
    }
    public void setHas(List<MDMetadataPropertyTypevalue) {
        this. = null;
        List<MDMetadataPropertyTypedraftl = this.getHas();
        draftl.addAll(value);
    }
    public void setPartOf(List<DSAggregatePropertyTypevalue) {
        this. = null;
        List<DSAggregatePropertyTypedraftl = this.getPartOf();
        draftl.addAll(value);
    }
    public DSDataSetType withHas(MDMetadataPropertyType... values) {
        if (values!= null) {
            for (MDMetadataPropertyType valuevalues) {
                getHas().add(value);
            }
        }
        return this;
    }
        if (values!= null) {
            getHas().addAll(values);
        }
        return this;
    }
    public DSDataSetType withPartOf(DSAggregatePropertyType... values) {
        if (values!= null) {
            for (DSAggregatePropertyType valuevalues) {
                getPartOf().add(value);
            }
        }
        return this;
    }
        if (values!= null) {
            getPartOf().addAll(values);
        }
        return this;
    }
        setHas(value);
        return this;
    }
        setPartOf(value);
        return this;
    }
    @Override
    public DSDataSetType withId(String value) {
        setId(value);
        return this;
    }
    @Override
    public DSDataSetType withUuid(String value) {
        setUuid(value);
        return this;
    }
New to GrepCode? Check out our FAQ X