Package org.geoserver.importer

Examples of org.geoserver.importer.ImportData$TransferObject


    JSONObj ignored(ImportTask task) {
        return new JSONObj().put("task", task.getId()).put("file", filename(task));
    }
   
    String filename(ImportTask task) {
        ImportData data = task.getData();
        return FilenameUtils.getName(data.toString());
    }
View Full Code Here


        updateTargetStore(null);
    }

    Long createContext() throws Exception {
        ImportSourcePanel panel = (ImportSourcePanel) sourcePanel.get("content");
        ImportData source = panel.createImportSource();

        WorkspaceInfo targetWorkspace = (WorkspaceInfo) workspace.getObject();
        if (targetWorkspace == null) {
            Catalog cat = getCatalog();
View Full Code Here

        }

        @Override
        protected String load() {
            ImportContext ctx = importer().getContext(contextId);
            ImportData data = ctx.getData();
            String title =  data != null ? data.toString() : ctx.toString();

            if (abbrev && title.length() > 70) {
                //shorten it
                title = title.substring(0,20) + "[...]" + title.substring(title.length()-50);
            }
View Full Code Here

        DataFormat formatGet = getFormatGet();
        if (formatGet == null) {
            formatGet = new ImportDataJSONFormat(MediaType.APPLICATION_JSON);
        }

        ImportData data = null;

        ImportTask task = task(true);
        if (task != null) {
            data = task.getData();
        }
View Full Code Here

    public boolean allowPost() {
        return getAttribute("task") == null;
    }

    public void handlePost() {
        ImportData data = null;

        getLogger().info("Handling POST of " + getRequest().getEntity().getMediaType());
        //file posted from form
        MediaType mimeType = getRequest().getEntity().getMediaType();
        if (MediaType.MULTIPART_FORM_DATA.equals(mimeType, true)) {
View Full Code Here

        if (expand > 0) {
            json.key("updateMode").value(task.getUpdateMode().name());
   
            //data (used to be source)
            ImportData data = task.getData();
            if (data != null) {
                json.key("data");
                data(data, task, expand-1);
            }
View Full Code Here

        assertEquals(1, context.getTasks().size());

        ImportTask task = context.getTasks().get(0);
        assertEquals(ImportTask.State.READY, task.getState());

        ImportData importData = task.getData();
        assertTrue(importData instanceof SpatialFile);

        DataFormat format = importData.getFormat();
        assertTrue(format instanceof GridFormat);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.importer.ImportData$TransferObject

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.