Examples of RestResource


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

    @Test
    public void testProperIngestVector() throws GeoStoreException, FlowException, ActionException {

        clearPlayfield();
        UNREDDLayer layer = buildVectorLayer();
        RESTResource layerResource = layer.createRESTResource();
        layerResource.setName("layer1");
        gstcu.insert(layerResource);

        //=== Data is set, prepare flow
        LOGGER.info("===== Run the code!");
        File inputFile = loadFile("context/RequestSHP.zip");
View Full Code Here

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

    return ret;
  }


    protected void doDelete(File xmlResourceFile) throws JAXBException, IOException {
        RESTResource restResource = (RESTResource) unmarshaller.unmarshal(xmlResourceFile);
        geostore.deleteResource(restResource.getId());       
    }
View Full Code Here

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

    }
 

    protected File doInsert(File xmlResourceFile) throws JAXBException, IOException {

        RESTResource restResource = (RESTResource) unmarshaller.unmarshal(xmlResourceFile);
        long resourceId = geostore.insert(restResource);
       
        Resource resource = geostore.getResource(resourceId);
        File outputInsertFile = File.createTempFile("gstinsert_", xmlResourceFile.getName(), getTempDir());
       
View Full Code Here

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

        return outputInsertFile;
    }
       
    protected File doUpdateData(File xmlResourceFile) throws JAXBException, IOException {

        RESTResource restResource = (RESTResource) unmarshaller.unmarshal(xmlResourceFile);
        long id = restResource.getId();
        String data = restResource.getStore().getData();
        geostore.setData(id, data);
        Resource resource = geostore.getResource(id);
        File outputInsertFile = File.createTempFile("gstupdate_", xmlResourceFile.getName(), getTempDir());
        Marshaller m = JAXBMarshallerBuilder.getJAXBMarshaller(resource.getClass());
        m.marshal(resource, outputInsertFile);
View Full Code Here

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

        layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.YEAR, year);
    if (month!=null) {
            layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.MONTH, month);
        }

        RESTResource res = layerUpdate.createRESTResource();
    res.setName(NameUtils.buildLayerUpdateName(name, year, month, day));
        res.setData(content);

        return res;
  }
View Full Code Here

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

   */
  public  static RESTResource createLayerResource(String name, List<ShortAttribute> optionalAttributes){
        UNREDDLayer layer = new UNREDDLayer();
//        layer.setAttribute(Attributes.DESTRELATIVEPATH, path);

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

    if (optionalAttributes!=null) {
            res.getAttribute().addAll(optionalAttributes);
    }

        return res;
  }
View Full Code Here

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

        UNREDDStatsDef statsDef = new UNREDDStatsDef();

        statsDef.addReverseAttribute(UNREDDStatsDef.ReverseAttributes.LAYER, layers);

        RESTResource res = statsDef.createRESTResource();
        res.setName(name);
        res.setData(xml);

        return res;
  }
View Full Code Here

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

        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

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

        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

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

        }
    }

    public void insertStatsData(String statsDefName, String year, String month, String day, String content) throws GeoStoreException {
        try {
            RESTResource statsDataResource = createStatsDataResource(statsDefName, year, month, day, content);
            insert(statsDataResource);
        } catch (Exception e) {
            throw new GeoStoreException("Error while inserting StatsData: " + statsDefName, e);
        }
    }
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.