How to use the pygw.config.config 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 / geotools.py View on Github external
def __init__(self, type_, is_nilable, descriptor):
        self.type_= type_
        self.is_nilable = is_nilable
        self.descriptor = descriptor
        j_builder = config.MODULE__feature.AttributeTypeBuilder()

        if not isinstance(type_, SimpleFeatureTypeAttribute.Type):
            raise SimpleFeatureTypeAttribute.UnknownTypeError("Invalid argument to `type_`. Must be one of defined types in FeatureTypeAttribute.Type")

        j_type_cls = config.reflection_util.classForName(type_.value)

        j_builder.binding(j_type_cls)
        j_builder.nillable(is_nilable)
        j_attribute = j_builder.buildDescriptor(descriptor)
        super().__init__(config.GATEWAY, j_attribute)
github locationtech / geowave / python / src / main / python / pygw / special_queries.py View on Github external
def __init__(self, extended_id, type):
    if type == "bbox":
      builder = config.MODULE__geotime_query.VectorStatisticsQueryBuilder.newBuilder().factory().bbox()
    elif type == "time_range":
      builder = config.MODULE__geotime_query.VectorStatisticsQueryBuilder.newBuilder().factory().timeRange()
    else:
      raise AttributeError("Invalid query type")

    builder.fieldName(extended_id)
    java_ref = builder.build()
    super().__init__(config.GATEWAY, java_ref)
github locationtech / geowave / python / src / main / python / pygw / special_queries.py View on Github external
def __init__(self, extended_id, type):
    if type == "bbox":
      builder = config.MODULE__geotime_query.VectorStatisticsQueryBuilder.newBuilder().factory().bbox()
    elif type == "time_range":
      builder = config.MODULE__geotime_query.VectorStatisticsQueryBuilder.newBuilder().factory().timeRange()
    else:
      raise AttributeError("Invalid query type")

    builder.fieldName(extended_id)
    java_ref = builder.build()
    super().__init__(config.GATEWAY, java_ref)
github locationtech / geowave / python / src / main / python / pygw / geotools.py View on Github external
def __init__(self, type_, is_nilable, descriptor):
        self.type_= type_
        self.is_nilable = is_nilable
        self.descriptor = descriptor
        j_builder = config.MODULE__feature.AttributeTypeBuilder()

        if not isinstance(type_, SimpleFeatureTypeAttribute.Type):
            raise SimpleFeatureTypeAttribute.UnknownTypeError("Invalid argument to `type_`. Must be one of defined types in FeatureTypeAttribute.Type")

        j_type_cls = config.reflection_util.classForName(type_.value)

        j_builder.binding(j_type_cls)
        j_builder.nillable(is_nilable)
        j_attribute = j_builder.buildDescriptor(descriptor)
        super().__init__(config.GATEWAY, j_attribute)
github locationtech / geowave / python / src / main / python / pygw / query.py View on Github external
def __init__(self):
        j_vector_qbuilder = config.MODULE__geotime_query.VectorQueryBuilder.newBuilder()
        PyGwJavaWrapper.__init__(self, config.GATEWAY, j_vector_qbuilder)
github locationtech / geowave / python / src / main / python / pygw / geotools.py View on Github external
def _set_geometry(self, attr, value):
        # TODO Need to give better error.
        assert isinstance(value, tuple)
        for v in value:
            assert (isinstance(v, int) or isinstance(v, float))
        vals = [float(v) for v in value]
        if len(vals) == 2:
            j_coord = config.MODULE__jts_geom.Coordinate(vals[0], vals[1])
        elif len(vals) == 3:
            j_coord = config.MODULE__jts_geom.Coordinate(vals[0], vals[1], vals[2])
        else:
            raise Exception("Unsupported number of args to Coordinate")
        j_geom = config.MODULE__geotime_util.GeometryUtils.GEOMETRY_FACTORY.createPoint(j_coord)
        self._java_ref.set(attr.descriptor, j_geom)