com.disdar.api.model.DocumentAnalysisRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of disdar-api-client-java Show documentation
Show all versions of disdar-api-client-java Show documentation
A simple Java client for the DISDAR extraction service
package com.disdar.api.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.net.MalformedURLException;
import java.net.URL;
/**
* A class encapsulating all incoming arguments needed for the extraction process.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class DocumentAnalysisRequest {
@NotBlank
private String requestId;
@NotNull
private URL fileURL;
private URL callbackURL;
@JsonCreator
public DocumentAnalysisRequest(@JsonProperty("requestId") String requestId,
@JsonProperty("fileURL") URL fileURL,
@JsonProperty("callbackURL") URL callbackURL) throws MalformedURLException {
this.requestId = requestId;
this.fileURL = fileURL;
this.callbackURL = callbackURL;
}
public String getRequestId() {
return requestId;
}
public URL getFileURL() {
return fileURL;
}
public URL getCallbackURL() {
return callbackURL;
}
@Override
public boolean equals(Object obj) {
return EqualsBuilder.reflectionEquals(this, obj);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
@Override
public String toString() {
return "DocumentAnalysisRequest: "+requestId;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy