Package com.google.refine.browsing.facets

Examples of com.google.refine.browsing.facets.Facet


            for (int i = 0; i < length; i++) {
                JSONObject fo = a.getJSONObject(i);
                String type = fo.has("type") ? fo.getString("type") : "list";

                Facet facet = null;
                if ("list".equals(type)) {
                    facet = new ListFacet();
                } else if ("range".equals(type)) {
                    facet = new RangeFacet();
                } else if ("timerange".equals(type)) {
                    facet = new TimeRangeFacet();
                } else if ("scatterplot".equals(type)) {
                    facet = new ScatterplotFacet();
                } else if ("text".equals(type)) {
                    facet = new TextSearchFacet();
                }

                if (facet != null) {
                    facet.initializeFromJSON(_project, fo);
                    _facets.add(facet);
                }
            }
        }
View Full Code Here

TOP

Related Classes of com.google.refine.browsing.facets.Facet

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.