/** * ============================================================================= * * ORCID (R) Open Source * http://orcid.org * * Copyright (c) 2012-2014 ORCID, Inc. * Licensed under an MIT-Style License (MIT) * http://orcid.org/open-source-license * * This copyright and license information (including a link to the full license) * shall be included in its entirety in all copies or substantial portion of * the software. * * ============================================================================= */ package org.orcid.jaxb.model.record.summary_rc3; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.orcid.jaxb.model.common_rc3.LastModifiedDate; import org.orcid.jaxb.model.record_rc3.ActivitiesContainer; import org.orcid.jaxb.model.record_rc3.Activity; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(propOrder = { "lastModifiedDate", "summaries" }) @XmlRootElement(name = "educations", namespace = "http://www.orcid.org/ns/activities") public class Educations implements ActivitiesContainer, Serializable { private static final long serialVersionUID = 3293976926416154039L; @XmlElement(name = "last-modified-date", namespace = "http://www.orcid.org/ns/common") protected LastModifiedDate lastModifiedDate; @XmlElement(name = "education-summary", namespace = "http://www.orcid.org/ns/education") private List<EducationSummary> summaries; public List<EducationSummary> getSummaries() { if (summaries == null) summaries = new ArrayList<>(); return summaries; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((summaries == null) ? 0 : summaries.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Educations other = (Educations) obj; if (summaries == null) { if (other.summaries != null) return false; } else if (!summaries.equals(other.summaries)) return false; return true; } public LastModifiedDate getLastModifiedDate() { return lastModifiedDate; } public void setLastModifiedDate(LastModifiedDate lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } @Override public Map<Long, ? extends Activity> retrieveActivitiesAsMap() { throw new UnsupportedOperationException("Not implemented yet"); } @Override public Collection<? extends Activity> retrieveActivities() { return (Collection<? extends Activity>) summaries; } }