Package org.geoserver.importer

Examples of org.geoserver.importer.FeatureTypeImporter


        });
    }
   
    FeatureTypeImporter getImporter() {
        ImporterThreadManager manager = (ImporterThreadManager) getGeoServerApplication().getBean("importerPool");
        FeatureTypeImporter importer = manager.getImporter(importerId);
        return importer;
    }
View Full Code Here


                       
                        getCatalog().add(si);
                    }
                   
                    // build and run the importer
                    FeatureTypeImporter importer = new FeatureTypeImporter(si, null, getCatalog(), workspaceNew, storeNew);
                    ImporterThreadManager manager = (ImporterThreadManager) getGeoServerApplication().getBean("importerPool");
                    String importerKey = manager.startImporter(importer);
                   
                    setResponsePage(new ImportProgressPage(importerKey));
                } catch (Exception e) {
View Full Code Here

    Model widthModel;
   
    public ImportProgressPage(String importerKey) {
        this.importerId = importerKey;
       
        FeatureTypeImporter importer = getImporter();
       
        // construction
        add(new Label("project", importer.getProject()));
        add(info = new WebMarkupContainer("info"));
        info.setOutputMarkupId(true);
        info.add(bar = new Label("bar", "0"));
        widthModel = new Model("width: 0%;");
        bar.add(new AttributeModifier("style", widthModel));
        info.add(percentage = new Label("percentage", "0"));
        info.add(currentFile = new Label("currentFile", ""));
        info.add(new AjaxLink("cancel") {

            @Override
            public void onClick(AjaxRequestTarget target) {
                FeatureTypeImporter importer = getImporter();
                importer.cancel();
               
                setResponsePage(new ImportSummaryPage(importer.getSummary()));
            }
           
        });

        // comment this out if you need to hack on the HTML of a live page
        info.add(new AbstractAjaxTimerBehavior(Duration.milliseconds(500)) {

            @Override
            protected void onTimer(AjaxRequestTarget target) {
                FeatureTypeImporter importer = getImporter();
               
                 ImportSummary summary = importer.getSummary();
                if(summary != null) {
                    if(summary.isCompleted()) {
                        setResponsePage(new ImportSummaryPage(summary));
                    }
                   
View Full Code Here

TOP

Related Classes of org.geoserver.importer.FeatureTypeImporter

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.