Examples of Python


Examples of org.geoserver.python.Python

    static PythonProcessAdapter adapter;
   
    @BeforeClass
    public static void setUpData() throws Exception {
        GeoServerResourceLoader loader = new GeoServerResourceLoader(new File("target"));
        py = new Python(loader);
       
        File f = new File("target", "foo_process.py");
        FileUtils.copyURLToFile(PythonProcessAdapterTest.class.getResource("foo_process.py"), f);
        adapter = new PythonProcessAdapter(f, py);
    }
View Full Code Here

Examples of org.geoserver.python.Python

   
    public Set<Name> getNames() {
        Python.LOGGER.fine("Performning process lookup");
        Set<Name> names = new TreeSet<Name>();
       
        Python py = py();
        try {
            File processRoot = py.getProcessRoot();
            for (String file : processRoot.list()) {
                if (file.endsWith(".py")) {
                    File f = new File(processRoot, file);
                    PythonProcessAdapter adapter = new PythonProcessAdapter(f, py);
                   
View Full Code Here

Examples of org.geoserver.python.Python

    TextArea outputTextArea;
    String output = ">>> ";
    String input = "";
   
    public PythonConsolePage() {
        Python python = getGeoServerApplication().getBeanOfType(Python.class);
        python.interpreter();
        model = new PythonInterpreterDetachableModel();
       
        Form form = new Form("form");
        add(form);
       
View Full Code Here

Examples of org.geoserver.python.Python

        return new OneTimeTestSetup(new FilterFunctionIntegrationTest());
    }
   
    @Override
    protected void setUpInternal() throws Exception {
        Python py = (Python) applicationContext.getBean("python");
        FileUtils.copyURLToFile(getClass().getResource("wfs.py"), new File(py.getFilterRoot(), "wfs.py"));
        FileUtils.copyURLToFile(getClass().getResource("sld.py"), new File(py.getFilterRoot(), "sld.py"));
    }
View Full Code Here

Examples of org.geoserver.python.Python

    static PythonFilterFunctionAdapter adapter;
   
    @BeforeClass
    public static void setUpData() throws Exception {
        GeoServerResourceLoader loader = new GeoServerResourceLoader(new File("target"));
        py = new Python(loader);
       
        File f = new File("target", "foo_function.py");
        FileUtils.copyURLToFile(PythonFilterFunctionAdapterTest.class.getResource("foo_function.py"), f);
        adapter = new PythonFilterFunctionAdapter(f, py);
    }
View Full Code Here

Examples of org.geoserver.python.Python

    static PythonDataStoreAdapter adapter;
   
    @BeforeClass
    public static void setUpData() throws Exception {
        GeoServerResourceLoader loader = new GeoServerResourceLoader(new File("target"));
        py = new Python(loader);
       
        File f = new File("target", "foo_process.py");
        FileUtils.copyURLToFile(PythonDataStoreAdapterTest.class.getResource("foo_datastore.py"), f);
        adapter = new PythonDataStoreAdapter(f, py);
    }
View Full Code Here

Examples of org.geoserver.python.Python

    @BeforeClass
    public static void setUpData() throws Exception {
        DeleteDbFiles.execute("target", "foobar", true);
       
        GeoServerResourceLoader loader = new GeoServerResourceLoader(new File("target"));
        PythonInterpreter pi = new Python(loader).interpreter();
        pi.exec("from geoscript.workspace import H2");
        pi.exec("from geoscript.geom import Point");
        pi.exec("h2 = H2('foobar', 'target')");
        pi.exec("l = h2.create('bar', [('geom', Point, 'epsg:4326'), ('baz', str)])");
        pi.exec("l.add([Point(10,10), 'ten'])");
View Full Code Here

Examples of org.geoserver.python.Python

    static PythonMapFormatAdapter adapter;
   
    @BeforeClass
    public static void setUpData() throws Exception {
        GeoServerResourceLoader loader = new GeoServerResourceLoader(new File("target"));
        py = new Python(loader);
       
        File f = new File("target", "foo_mapformat.py");
        FileUtils.copyURLToFile(PythonVectorFormatAdapterTest.class.getResource("foo_mapformat.py"), f);
        adapter = new PythonMapFormatAdapter(f, py);
    }
View Full Code Here

Examples of org.geoserver.python.Python

    static PythonVectorFormatAdapter adapter;
   
    @BeforeClass
    public static void setUpData() throws Exception {
        GeoServerResourceLoader loader = new GeoServerResourceLoader(new File("target"));
        py = new Python(loader);
       
        File f = new File("target", "foo_vectorformat.py");
        FileUtils.copyURLToFile(PythonVectorFormatAdapterTest.class.getResource("foo_vectorformat.py"), f);
        adapter = new PythonVectorFormatAdapter(f, py);
    }
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.