Examples of PythonResource


Examples of org.geoserver.python.app.PythonResource

   
    @Test
    public void testBasic() throws Exception {
        Request req = request();
        Response resp = new Response(req);
        PythonResource r = new PythonResource(python,
            new File(python.getScriptRoot(), "foo.py"), req, resp);
       
        r.handleGet();
        assertResponse(resp, "foo");
    }
View Full Code Here

Examples of org.geoserver.python.app.PythonResource

   
    @Test
    public void testImport() throws Exception {
        Request req = request();
        Response resp = new Response(req);
        PythonResource r = new PythonResource(python,
            new File(python.getScriptRoot(), "foo_import.py"), req, resp);
       
        r.handleGet();
        assertResponse( resp, "Bar");
    }
View Full Code Here

Examples of org.geoserver.python.app.PythonResource

        Reference ref = new Reference();
        ref.setQuery("thearg=theval");
        req.setResourceRef(ref);
       
        Response resp = new Response(req);
        PythonResource r = new PythonResource(python,
            new File(python.getScriptRoot(), "foo_args.py"), req, resp);
       
        r.handleGet();
        assertResponse(resp, "theval");
    }
View Full Code Here

Examples of org.geoserver.python.app.PythonResource

   
    @Test
    public void testBasic() throws Exception {
        Request req = request();
        Response resp = new Response(req);
        PythonResource r = new PythonResource(python,
            new File(python.getScriptRoot(), "foo.py"), req, resp);
       
        r.handleGet();
        assertResponse(resp, "foo");
    }
View Full Code Here

Examples of org.geoserver.python.app.PythonResource

   
    @Test
    public void testImport() throws Exception {
        Request req = request();
        Response resp = new Response(req);
        PythonResource r = new PythonResource(python,
            new File(python.getScriptRoot(), "foo_import.py"), req, resp);
       
        r.handleGet();
        assertResponse( resp, "Bar");
    }
View Full Code Here

Examples of org.geoserver.python.app.PythonResource

        Reference ref = new Reference();
        ref.setQuery("thearg=theval");
        req.setResourceRef(ref);
       
        Response resp = new Response(req);
        PythonResource r = new PythonResource(python,
            new File(python.getScriptRoot(), "foo_args.py"), req, resp);
       
        r.handleGet();
        assertResponse(resp, "theval");
    }
View Full Code Here

Examples of org.python.pydev.navigator.elements.PythonResource

                    } else if (object instanceof IFile) {
                        object = new PythonFile(parent, ((IFile) object), pythonSourceFolder);

                    } else if (object instanceof IResource) {
                        object = new PythonResource(parent, (IResource) object, pythonSourceFolder);
                    }
                } else { //existing != null
                    object = existing;
                }
            }
View Full Code Here

Examples of org.python.pydev.navigator.elements.PythonResource

                return new PythonFile((IWrappedResource) parent, (IFile) child, pythonSourceFolder);
            }

        } else if (child instanceof IResource) {
            if (pythonSourceFolder != null) {
                return new PythonResource((IWrappedResource) parent, (IResource) child, pythonSourceFolder);
            }

        } else {
            throw new RuntimeException("Unexpected class:" + child.getClass());
        }
View Full Code Here

Examples of org.python.pydev.navigator.elements.PythonResource

                            childrenItr.remove();
                            convertedChildren.add(new PythonFile(parent, (IFile) res, parent.getSourceFolder()));

                        } else if (child instanceof IResource) {
                            childrenItr.remove();
                            convertedChildren.add(new PythonResource(parent, (IResource) child, parent
                                    .getSourceFolder()));
                        }

                    } else if (res instanceof IFolder) {
                        //ok, still not in the model... could it be a PythonSourceFolder
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.