Package it.geosolutions.unredd.geostore.model

Examples of it.geosolutions.unredd.geostore.model.UNREDDStatsData


        return res;
  }

  public  static RESTResource createStatsDataResource(String statsDefName, String year, String month, String day, String content){

        UNREDDStatsData statsData = new UNREDDStatsData();

        statsData.setAttribute(UNREDDStatsData.Attributes.STATSDEF, statsDefName);
        statsData.setAttribute(UNREDDStatsData.Attributes.YEAR, year);
    if (month!=null) {
            statsData.setAttribute(UNREDDStatsData.Attributes.MONTH, month);
        }

        RESTResource res = statsData.createRESTResource();
    res.setName(NameUtils.buildStatsDataName(statsDefName, year, month, day));
        res.setData(content);
       
        return res;
  }
View Full Code Here


    private static CategoryFilter createCategoryFilter(UNREDDCategories category) {
        return new CategoryFilter(category.getName(), SearchOperator.EQUAL_TO);
    }

    protected static RESTResource createStatsDataResource(String statsDefName, String year, String month, String day, String csv) {
        UNREDDStatsData statsData = new UNREDDStatsData();
        statsData.setAttribute(UNREDDStatsData.Attributes.STATSDEF, statsDefName);
        statsData.setAttribute(UNREDDStatsData.Attributes.YEAR, year);
        if (month != null) {
            statsData.setAttribute(UNREDDStatsData.Attributes.MONTH, month);
        }
        if (day != null) {
            statsData.setAttribute(UNREDDStatsData.Attributes.DAY, day);
        }

        RESTResource res = statsData.createRESTResource();

        String resName = NameUtils.buildStatsDataName(statsDefName, year, month, day);
        res.setName(resName);

        RESTStoredData storedData = new RESTStoredData();
View Full Code Here

        UNREDDGeoStoreTestUtil.deleteResources(UNREDDCategories.STATSDATA);

        long id = UNREDDGeoStoreTestUtil.insertStatsData("sdata1", "2010", "1", null, "data01");

        Resource res = gstcu.getFullResource(id);
        UNREDDStatsData sd = new UNREDDStatsData(res);

        assertEquals("sdata1_2010-01", res.getName());
        assertEquals("2010", sd.getAttribute(it.geosolutions.unredd.geostore.model.UNREDDStatsData.Attributes.YEAR));
        assertEquals("1", sd.getAttribute(it.geosolutions.unredd.geostore.model.UNREDDStatsData.Attributes.MONTH));

    }
View Full Code Here

TOP

Related Classes of it.geosolutions.unredd.geostore.model.UNREDDStatsData

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.