SimpleReference.java

package info.textgrid.services.textapi.apiv2;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
 * Simple reference for a manifest inside a TextAPI v2 Collection.
 * Holds the manifest IRI (id) and a short title taken from the
 * metadata of the referenced manifest.
 */
@JsonPropertyOrder({
    "id",
    "shortTitle"
})
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SimpleReference {

    private String id;
    private String shortTitle;

    /**
     * Required manifest IRI.
     */
    public String getId() {
        return id;
    }

    public SimpleReference setId(String id) {
        this.id = id;
        return this;
    }

    /**
     * Short title of the referenced manifest, extracted from its metadata.
     */
    public String getShortTitle() {
        return shortTitle;
    }

    public SimpleReference setShortTitle(String shortTitle) {
        this.shortTitle = shortTitle;
        return this;
    }
}