Package org.python.core

Examples of org.python.core.PyList.toArray()


    protected SimpleFeatureType buildFeatureType() throws IOException {
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.setName(((PyString)schema.__findattr__("name")).asString());
       
        PyList fields = (PyList) schema.__findattr__("fields");
        for (Object o : fields.toArray()) {
            PyObject field = (PyObject) o;
           
            String name = ((PyString)field.__findattr__("name")).asString();
           
            PyType type = (PyType)field.__findattr__("typ");
View Full Code Here


            layers = (PyMethod) workspace.__findattr__("keys");
        }
        PyList result = (PyList) layers.__call__();
       
        List<Name> typeNames = new ArrayList<Name>();
        for (Object o : result.toArray()) {
            typeNames.add(new NameImpl(o.toString()));
        }
        return typeNames;
    }
View Full Code Here

                tb.setCRS(crs);
            }
        }
      
        PyList fields = (PyList) schema.__findattr__("fields");
        for (Object o : fields.toArray()) {
            PyObject field = (PyObject) o;
           
            String name = ((PyString)field.__findattr__("name")).asString();
           
            PyType type = (PyType)field.__findattr__("typ");
View Full Code Here

            layers = (PyMethod) workspace.__findattr__("keys");
        }
        PyList result = (PyList) layers.__call__();
       
        List<Name> typeNames = new ArrayList<Name>();
        for (Object o : result.toArray()) {
            typeNames.add(new NameImpl(o.toString()));
        }
        return typeNames;
    }
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.