Examples of PyMethod


Examples of org.python.core.PyMethod

        super(entry, query);
       
        PythonDataStore dataStore = (PythonDataStore) entry.getDataStore();
        PyObject workspace = dataStore.getWorkspace();
       
        PyMethod get = (PyMethod) workspace.__findattr__("get");
        if (get == null) {
            get = (PyMethod) workspace.__findattr__("__getitem__");
        }
        this.layer = get.__call__(new PyObject[]{new PyString(entry.getName().getLocalPart())});
        this.schema = layer.__findattr__("schema");
   
    }
View Full Code Here

Examples of org.python.core.PyMethod

        return clazz;
    }

    @Override
    protected ReferencedEnvelope getBoundsInternal(Query query) throws IOException {
        PyMethod bounds = (PyMethod) layer.__findattr__("bounds");
        PyObject filter = convertFilter(query.getFilter());
       
        PyObject result = bounds.__call__(filter != null ? new PyObject[]{filter} : new PyObject[]{});
       
        //do not return the actual envelope synce it is a python object
        return new ReferencedEnvelope((ReferencedEnvelope) result.__tojava__(ReferencedEnvelope.class));
    }
View Full Code Here

Examples of org.python.core.PyMethod

        return new ReferencedEnvelope((ReferencedEnvelope) result.__tojava__(ReferencedEnvelope.class));
    }

    @Override
    protected int getCountInternal(Query query) throws IOException {
        PyMethod count = (PyMethod) layer.__findattr__("count");
       
        PyObject filter = convertFilter(query.getFilter());
        PyObject result = count.__call__(filter != null ? new PyObject[]{filter} : new PyObject[]{});
        return (Integer) result.__tojava__(Integer.class);
    }
View Full Code Here

Examples of org.python.core.PyMethod

    @Override
    protected List<Name> createTypeNames() throws IOException {
        PyObject workspace = getWorkspace();
       
        PyMethod layers = (PyMethod) workspace.__findattr__("layers");
        if (layers == null) {
            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()));
        }
View Full Code Here

Examples of org.python.core.PyMethod

    Iterator it;
   
    public PythonFeatureReader(SimpleFeatureType featureType, PyObject layer) {
        this.featureType = featureType;
       
        PyMethod features = (PyMethod) layer.__findattr__("features");
       
        this.features = (PyGenerator) features.__call__();
        this.it = this.features.iterator();
    }
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.