/** * ============================================================================= * * 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.groupid_rc3; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; 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.CreatedDate; import org.orcid.jaxb.model.common_rc3.LastModifiedDate; import org.orcid.jaxb.model.common_rc3.Source; import org.orcid.jaxb.model.record_rc3.SourceAware; import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.annotations.ApiModelProperty; /** * <p> * Java class for anonymous complex type. * * <p> * The following schema fragment specifies the expected content contained within * this class. * * <pre> * <complexType> * <complexContent> * <extension base="{http://www.orcid.org/ns/common}source-type"> * <sequence> * <element name="name" type="{http://www.orcid.org/ns/common}string-1000"/> * <element name="group-id"> * <simpleType> * <restriction base="{http://www.orcid.org/ns/common}string-1000"> * <pattern value="(ringgold:|issn:|orcid-generated:|fundref:).*"/> * </restriction> * </simpleType> * </element> * <element name="description" type="{http://www.orcid.org/ns/common}non-empty-string"/> * <element name="type"> * <simpleType> * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> * <enumeration value="publisher"/> * <enumeration value="institution"/> * <enumeration value="journal"/> * <enumeration value="conference"/> * <enumeration value="newspaper"/> * <enumeration value="newsletter"/> * <enumeration value="magazine"/> * </restriction> * </simpleType> * </element> * </sequence> * </extension> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(propOrder = { "lastModifiedDate", "createdDate", "name", "groupId", "description", "type", "source", "putCode" }) @XmlRootElement(name = "group-id-record", namespace = "http://www.orcid.org/ns/group-id") public class GroupIdRecord implements Serializable, SourceAware { private static final long serialVersionUID = 1516751098639982549L; @XmlElement(namespace = "http://www.orcid.org/ns/group-id", required = true) protected String name; @XmlElement(name = "group-id", namespace = "http://www.orcid.org/ns/group-id", required = true) protected String groupId; @XmlElement(namespace = "http://www.orcid.org/ns/group-id", required = true) protected String description; @XmlElement(namespace = "http://www.orcid.org/ns/group-id", required = true) protected String type; @XmlElement(namespace = "http://www.orcid.org/ns/common") @JsonIgnore protected Source source; @XmlAttribute(name = "put-code") @ApiModelProperty(hidden = true) @JsonIgnore protected Long putCode; @JsonIgnore @XmlElement(name = "last-modified-date", namespace = "http://www.orcid.org/ns/common") protected LastModifiedDate lastModifiedDate; @JsonIgnore @XmlElement(name = "created-date", namespace = "http://www.orcid.org/ns/common") protected CreatedDate createdDate; /** * Gets the value of the name property. * * @return possible object is {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the groupId property. * * @return possible object is {@link String } * */ public String getGroupId() { return groupId; } /** * Sets the value of the groupId property. * * @param value * allowed object is {@link String } * */ public void setGroupId(String value) { this.groupId = value; } /** * Gets the value of the description property. * * @return possible object is {@link String } * */ public String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is {@link String } * */ public void setDescription(String value) { this.description = value; } /** * Gets the value of the type property. * * @return possible object is {@link String } * */ public String getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is {@link String } * */ public void setType(String value) { this.type = value; } public Source getSource() { return source; } public void setSource(Source source) { this.source = source; } public Long getPutCode() { return putCode; } public void setPutCode(Long putCode) { this.putCode = putCode; } public LastModifiedDate getLastModifiedDate() { return lastModifiedDate; } public void setLastModifiedDate(LastModifiedDate lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } public CreatedDate getCreatedDate() { return createdDate; } public void setCreatedDate(CreatedDate createdDate) { this.createdDate = createdDate; } public String retrieveSourcePath() { if (source == null) { return null; } return source.retrieveSourcePath(); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((createdDate == null) ? 0 : createdDate.hashCode()); result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((groupId == null) ? 0 : groupId.hashCode()); result = prime * result + ((lastModifiedDate == null) ? 0 : lastModifiedDate.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((putCode == null) ? 0 : putCode.hashCode()); result = prime * result + ((source == null) ? 0 : source.hashCode()); result = prime * result + ((type == null) ? 0 : type.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; GroupIdRecord other = (GroupIdRecord) obj; if (createdDate == null) { if (other.createdDate != null) return false; } else if (!createdDate.equals(other.createdDate)) return false; if (description == null) { if (other.description != null) return false; } else if (!description.equals(other.description)) return false; if (groupId == null) { if (other.groupId != null) return false; } else if (!groupId.equals(other.groupId)) return false; if (lastModifiedDate == null) { if (other.lastModifiedDate != null) return false; } else if (!lastModifiedDate.equals(other.lastModifiedDate)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (putCode == null) { if (other.putCode != null) return false; } else if (!putCode.equals(other.putCode)) return false; if (source == null) { if (other.source != null) return false; } else if (!source.equals(other.source)) return false; if (type == null) { if (other.type != null) return false; } else if (!type.equals(other.type)) return false; return true; } }