Package org.fao.geonet.repository.statistic

Examples of org.fao.geonet.repository.statistic.SearchRequestParamRepository


    public Element serviceSpecificExec(Element params, ServiceContext context) throws Exception {
        String field = Util.getParam(params, FIELD_PARAM);
        String service = Util.getParam(params, SERVICE_PARAM, "");
        int limit = Util.getParam(params, LIMIT_PARAM, DEFAULT_LIMIT);

        final SearchRequestParamRepository paramRepository = context.getBean(SearchRequestParamRepository.class);
        Specification<SearchRequestParam> specification = SearchRequestParamSpecs.hasTermField(field);
        if (!service.equals("")) {
            specification = Specifications.where(specification).and(SearchRequestParamSpecs.hasService(service));
        }

        final List<Pair<String, Integer>> termTextToRequestCount = paramRepository.getTermTextToRequestCount(limit,
                specification);
        return toElement(termTextToRequestCount);
    }
View Full Code Here

TOP

Related Classes of org.fao.geonet.repository.statistic.SearchRequestParamRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.