How to use the pygw.config.java_gateway.new_array function in pygw

To help you get started, we’ve selected a few pygw examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github locationtech / geowave / python / src / main / python / pygw / query / vector / filter_factory.py View on Github external
def function(self, name, expressions):
        """
        Constructs an expression by passing a set of expressions to an expression function.

        Args:
            name (str): The name of the function.
            expressions (list of Expression): The expressions to use in the function.
        Returns:
            An Expression which represents the result of the function.
        """
        j_expressions = java_gateway.new_array(java_pkg.org.opengis.filter.expression.Expression, len(expressions))
        for idx, expression in enumerate(expressions):
            j_expressions[idx] = expression
        return self._java_ref.function(name, j_expressions)
github locationtech / geowave / python / src / main / python / pygw / query / vector / filter_factory.py View on Github external
def _invoke_filter_method_by_name(j_filter_factory, name, filter):
    filter_factory_class = j_filter_factory.getClass()
    filter_class = reflection_util.classForName("org.opengis.filter.Filter")
    class_array = java_gateway.new_array(java_pkg.java.lang.Class, 1)
    class_array[0] = filter_class
    method = filter_factory_class.getMethod(name, class_array)
    objects_array = java_gateway.new_array(java_pkg.java.lang.Object, 1)
    objects_array[0] = filter
    return method.invoke(j_filter_factory, objects_array)