Package it.geosolutions.unredd.geostore.model

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


        }
    }

    protected void runScript(Resource chartScriptResource, Map<String, Object> properties) throws Exception {

        UNREDDChartScript chartScript = new UNREDDChartScript(chartScriptResource);
        String scriptPath = chartScript.getAttribute(UNREDDChartScript.Attributes.SCRIPTPATH);

        LOGGER.info("Running script '"+chartScriptResource.getName()+"' @ " + scriptPath);

        if(properties == null)
            properties = new HashMap();
View Full Code Here


  }


  public  static RESTResource createChartScriptResource(String name, String statsdef, String script){

        UNREDDChartScript chartScript = new UNREDDChartScript();
        chartScript.setAttribute(UNREDDChartScript.Attributes.SCRIPTPATH, script);
        chartScript.addReverseAttribute(ReverseAttributes.STATSDEF, statsdef);

    RESTResource res = chartScript.createRESTResource();
    res.setName(name);

    return res;
  }
View Full Code Here

        // add a chartscript as a test data
        File testScript = loadFile("configuration/script/testScript.groovy");
        LOGGER.info("Test groovy script is " + testScript);

        UNREDDChartScript chartScript = new UNREDDChartScript();
        chartScript.setAttribute(Attributes.SCRIPTPATH, testScript.getAbsolutePath());
        chartScript.addReverseAttribute(ReverseAttributes.STATSDEF, "area_admin1_fc13"); // any one is good

        RESTResource chartScriptRes = chartScript.createRESTResource();
        chartScriptRes.setName("testChartScript");
//        long chartScriptId = geostoreClient.insert(chartScriptRes);
        long chartScriptId = gstcu.insert(chartScriptRes);
//        Resource fullChartScript = geostoreClient.getResource(chartScriptId);
        Resource fullChartScript = gstcu.getGeoStoreClient().getResource(chartScriptId);
View Full Code Here

        // add a chartscript as a test data
        File testScript = loadFile("configuration/script/testScript.groovy");
        LOGGER.info("Test groovy script is " + testScript);

        UNREDDChartScript chartScript = new UNREDDChartScript();
        chartScript.setAttribute(Attributes.SCRIPTPATH, testScript.getAbsolutePath());
        chartScript.addReverseAttribute(ReverseAttributes.STATSDEF, STATSDEFNAME);

        RESTResource chartScriptRes = chartScript.createRESTResource();
        chartScriptRes.setName("testChartScript");
        gstcu.insert(chartScriptRes);
//        Resource fullChartScript = gstcu.getGeoStoreClient().getResource(chartScriptId);

        SearchFilter chartDataFilter = new CategoryFilter(UNREDDCategories.CHARTDATA.getName(), SearchOperator.EQUAL_TO);
View Full Code Here

        // add a chartscript as a test data
        {
            File testScript = loadFile("configuration/script/testScript.groovy");
            LOGGER.info("Test groovy script is " + testScript);

            UNREDDChartScript chartScript = new UNREDDChartScript();
            chartScript.setAttribute(Attributes.SCRIPTPATH, testScript.getAbsolutePath());
            chartScript.addReverseAttribute(ReverseAttributes.STATSDEF, "area_admin1_fc13"); // any one is good

            RESTResource chartScriptRes = chartScript.createRESTResource();
            chartScriptRes.setName("testChartScript");
            gstcu.insert(chartScriptRes);
        }

//        Resource fullChartScript = gstcu.getGeoStoreClient().getResource(chartScriptId);
View Full Code Here

        // insert chartScript
        {
            File testScript = loadFile("configuration/script/testScript.groovy");
            LOGGER.info("Test groovy script is " + testScript);

            UNREDDChartScript chartScript = new UNREDDChartScript();
            chartScript.setAttribute(Attributes.SCRIPTPATH, testScript.getAbsolutePath());
            chartScript.addReverseAttribute(ReverseAttributes.STATSDEF, STATSDEFNAME);

            RESTResource chartScriptRes = chartScript.createRESTResource();
            chartScriptRes.setName("testChartScript");
            gstcu.insert(chartScriptRes);
        }

        LOGGER.info("--------------- Data setup complete-- running real test ----------");
View Full Code Here

TOP

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

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.