io.cortical.retina.model.Text Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of retina-api-java-sdk Show documentation
Show all versions of retina-api-java-sdk Show documentation
cortical.io's java client - a simple java http client which simplifies communication between any java application and the Retina server using the Retina's REST API.
/*******************************************************************************
* Copyright (c) cortical.io GmbH. All rights reserved.
*
* This software is confidential and proprietary information.
* You shall use it only in accordance with the terms of the
* license agreement you entered into with cortical.io GmbH.
******************************************************************************/
package io.cortical.retina.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
/**
*
* Text model.
*/
@JsonRootName("text")
public class Text extends Model {
private String text;
private Fingerprint fingerprint;
/**
*
* Creates a new instance of {@link Text}.
*
*/
public Text() {
}
/**
* Creates a new instance of {@link Text}.
*
* @param text the actual text of the element
* @param positions the positions of the fingerprint representation of the text
*/
public Text(String text, int[] positions) {
this.text = text;
this.fingerprint = new Fingerprint(positions);
}
/**
* Creates a new instance of {@link Text}.
*
* @param text the actual text of the element
*/
public Text(String text) {
this.text = text;
}
/**
* Gets the text.
*
* @return the text
*/
@JsonProperty(SerializationConstants.TEXT_STRING_PROPERTYLABEL)
public String getText() {
return text;
}
/**
* Gets the fingerprint.
*
* @return the fingerprint
*/
@JsonProperty(SerializationConstants.FINGERPRINT_PROPERTY_LABEL)
public Fingerprint getFingerprint() {
return fingerprint;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy