Package org.geoserver.importer

Examples of org.geoserver.importer.Directory.accept()


            throw new RuntimeException("Unable to create directory for file upload");
        }

        // pass off the uploaded file to the importer
        Directory dir = new Directory(uploadDir);
        dir.accept(files.next());

        return doImport(dir, ws);
    }

    @RequestMapping(value = "/{wsName}", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
View Full Code Here


   
    private ImportData handleFileUpload(ImportContext context) {
        Directory directory = findOrCreateDirectory(context);

        try {
            directory.accept(getAttribute("task"),getRequest().getEntity().getStream());
        } catch (IOException e) {
            throw new RestletException("Error unpacking file",
                Status.SERVER_ERROR_INTERNAL, e);
        }
       
View Full Code Here

        for (FileItem item : items) {
            if (item.getName() == null) {
                continue;
            }
            try {
                directory.accept(item);
            } catch (Exception ex) {
                throw new RestletException("Error writing file " + item.getName(), Status.SERVER_ERROR_INTERNAL, ex);
            }
        }
        return directory;
View Full Code Here

        tmp.delete();

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

    @Override
    public boolean allowPut() {
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.