Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self):
j_spat_temp_idx_builder = config.MODULE__geotime_ingest.SpatialTemporalDimensionalityTypeProvider.SpatialTemporalIndexBuilder()
j_idx = j_spat_temp_idx_builder.createIndex()
super().__init__(config.GATEWAY, j_idx)
def __init__(self, feature_name, *attributes):
j_builder = config.MODULE__feature_simple.SimpleFeatureTypeBuilder()
j_builder.setName(feature_name)
for a in attributes:
assert isinstance(a, SimpleFeatureTypeAttribute)
j_builder.add(a._java_ref)
self.attributes = attributes
self.name = feature_name
j_feature_type = j_builder.buildFeatureType()
super().__init__(config.GATEWAY, j_feature_type)
self.feature_builder = SimpleFeatureBuilder(self)
dir (str) : directory of datastore
compact_on_write (bool)
batch_write_size (int)
"""
if gw_namespace:
j_rock_opts = config.MODULE__rocksdb_config.RocksDBOptions(gw_namespace)
else:
j_rock_opts = config.MODULE__rocksdb_config.RocksDBOptions()
if dir != "rocksdb":
j_rock_opts.setDirectory(dir)
if not compact_on_write:
j_rock_opts.setCompactOnWrite(compact_on_write)
if batch_write_size != 1000:
j_rock_opts.setBatchWriteSize(batch_write_size)
j_ds = config.MODULE__core_store.DataStoreFactory.createDataStore(j_rock_opts)
super().__init__(config.GATEWAY, j_ds)
def set_auth(self, auths=None):
if auths:
assert isinstance(auths, list)
for a in auths: assert isinstance(a, str)
n = len(auths)
j_string_cls = config.GATEWAY.jvm.java.lang.String
j_string_arr = config.GATEWAY.new_array(j_string_cls, n)
for idx, auth in enumerate(auths):
j_string_arr[idx] = auth
self._java_ref.setAuthorizations(j_string_arr)
def __init__(self):
j_qbuilder = config.MODULE__core_store.QueryBuilder.newBuilder()
super().__init__(config.GATEWAY, j_qbuilder)
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)