Examples of TopList


Examples of com.google.refine.preference.TopList

            writer.object();
            writer.key("value");
            if (pref == null || pref instanceof String || pref instanceof Number || pref instanceof Boolean) {
                writer.value(pref);
            } else if (pref instanceof TopList) {
                TopList tl = (TopList) pref;
                tl.write(writer, new Properties());
            } else {
                writer.value(pref.toString());
            }
           
            writer.endObject();
View Full Code Here

Examples of com.google.refine.preference.TopList

    @Override
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String expression = request.getParameter("expression");

        TopList starredExpressions = ((TopList) ProjectManager.singleton.getPreferenceStore().get(
                "scripting.starred-expressions"));

        if (starredExpressions.getList().contains(expression)) {
            starredExpressions.remove(expression);
        } else {
            starredExpressions.add(expression);
        }

        if(request.getParameter("returnList") != null) {
            try {
                response.setCharacterEncoding("UTF-8");
View Full Code Here

Examples of com.google.refine.preference.TopList

    /**
    *
    * @param ps
    */
   static protected void preparePreferenceStore(PreferenceStore ps) {
       ps.put("scripting.expressions", new TopList(s_expressionHistoryMax));
       ps.put("scripting.starred-expressions", new TopList(Integer.MAX_VALUE));
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.