com.mindee.product.custom.CustomV1Page Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mindee-api-java Show documentation
Show all versions of mindee-api-java Show documentation
Java Library to call Mindee's Off-The-Shelf and Custom APIs
package com.mindee.product.custom;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.mindee.parsing.SummaryHelper;
import com.mindee.parsing.custom.ListField;
import java.util.HashMap;
import java.util.TreeMap;
import lombok.EqualsAndHashCode;
import lombok.Getter;
/**
* Page data for custom documents, API version 1.x.
*/
@Getter
@EqualsAndHashCode
@JsonIgnoreProperties(ignoreUnknown = true)
public class CustomV1Page extends HashMap {
@Override
public String toString() {
TreeMap sorted = new TreeMap<>(this);
StringBuilder summary = new StringBuilder();
for (Entry entry : sorted.entrySet()) {
summary.append(String.format(":%s: %s%n", entry.getKey(), entry.getValue()));
}
return SummaryHelper.cleanSummary(summary.toString());
}
}