Examples of RestResource


Examples of it.geosolutions.geostore.services.rest.model.RESTResource

                createAttributeFilter(UNREDDChartData.Attributes.PUBLISHED, "true"));
        return search(filter, false);
    }

    public void insertLayerUpdate(String layername, String year, String month, String day) throws GeoStoreException {
        RESTResource res = createLayerUpdate(layername, year, month, day);
        try {
            insert(res);
        } catch (Exception e) {
            LOGGER.error("Error while inserting LayerUpdate: " + res, e);
            throw new GeoStoreException("Error while inserting LayerUpdate on Layer " + layername, e);
View Full Code Here

Examples of it.geosolutions.geostore.services.rest.model.RESTResource

        }
        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();
        storedData.setData(csv);

        res.setStore(storedData);

        return res;
    }
View Full Code Here

Examples of it.geosolutions.geostore.services.rest.model.RESTResource

        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

Examples of it.geosolutions.geostore.services.rest.model.RESTResource

            layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.MONTH, month);
        }
        if (day != null) {
            layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.DAY, day);
        }
        RESTResource res = layerUpdate.createRESTResource();
        String resName = NameUtils.buildLayerUpdateName(layername, year, month, day);
        res.setName(resName);
        return res;
    }
View Full Code Here

Examples of it.geosolutions.geostore.services.rest.model.RESTResource

        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);
        ShortResourceList res0 = gstcu.getGeoStoreClient().searchResources(chartDataFilter);
View Full Code Here

Examples of it.geosolutions.geostore.services.rest.model.RESTResource

        }
       
        // this part creates the file to feed the GeoStoreAction
        File tmpFile = null;
        try {
            RESTResource resource = new RESTResource(); // this is just a packaging for id+data
            resource.setId(id);
            resource.setData(data);           
            tmpFile = File.createTempFile("UpdateData", ".xml", tempDir);
            Marshaller m = JAXBMarshallerBuilder.getJAXBMarshaller(resource.getClass());
            m.marshal(resource, tmpFile);

            GeostoreActionConfiguration geoStoreCfg = createConfiguration();
            geoStoreCfg.setShortResource(true);
            geoStoreCfg.setOperation(GeostoreOperation.Operation.UPDATEDATA);
View Full Code Here

Examples of it.geosolutions.geostore.services.rest.model.RESTResource

     */
    @Override
    public void delete(long id) throws GeoStoreException {

        try {
            RESTResource resource = new RESTResource();
            resource.setId(id);

            // this part creates the file to feed the GeoStoreAction
            File inputFile = File.createTempFile("Delete", ".xml", tempDir);
            Marshaller m = JAXBMarshallerBuilder.getJAXBMarshaller(resource.getClass());
            m.marshal(resource, inputFile);

            GeostoreActionConfiguration geoStoreCfg = createConfiguration();
            geoStoreCfg.setShortResource(true);
            geoStoreCfg.setOperation(GeostoreOperation.Operation.DELETE);
View Full Code Here

Examples of it.geosolutions.geostore.services.rest.model.RESTResource

        }

    }

    public static Long insertStatsDef(String statsdefname, String content, String layer) {
        RESTResource statsDefRRes = UNREDDResourceBuilder.createStatsDefResource(statsdefname, content, layer);
        return geostoreClient1.insert(statsDefRRes);
    }
View Full Code Here

Examples of org.exoplatform.management.data.RestResource

      //
      if (annotation != null)
      {
         String name = annotation.path();
         ResourceKey key = new ResourceKey(name);
         resourceMap.put(key, new RestResource(name, managedResource));
         return key;
      }

      //
      return null;
View Full Code Here

Examples of org.exoplatform.management.data.RestResource

        //
        if (annotation != null) {
            String name = annotation.path();
            ResourceKey key = new ResourceKey(name);
            resourceMap.put(key, new RestResource(name, managedResource));
            return key;
        }

        //
        return null;
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.