All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hp.autonomy.iod.client.api.search.GetContentRequestBuilder Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
package com.hp.autonomy.iod.client.api.search;

import com.hp.autonomy.iod.client.util.MultiMap;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.Map;

/**
 * Helper class for building up optional parameters for the Get Content API. The default value for all parameters
 * is null. Null parameters will not be sent to IDOL OnDemand
 */
@Setter
@Accessors(chain = true)
public class GetContentRequestBuilder {

    /**
     * @param highlightExpression Value for the highlight_expression parameter
     */
    private String highlightExpression;

    /**
     * @param startTag Value for the start_tag parameter
     */
    private String startTag;

    /**
     * @param endTag Value for the end_tag parameter
     */
    private String endTag;

    /**
     * @param printFields Value for the print_fields parameter
     */
    private String printFields;

    /**
     * @param print Value for the print parameter
     */
    private Print print;

    /**
     * @return A map of query parameters suitable for use with {@link QueryTextIndexService}. get is NOT supported on
     * the resulting map
     */
    public Map build() {
        final Map map = new MultiMap<>();
        map.put("highlight_expression", highlightExpression);
        map.put("start_tag", startTag);
        map.put("end_tag", endTag);
        map.put("print", print);
        map.put("print_fields", printFields);

        return map;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy