Package org.geoserver.importer

Examples of org.geoserver.importer.Directory


   
    @Before
    public void prepareData() throws Exception {
        File dir = unpack("shape/archsites_epsg_prj.zip");
        unpack("shape/bugsites_esri_prj.tar.gz", dir);
        importer.createContext(new Directory(dir));
    }
View Full Code Here


        DataStoreInfo ds = createH2DataStore(cat.getDefaultWorkspace().getName(), "spearfish");

        File dir = tmpDir();
        unpack("shape/archsites_no_crs.zip", dir);

        ImportContext context = importer.createContext(new Directory(dir), ds);
       
        JSONObject task = getTask(0, 0);
        assertEquals("NO_CRS", task.get("state"));

        String json = "{\"id\":0,\"layer\":{\"srs\":\"EPSG:26713\"}}";
View Full Code Here

    public void prepareData() throws Exception {
        doLogin();

        File dir = unpack("shape/archsites_epsg_prj.zip");
        unpack("geotiff/EmissiveCampania.tif.bz2", dir);
        importer.createContext(new Directory(dir));
    }
View Full Code Here

                new DirectoryJSONFormat(MediaType.TEXT_HTML));
    }

    @Override
    public void handleGet() {
        Directory dir = lookupDirectory();
        Object response = dir;

        if (getAttribute("file") != null) {
            response = lookupFile(dir);
        }
View Full Code Here

        File tmp = File.createTempFile("upload", "tmp");
        tmp.delete();

        String ext = ARCHIVE_MIME_TYPES.get(mimeType);
       
        Directory dir = lookupDirectory();
        dir.accept(tmp.getName() + "." + ext, getRequest().getEntity().getStream());
        dir.prepare();
    }
View Full Code Here

    public boolean allowDelete() {
        return allowPut();
    }

    public void handleDelete() {
        Directory dir = lookupDirectory();
        FileData file = lookupFile();

        if (dir.getFiles().remove(file)) {
            getResponse().setStatus(Status.SUCCESS_NO_CONTENT);
        }
        else {
            throw new RestletException("Unable to remove file: " + file.getName(),
                Status.CLIENT_ERROR_BAD_REQUEST);
View Full Code Here

            if (parent == null) {
                parent = context();
            }

            if (object instanceof Directory) {
                Directory d = (Directory) object;
                String path = getRequest().getResourceRef().getPath();
                if (path.matches(".*/files/?")) {
                    io.files(d, parent, true, expand(1));
                }
                else {
View Full Code Here

TOP

Related Classes of org.geoserver.importer.Directory

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.