dnet-applications/apps/scholexplorer-api/src/main/java/eu/dnetlib/scholix/api/model/v1/ScholixIdentifier.java

99 lines
2.3 KiB
Java

package eu.dnetlib.scholix.api.model.v1;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects;
public class ScholixIdentifier {
@JsonProperty("identifier")
private String identifier = null;
@JsonProperty("schema")
private String schema = null;
public ScholixIdentifier Identifier(String ID) {
this.identifier = ID;
return this;
}
/**
* Get ID
* @return ID
**/
@Schema(description = "The value of the Identifier")
public String getIdentifier() {
return identifier;
}
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
public ScholixIdentifier Schema(String idScheme) {
this.schema = idScheme;
return this;
}
/**
* Get the Schema
* @return Schema
**/
@Schema(description = "The Schema URL of the identifier type")
public String getSchema() {
return schema;
}
public void setSchema(String schema) {
this.schema = schema;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ScholixIdentifier identifierType = (ScholixIdentifier) o;
return Objects.equals(this.identifier, identifierType.identifier) &&
Objects.equals(this.schema, identifierType.schema);
}
@Override
public int hashCode() {
return Objects.hash(identifier, schema);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IdentifierType {\n");
sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
sb.append(" schema: ").append(toIndentedString(schema)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}