Package org.geoserver.monitor

Examples of org.geoserver.monitor.MonitorQuery


        return "OWS Request Summary";
    }
   
    @Override
    protected Map<String,Integer> gatherData(Monitor monitor) {
        MonitorQuery q = new MonitorQuery();
        q.properties("owsService").filter("owsService", null, Comparison.NEQ);
       
        DataGatherer g = new DataGatherer();
        monitor.query(q, g);
       
        return g.getData();
View Full Code Here


    }
   
    @Override
    protected Map<String, Integer> gatherData(Monitor monitor) {
        DataGatherer g = new DataGatherer();
        monitor.query(new MonitorQuery().properties("owsOperation")
            .filter("owsService", owsService, Comparison.EQ), g);
       
        return g.getData();
    }
View Full Code Here

        static final Property<RequestData> STATUS = new BeanProperty("status", "status");
       
        @Override
        protected List<RequestData> getItems() {
            MonitorDAO dao = getApplication().getBeanOfType(Monitor.class).getDAO();
            MonitorQuery q = new MonitorQuery().filter("status",
                Arrays.asList(Status.RUNNING, Status.WAITING, Status.CANCELLING), Comparison.IN);
           
            return dao.getRequests(q);
        }
View Full Code Here

            }
        });
    }
   
    BufferedDynamicImageResource queryAndRenderChart(Monitor monitor, Date[] range) {
        MonitorQuery q = new MonitorQuery();
        q.properties("startTime").between(range[0], range[1]);
       
        DataGatherer gatherer = new DataGatherer();
        monitor.query(q, gatherer);
       
        HashMap<RegularTimePeriod,Integer> data = gatherer.getData();
View Full Code Here

           
            // date range
            String from = form.getFirstValue("from");
            String to = form.getFirstValue("to");

            MonitorQuery q = new MonitorQuery().between(
                from != null ? Converters.convert(from, Date.class) : null,
                to != null ? Converters.convert(to, Date.class) : null);
           
            //sorting
            String sortBy;
            SortOrder sortOrder;
           
            String order = form.getFirstValue("order");
            if (order != null) {
                int semi = order.indexOf(';');
                if (semi != -1) {
                    String[] split = order.split(";");
                    sortBy = split[0];
                    sortOrder = SortOrder.valueOf(split[1]);
                }
                else {
                    sortBy = order;
                    sortOrder = SortOrder.ASC;
                }
               
                q.sort(sortBy, sortOrder);
            }
           
            //limit offset
            String offset = form.getFirstValue("offset");
            String count = form.getFirstValue("count");
            q.page(offset != null ? Long.parseLong(offset) : null,
                count != null ? Long.parseLong(count) : null);
           
            //live?
            String live = form.getFirstValue("live");
            if (live != null) {
                if ("yes".equalsIgnoreCase(live) || "true".equalsIgnoreCase(live)) {
                    q.filter("status", Arrays.asList(
                        org.geoserver.monitor.RequestData.Status.RUNNING,
                        org.geoserver.monitor.RequestData.Status.WAITING,
                        org.geoserver.monitor.RequestData.Status.CANCELLING), Comparison.IN);
                }
                else {
                    q.filter("status", Arrays.asList(
                        org.geoserver.monitor.RequestData.Status.FINISHED,
                        org.geoserver.monitor.RequestData.Status.FAILED), Comparison.IN);
                }
            }
           
View Full Code Here

TOP

Related Classes of org.geoserver.monitor.MonitorQuery

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.