├── .github ├── CODEOWNERS └── workflows │ ├── test.yaml │ └── uploadAssets.yaml ├── .gitignore ├── .ort.yml ├── .run ├── CService.run.xml ├── HubService.run.xml ├── JobService.run.xml ├── _wait for xyz-job-steps [debug].run.xml ├── jobServiceSetup.run.xml ├── xyz-job-steps [debug].run.xml └── xyz-job-steps [install].run.xml ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docker-compose-dynamodb.yml ├── docker-compose.yml ├── intellij-style.xml ├── pom.xml ├── xyz-connectors ├── LICENSE ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── here │ │ └── xyz │ │ └── connectors │ │ ├── AbstractConnectorHandler.java │ │ ├── EncryptingProcessorConnector.java │ │ ├── ErrorResponseException.java │ │ ├── ListenerConnector.java │ │ ├── NotificationParams.java │ │ ├── ProcessorConnector.java │ │ ├── RelocationClient.java │ │ ├── StorageConnector.java │ │ ├── decryptors │ │ ├── DummyDecryptor.java │ │ ├── EventDecryptor.java │ │ ├── KmsEventDecryptor.java │ │ ├── PrivateKeyEventDecryptor.java │ │ └── TestDecryptor.java │ │ └── mocks │ │ ├── MockedListener.java │ │ └── MockedProcessor.java │ └── test │ └── java │ └── com │ └── here │ └── xyz │ └── connectors │ ├── AbstractConnectorHandlerTest.java │ └── EventDecryptorTest.java ├── xyz-hub-service ├── LICENSE ├── pom.xml └── src │ ├── main │ ├── java │ │ ├── com │ │ │ └── here │ │ │ │ └── xyz │ │ │ │ ├── httpconnector │ │ │ │ ├── CService.java │ │ │ │ ├── Config.java │ │ │ │ ├── PsqlHttpConnectorVerticle.java │ │ │ │ ├── config │ │ │ │ │ ├── AwsCWClient.java │ │ │ │ │ ├── AwsS3Client.java │ │ │ │ │ ├── DynamoJobConfigClient.java │ │ │ │ │ ├── JDBCExporter.java │ │ │ │ │ ├── JDBCImporter.java │ │ │ │ │ ├── JDBCJobConfigClient.java │ │ │ │ │ ├── JDBCMaintainer.java │ │ │ │ │ ├── JobConfigClient.java │ │ │ │ │ ├── JobS3Client.java │ │ │ │ │ └── query │ │ │ │ │ │ ├── ExportSpace.java │ │ │ │ │ │ ├── ExportSpaceByGeometry.java │ │ │ │ │ │ └── ExportSpaceByProperties.java │ │ │ │ ├── rest │ │ │ │ │ ├── HApiParam.java │ │ │ │ │ ├── HttpConnectorApi.java │ │ │ │ │ ├── HttpMaintenanceApi.java │ │ │ │ │ ├── JobApi.java │ │ │ │ │ └── JobStatusApi.java │ │ │ │ ├── task │ │ │ │ │ ├── JdbcBasedHandler.java │ │ │ │ │ ├── JobHandler.java │ │ │ │ │ ├── MaintenanceHandler.java │ │ │ │ │ └── StatusHandler.java │ │ │ │ └── util │ │ │ │ │ ├── Futures.java │ │ │ │ │ ├── emr │ │ │ │ │ ├── EMRManager.java │ │ │ │ │ └── config │ │ │ │ │ │ ├── EmrConfig.java │ │ │ │ │ │ └── Step.java │ │ │ │ │ ├── jobs │ │ │ │ │ ├── CombinedJob.java │ │ │ │ │ ├── Export.java │ │ │ │ │ ├── ExportObject.java │ │ │ │ │ ├── Import.java │ │ │ │ │ ├── ImportObject.java │ │ │ │ │ ├── JDBCBasedJob.java │ │ │ │ │ ├── Job.java │ │ │ │ │ ├── RuntimeStatus.java │ │ │ │ │ ├── outputs │ │ │ │ │ │ ├── DownloadUrl.java │ │ │ │ │ │ └── Output.java │ │ │ │ │ └── validate │ │ │ │ │ │ └── Validator.java │ │ │ │ │ ├── scheduler │ │ │ │ │ ├── ExportQueue.java │ │ │ │ │ ├── ImportQueue.java │ │ │ │ │ └── JobQueue.java │ │ │ │ │ ├── status │ │ │ │ │ ├── RDSStatus.java │ │ │ │ │ ├── RunningQueryStatistic.java │ │ │ │ │ └── RunningQueryStatistics.java │ │ │ │ │ └── web │ │ │ │ │ └── LegacyHubWebClient.java │ │ │ │ └── hub │ │ │ │ ├── AbstractHttpServerVerticle.java │ │ │ │ ├── Config.java │ │ │ │ ├── Service.java │ │ │ │ ├── XYZHubRESTVerticle.java │ │ │ │ ├── auth │ │ │ │ ├── Authorization.java │ │ │ │ ├── AuthorizationType.java │ │ │ │ ├── CompositeAuthorizationHandler.java │ │ │ │ ├── ExtendedJWTAuthHandler.java │ │ │ │ ├── FeatureAuthorization.java │ │ │ │ ├── JwtGenerator.java │ │ │ │ ├── SpaceAuthorization.java │ │ │ │ ├── XyzAuthProvider.java │ │ │ │ ├── XyzHubActionMatrix.java │ │ │ │ ├── XyzHubAttributeMap.java │ │ │ │ └── XyzHubCompositeAuthorizationHandler.java │ │ │ │ ├── cache │ │ │ │ ├── CacheClient.java │ │ │ │ ├── InMemoryCacheClient.java │ │ │ │ ├── MultiLevelCacheClient.java │ │ │ │ ├── NoopCacheClient.java │ │ │ │ ├── RedisCacheClient.java │ │ │ │ └── S3CacheClient.java │ │ │ │ ├── config │ │ │ │ ├── ConnectorConfigClient.java │ │ │ │ ├── SettingsConfigClient.java │ │ │ │ ├── SpaceConfigClient.java │ │ │ │ ├── SubscriptionConfigClient.java │ │ │ │ ├── TagConfigClient.java │ │ │ │ ├── dynamo │ │ │ │ │ ├── DynamoConnectorConfigClient.java │ │ │ │ │ ├── DynamoSettingsConfigClient.java │ │ │ │ │ ├── DynamoSpaceConfigClient.java │ │ │ │ │ ├── DynamoSubscriptionConfigClient.java │ │ │ │ │ └── DynamoTagConfigClient.java │ │ │ │ ├── jdbc │ │ │ │ │ ├── JDBCConfigClient.java │ │ │ │ │ ├── JDBCConnectorConfigClient.java │ │ │ │ │ ├── JDBCSpaceConfigClient.java │ │ │ │ │ ├── JDBCSubscriptionConfigClient.java │ │ │ │ │ └── JDBCTagConfigClient.java │ │ │ │ ├── memory │ │ │ │ │ ├── InMemConnectorConfigClient.java │ │ │ │ │ ├── InMemSettingsConfigClient.java │ │ │ │ │ ├── InMemSpaceConfigClient.java │ │ │ │ │ └── InMemSubscriptionConfigClient.java │ │ │ │ └── settings │ │ │ │ │ ├── EnvironmentVariableOverrides.java │ │ │ │ │ ├── Setting.java │ │ │ │ │ ├── SingletonSetting.java │ │ │ │ │ └── SpaceStorageMatchingMap.java │ │ │ │ ├── connectors │ │ │ │ ├── ConfigUpdateThread.java │ │ │ │ ├── EmbeddedFunctionClient.java │ │ │ │ ├── HTTPFunctionClient.java │ │ │ │ ├── LambdaFunctionClient.java │ │ │ │ ├── RemoteFunctionClient.java │ │ │ │ ├── RpcClient.java │ │ │ │ ├── WarmupRemoteFunctionThread.java │ │ │ │ ├── models │ │ │ │ │ ├── Connector.java │ │ │ │ │ └── Space.java │ │ │ │ ├── statistics │ │ │ │ │ └── StorageStatisticsProvider.java │ │ │ │ └── test │ │ │ │ │ ├── DummyEncryptingPreProcessor.java │ │ │ │ │ ├── DummyListener.java │ │ │ │ │ ├── DummyPreProcessor.java │ │ │ │ │ ├── ErrorPreProcessor.java │ │ │ │ │ ├── EvalConnector.java │ │ │ │ │ ├── ExceptionPreProcessor.java │ │ │ │ │ ├── FailingPreProcessor.java │ │ │ │ │ ├── InMemoryStorage.java │ │ │ │ │ ├── MockDelayStorageConnector.java │ │ │ │ │ └── TestStorageConnector.java │ │ │ │ ├── rest │ │ │ │ ├── AdminApi.java │ │ │ │ ├── Api.java │ │ │ │ ├── ApiParam.java │ │ │ │ ├── ApiResponseType.java │ │ │ │ ├── ChangesetApi.java │ │ │ │ ├── ConnectorApi.java │ │ │ │ ├── FeatureApi.java │ │ │ │ ├── FeatureQueryApi.java │ │ │ │ ├── HistoryQueryApi.java │ │ │ │ ├── JobProxyApi.java │ │ │ │ ├── SpaceApi.java │ │ │ │ ├── SpaceBasedApi.java │ │ │ │ ├── SubscriptionApi.java │ │ │ │ ├── TagApi.java │ │ │ │ ├── admin │ │ │ │ │ ├── AdminMessage.java │ │ │ │ │ ├── MessageBroker.java │ │ │ │ │ ├── Node.java │ │ │ │ │ └── messages │ │ │ │ │ │ ├── BroadcastLog.java │ │ │ │ │ │ ├── ChangeLogLevelMessage.java │ │ │ │ │ │ ├── RelayedMessage.java │ │ │ │ │ │ ├── TestMessage.java │ │ │ │ │ │ └── brokers │ │ │ │ │ │ ├── RedisMessageBroker.java │ │ │ │ │ │ └── SnsMessageBroker.java │ │ │ │ └── health │ │ │ │ │ └── HealthApi.java │ │ │ │ ├── spi │ │ │ │ └── Modules.java │ │ │ │ ├── task │ │ │ │ ├── ConnectorHandler.java │ │ │ │ ├── FeatureHandler.java │ │ │ │ ├── FeatureTask.java │ │ │ │ ├── FeatureTaskHandler.java │ │ │ │ ├── ModifyFeatureOp.java │ │ │ │ ├── ModifyOp.java │ │ │ │ ├── ModifySpaceOp.java │ │ │ │ ├── SpaceConnectorBasedHandler.java │ │ │ │ ├── SpaceTask.java │ │ │ │ ├── SpaceTaskHandler.java │ │ │ │ ├── SubscriptionHandler.java │ │ │ │ ├── Task.java │ │ │ │ └── TaskPipeline.java │ │ │ │ └── util │ │ │ │ ├── AtomicUtils.java │ │ │ │ ├── ByteSizeAware.java │ │ │ │ ├── LimitedQueue.java │ │ │ │ ├── diff │ │ │ │ ├── Difference.java │ │ │ │ └── Patcher.java │ │ │ │ ├── geo │ │ │ │ ├── MapBoxVectorTileBuilder.java │ │ │ │ ├── MapBoxVectorTileFlattenedBuilder.java │ │ │ │ └── MvtTileBuilder.java │ │ │ │ ├── health │ │ │ │ ├── Config.java │ │ │ │ ├── GroupedHealthCheck.java │ │ │ │ ├── MainHealthCheck.java │ │ │ │ ├── checks │ │ │ │ │ ├── ClusterHealthCheck.java │ │ │ │ │ ├── DBHealthCheck.java │ │ │ │ │ ├── DynamoDBHealthCheck.java │ │ │ │ │ ├── ExecutableCheck.java │ │ │ │ │ ├── FunctionCheck.java │ │ │ │ │ ├── JDBCHealthCheck.java │ │ │ │ │ ├── MemoryHealthCheck.java │ │ │ │ │ ├── RedisHealthCheck.java │ │ │ │ │ ├── RemoteFunctionHealthAggregator.java │ │ │ │ │ ├── RemoteFunctionHealthCheck.java │ │ │ │ │ └── ServiceHealthCheck.java │ │ │ │ └── schema │ │ │ │ │ ├── Check.java │ │ │ │ │ ├── HTTPResultMapper.java │ │ │ │ │ ├── Public.java │ │ │ │ │ ├── Reporter.java │ │ │ │ │ ├── Response.java │ │ │ │ │ ├── ResponseSerializer.java │ │ │ │ │ └── Status.java │ │ │ │ └── metrics │ │ │ │ ├── GcDurationMetric.java │ │ │ │ ├── GlobalInflightRequestMemory.java │ │ │ │ ├── GlobalUsedRfcConnections.java │ │ │ │ ├── MajorGcCountMetric.java │ │ │ │ ├── MemoryMetric.java │ │ │ │ ├── base │ │ │ │ ├── AggregatingMetric.java │ │ │ │ ├── AttributedMetricCollection.java │ │ │ │ ├── AttributedMetricCollector.java │ │ │ │ ├── BareValuesMetric.java │ │ │ │ ├── CWAggregatedValuesPublisher.java │ │ │ │ ├── CWAttributedMetricCollectionPublisher.java │ │ │ │ ├── CWBareValueMetricPublisher.java │ │ │ │ ├── CloudWatchMetricPublisher.java │ │ │ │ ├── Metric.java │ │ │ │ └── MetricPublisher.java │ │ │ │ └── net │ │ │ │ ├── ConnectionMetrics.java │ │ │ │ ├── CurrentTcpConnections.java │ │ │ │ ├── HttpPoolUtilization.java │ │ │ │ ├── HttpRequests.java │ │ │ │ ├── HttpRequestsInflight.java │ │ │ │ ├── NewTcpConnections.java │ │ │ │ ├── ResetHttpRequests.java │ │ │ │ └── TcpErrors.java │ │ └── io │ │ │ └── vertx │ │ │ └── openapi │ │ │ └── contract │ │ │ └── MediaType.java │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ ├── com.here.xyz.httpconnector.util.emr.EMRManager$Provider │ │ │ ├── com.here.xyz.hub.auth.CompositeAuthorizationHandler │ │ │ ├── com.here.xyz.hub.config.SpaceConfigClient$Provider │ │ │ └── com.here.xyz.hub.spi.RestConfiguration │ │ ├── auth │ │ ├── dummyJwt.json │ │ ├── jwt.key │ │ └── jwt.pub │ │ ├── build.properties │ │ ├── config.json │ │ ├── connector-config.json │ │ ├── connectors.json │ │ ├── hub-errors.json │ │ ├── log4j2-console-json.json │ │ ├── log4j2-console-plain.json │ │ ├── log4j2-docker-debug.json │ │ ├── log4j2-docker-info.json │ │ ├── log4j2-docker.json │ │ ├── log4j2.component.properties │ │ ├── openapi-http-connector.yaml │ │ ├── openapi-recipes.yaml │ │ ├── openapi.yaml │ │ └── settings.json │ └── test │ └── java │ └── com │ └── here │ └── xyz │ └── hub │ └── errors │ └── ErrorManagerTest.java ├── xyz-hub-test ├── LICENSE ├── README.md ├── pom.xml └── src │ └── test │ ├── java │ └── com │ │ └── here │ │ └── xyz │ │ └── hub │ │ ├── auth │ │ ├── AuthTestsIT.java │ │ ├── FeatureApiAuthIT.java │ │ ├── JWTPayloadTest.java │ │ ├── TestAuthenticator.java │ │ └── XyzHubActionMatrixTest.java │ │ ├── connectors │ │ ├── ConnectorConfigTest.java │ │ ├── MockedRemoteFunctionClient.java │ │ └── RFCMeasurement.java │ │ ├── rest │ │ ├── AdminMessagesApiIT.java │ │ ├── ApiParamTest.java │ │ ├── ChangesetApiIT.java │ │ ├── ChangesetCollectionApiIT.java │ │ ├── ConnectorApiIT.java │ │ ├── CreateExtensionSpaceIT.java │ │ ├── CreateSpaceApiIT.java │ │ ├── DecompressedSizeIT.java │ │ ├── DeleteFeatureApiIT.java │ │ ├── DeleteSpaceApiIT.java │ │ ├── ErrorResponseTestIT.java │ │ ├── FeatureModificationIT.java │ │ ├── LimitsTestIT.java │ │ ├── ListSpaceContentUpdatedAtTestIT.java │ │ ├── ModifyCompositeSpaceIT.java │ │ ├── ModifyFeatureCompositeSpaceIT.java │ │ ├── ModifyLargeDatasetsIT.java │ │ ├── ModifySpaceApiIT.java │ │ ├── PropertiesSearch2IT.java │ │ ├── PropertiesSearchIT.java │ │ ├── ReadFeatureApiClusteringIT.java │ │ ├── ReadFeatureApiGeomIT.java │ │ ├── ReadFeatureApiIT.java │ │ ├── ReadFeatureVersionRefTest.java │ │ ├── ReadSpaceApiIT.java │ │ ├── ReadSpacePerRegionApiIT.java │ │ ├── RestAssuredConfig.java │ │ ├── RestAssuredTest.java │ │ ├── RestTests.java │ │ ├── SingleChangesetApiIT.java │ │ ├── SpaceInactiveIT.java │ │ ├── SpaceStatisticsIT.java │ │ ├── SpecComplianceApiIT.java │ │ ├── StorageReportingApiIT.java │ │ ├── StoreFeaturesApiIT.java │ │ ├── SubscriptionApiIT.java │ │ ├── TTLTestsIT.java │ │ ├── TagApiIT.java │ │ ├── TagTest.java │ │ ├── TestCompositeSpace.java │ │ ├── TestSpaceWithFeature.java │ │ ├── TestWithSpaceCleanup.java │ │ ├── TrustedParamsTest.java │ │ ├── UpdateFeatureApiIT.java │ │ ├── UpdateSpaceApiIT.java │ │ ├── VersioningCompositeGetFeaturesIT.java │ │ ├── VersioningGetFeaturesIT.java │ │ ├── VersioningIT.java │ │ ├── VersioningNIT.java │ │ ├── caching │ │ │ ├── ImmutableResponseCachingIT.java │ │ │ └── S3CacheIT.java │ │ ├── httpconnector │ │ │ ├── HCDeleteFeatureApiIT.java │ │ │ ├── HCMaintenanceTestIT.java │ │ │ ├── HCModifySpaceApiIT.java │ │ │ ├── HCPropertiesSearch2IT.java │ │ │ ├── HCPropertiesSearchIT.java │ │ │ ├── HCReadFeatureApiGeomIT.java │ │ │ ├── HCReadFeatureApiIT.java │ │ │ ├── HCStoreFeaturesApiIT.java │ │ │ └── HCUpdateFeatureApiIT.java │ │ ├── jobs │ │ │ ├── JobApiCompositeExportIT.java │ │ │ ├── JobApiExportIT.java │ │ │ ├── JobApiExportVersionIT.java │ │ │ ├── JobApiGeneralIT.java │ │ │ ├── JobApiIT.java │ │ │ ├── JobApiImportIT.java │ │ │ ├── JobDatasetsIT.java │ │ │ └── ReadOnlyPersistExportIT.java │ │ └── versioning │ │ │ ├── VDeleteFeatureApiIT.java │ │ │ ├── VModifyFeatureCompositeSpaceIT.java │ │ │ ├── VPropertiesSearch2IT.java │ │ │ ├── VPropertiesSearchIT.java │ │ │ ├── VReadFeatureApiGeomIT.java │ │ │ ├── VReadFeatureApiIT.java │ │ │ ├── VStoreFeaturesApiIT.java │ │ │ ├── VUpdateFeatureApiIT.java │ │ │ └── VersioningBaseIT.java │ │ ├── task │ │ └── ModifyFeatureOpTest.java │ │ ├── throttling │ │ └── RequesterThrottlingIT.java │ │ └── util │ │ ├── CompressionTest.java │ │ ├── LimitedQueueTest.java │ │ ├── OpenApiGeneratorTest.java │ │ └── PerformanceTest.java │ └── resources │ ├── auth │ ├── ACCESS_ADMIN_MESSAGING.json │ ├── ACCESS_ADMIN_STATISTICS.json │ ├── ACCESS_ALL.json │ ├── ACCESS_OWNER_1_ADMIN.json │ ├── ACCESS_OWNER_1_MANAGE_ALL_SPACES_ONLY.json │ ├── ACCESS_OWNER_1_MANAGE_PACKAGES_HERE.json │ ├── ACCESS_OWNER_1_MANAGE_PACKAGES_HERE_OSM.json │ ├── ACCESS_OWNER_1_MANAGE_PACKAGES_HERE_WITH_OWNER.json │ ├── ACCESS_OWNER_1_NO_ADMIN.json │ ├── ACCESS_OWNER_1_READ_ALL_FEATURES.json │ ├── ACCESS_OWNER_1_READ_PACKAGES_HERE.json │ ├── ACCESS_OWNER_1_READ_WRITE_PACKAGES_HERE.json │ ├── ACCESS_OWNER_1_WITH_ACCESS_CONNECTOR_RULE_TAGGER.json │ ├── ACCESS_OWNER_1_WITH_ANOTHER_LISTENER.json │ ├── ACCESS_OWNER_1_WITH_FEATURES_MANAGE_ALL_SPACES.json │ ├── ACCESS_OWNER_1_WITH_FEATURES_ONLY.json │ ├── ACCESS_OWNER_1_WITH_LIMITS.json │ ├── ACCESS_OWNER_1_WITH_LISTENER.json │ ├── ACCESS_OWNER_1_WITH_MANAGE_CONNECTORS_WITH_PREFIX_ID.json │ ├── ACCESS_OWNER_1_WITH_MANAGE_CONNECTOR_ONE_ID.json │ ├── ACCESS_OWNER_1_WITH_MANAGE_CONNECTOR_PSQL.json │ ├── ACCESS_OWNER_1_WITH_MANAGE_OWN_CONNECTORS.json │ ├── ACCESS_OWNER_1_WITH_MANAGE_SPACES_PACKAGE_HERE.json │ ├── ACCESS_OWNER_1_WITH_MS_PACKAGE_HERE_AND_MP_OSM.json │ ├── ACCESS_OWNER_1_WITH_PSQL.json │ ├── ACCESS_OWNER_1_WITH_USE_CAPABILITIES.json │ ├── ACCESS_OWNER_1_WITH_USE_CAPABILITIES_AND_ADMIN.json │ ├── ACCESS_OWNER_2.json │ ├── ACCESS_OWNER_2_ALL.json │ ├── ACCESS_OWNER_2_MANAGE_PACKAGES_HERE_OSM.json │ ├── ACCESS_OWNER_2_WITH_FEATURES_ADMIN_ALL_SPACES.json │ ├── ACCESS_OWNER_2_WITH_MANAGE_CONNECTORS.json │ ├── ACCESS_OWNER_3.json │ ├── ACCESS_OWNER_3_WITH_CUSTOM_SPACE_IDS.json │ ├── ACCESS_SPACE_1_MANAGE_SPACES.json │ ├── ACCESS_SPACE_2_MANAGE_SPACES.json │ ├── CONNECTOR_AUTH_TEST_C1_AND_C2.json │ ├── NO_ACCESS.json │ ├── STORAGE_AUTH_TEST_C1_ONLY.json │ ├── STORAGE_AUTH_TEST_C1_OWNER_AND_ID.json │ ├── STORAGE_AUTH_TEST_C2_OTHER_OWNER_AND_ID.json │ ├── STORAGE_AUTH_TEST_C2_OWNER_AND_ID.json │ ├── STORAGE_AUTH_TEST_C3_OTHER_OWNER_AND_ID.json │ ├── STORAGE_AUTH_TEST_C3_OWNER_AND_ID.json │ ├── STORAGE_AUTH_TEST_OTHER_OWNER_ID_ONLY.json │ ├── STORAGE_AUTH_TEST_OWNER_ID_ONLY.json │ └── STORAGE_AUTH_TEST_PSQL_ONLY.json │ ├── mock-servers │ └── localstack │ │ └── docker-entrypoint-initaws.d │ │ └── 01-create-bucket.sh │ ├── recipes │ ├── openapi-recipe-contract.yaml │ ├── openapi-recipe-example.yaml │ ├── openapi-recipe-experimental.yaml │ ├── openapi-recipe-stable.yaml │ └── openapi-recipes-extension-example.yaml │ └── xyz │ └── hub │ ├── auth │ ├── createCustomIdSpace.json │ ├── createDefaultSpace.json │ ├── createPsqlSpace.json │ ├── createSharedSpace.json │ ├── createSpaceWithListener.json │ ├── createSpaceWithListenersObject.json │ ├── createSpaceWithPackage.json │ ├── createTestStorageSpace.json │ ├── createTestStorageSpaceC2.json │ ├── createTestStorageSpaceC3.json │ └── createTestStorageSpaceC4.json │ ├── connectors │ ├── embeddedConnector.json │ ├── embeddedConnector2.json │ ├── embeddedConnectorPatch.json │ ├── embeddedConnectorReplace.json │ ├── embeddedConnectorWithExtensionSupport.json │ ├── embeddedConnectorWithOtherId.json │ ├── embeddedConnectorWithOwner2.json │ └── embeddedConnectorWithoutId.json │ ├── createFeatureById.json │ ├── createSpace.json │ ├── createSpacePsql.json │ ├── createSpaceWithCopyright.json │ ├── createSpaceWithExceptionPreProcessor.json │ ├── createSpaceWithExtension.json │ ├── createSpaceWithFailingAndErrorPreProcessor.json │ ├── createSpaceWithFailingPreProcessor.json │ ├── createSpaceWithGlobalVersioning.json │ ├── createSpaceWithInvalidJson.json │ ├── createSpaceWithListener.json │ ├── createSpaceWithNotAllowedStorage.json │ ├── createSpaceWithProcessor.json │ ├── createSpaceWithSearchableProperties.json │ ├── createSpaceWithSearchablePropertiesConnectorC1.json │ ├── createSpaceWithSortableProperties.json │ ├── createSpaceWithoutId.json │ ├── createSubscription.json │ ├── createSubscriptionWithoutId.json │ ├── emptyFeatureCollection.json │ ├── export-version-space-1-ext.jsonl.txt │ ├── export-version-space-1.jsonl.txt │ ├── fcWithPoints.json │ ├── featureWithNumberId.json │ ├── largeDatasetWith30kFeatures.json │ ├── mixedGeometryTypes.json │ ├── patchFeature.json │ ├── processedData.json │ ├── publishSpace.json │ ├── task │ └── FeatureSample01.json │ ├── updateFeature.json │ ├── updateFeatureById.json │ ├── updateFeatureNonModified.json │ ├── updateSpace.json │ ├── updateSpaceWithSearchableProperties.json │ ├── updateSpaceWithSearchablePropertiesConnectorC1.json │ └── wrongType.json ├── xyz-jobs ├── README.md ├── pom.xml ├── xyz-job-service │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── bash │ │ │ └── localSetup.sh │ │ ├── java │ │ │ └── com │ │ │ │ └── here │ │ │ │ └── xyz │ │ │ │ └── jobs │ │ │ │ ├── Job.java │ │ │ │ ├── JobPlayground.java │ │ │ │ ├── RuntimeStatus.java │ │ │ │ ├── config │ │ │ │ ├── DynamoJobConfigClient.java │ │ │ │ ├── InMemJobConfigClient.java │ │ │ │ └── JobConfigClient.java │ │ │ │ ├── datasets │ │ │ │ ├── CombinedDatasetDescription.java │ │ │ │ ├── DatasetDescription.java │ │ │ │ ├── Datasets.java │ │ │ │ ├── FileBasedTarget.java │ │ │ │ ├── FileOutputSettings.java │ │ │ │ ├── Files.java │ │ │ │ ├── Identifiable.java │ │ │ │ ├── Spaces.java │ │ │ │ ├── VersionedSource.java │ │ │ │ ├── files │ │ │ │ │ ├── Csv.java │ │ │ │ │ ├── FileChunking.java │ │ │ │ │ ├── FileFormat.java │ │ │ │ │ ├── FileInputSettings.java │ │ │ │ │ ├── GeoJson.java │ │ │ │ │ ├── GeoParquet.java │ │ │ │ │ └── Partitioning.java │ │ │ │ ├── filters │ │ │ │ │ ├── FilteringSource.java │ │ │ │ │ └── Filters.java │ │ │ │ └── streams │ │ │ │ │ ├── DynamicStream.java │ │ │ │ │ └── Notifications.java │ │ │ │ ├── processes │ │ │ │ └── ProcessDescription.java │ │ │ │ ├── service │ │ │ │ ├── Config.java │ │ │ │ ├── JobAdminApi.java │ │ │ │ ├── JobApi.java │ │ │ │ ├── JobApiBase.java │ │ │ │ ├── JobRESTVerticle.java │ │ │ │ ├── JobRouter.java │ │ │ │ └── JobService.java │ │ │ │ ├── steps │ │ │ │ ├── CompilationStepGraph.java │ │ │ │ ├── JobCompiler.java │ │ │ │ ├── StepGraph.java │ │ │ │ ├── compiler │ │ │ │ │ ├── ExportToFiles.java │ │ │ │ │ ├── ImportFromFiles.java │ │ │ │ │ ├── JobCompilationInterceptor.java │ │ │ │ │ └── SpaceCopy.java │ │ │ │ ├── execution │ │ │ │ │ ├── CleanUpExecutor.java │ │ │ │ │ ├── GraphFusionTool.java │ │ │ │ │ ├── GraphTransformer.java │ │ │ │ │ ├── JobExecutor.java │ │ │ │ │ └── StateMachineExecutor.java │ │ │ │ └── resources │ │ │ │ │ └── ResourcesRegistry.java │ │ │ │ └── util │ │ │ │ ├── AsyncS3Client.java │ │ │ │ └── test │ │ │ │ └── JobTestBase.java │ │ └── resources │ │ │ ├── META-INF │ │ │ └── services │ │ │ │ ├── com.here.xyz.jobs.config.JobConfigClient$Provider │ │ │ │ └── com.here.xyz.jobs.steps.impl.tools.ResourceAndTimeCalculator$Provider │ │ │ ├── build.properties │ │ │ ├── job-errors.json │ │ │ ├── jobs.config.json │ │ │ ├── log4j2.component.properties │ │ │ ├── log4j2.json │ │ │ ├── openapi-recipes.yaml │ │ │ └── openapi.yaml │ │ └── test │ │ └── java │ │ └── com │ │ └── here │ │ └── xyz │ │ └── jobs │ │ ├── CopyJobTestIT.java │ │ ├── ExportJobTestIT.java │ │ ├── ImportJobTestIT.java │ │ ├── JobTest.java │ │ └── steps │ │ ├── compiler │ │ └── ExportToFilesTest.java │ │ └── execution │ │ ├── GraphFusionTests.java │ │ ├── JobExecutorTests.java │ │ └── fusion │ │ ├── SimpleTestStep.java │ │ ├── SimpleTestStepWithOutput.java │ │ └── TestStep.java └── xyz-job-steps │ ├── pom.xml │ └── src │ ├── main │ ├── bash │ │ ├── deployLocalLambda.sh │ │ └── environment.json │ ├── java │ │ └── com │ │ │ └── here │ │ │ └── xyz │ │ │ └── jobs │ │ │ ├── JobClientInfo.java │ │ │ ├── RuntimeInfo.java │ │ │ ├── datasets │ │ │ └── filters │ │ │ │ └── SpatialFilter.java │ │ │ ├── steps │ │ │ ├── Config.java │ │ │ ├── S3DataFile.java │ │ │ ├── Step.java │ │ │ ├── StepExecution.java │ │ │ ├── execution │ │ │ │ ├── DelegateStep.java │ │ │ │ ├── JobInternalDelegateStep.java │ │ │ │ ├── LambdaBasedStep.java │ │ │ │ ├── RunEmrJob.java │ │ │ │ ├── StepException.java │ │ │ │ ├── SyncLambdaStep.java │ │ │ │ └── db │ │ │ │ │ ├── Database.java │ │ │ │ │ ├── DatabaseBasedStep.java │ │ │ │ │ └── SingleDatabaseSettings.java │ │ │ ├── impl │ │ │ │ ├── AnalyzeSpaceTable.java │ │ │ │ ├── CreateIndex.java │ │ │ │ ├── DropIndexes.java │ │ │ │ ├── MarkForMaintenance.java │ │ │ │ ├── SpaceBasedStep.java │ │ │ │ ├── tools │ │ │ │ │ └── ResourceAndTimeCalculator.java │ │ │ │ └── transport │ │ │ │ │ ├── CompressFiles.java │ │ │ │ │ ├── CopySpace.java │ │ │ │ │ ├── CopySpacePost.java │ │ │ │ │ ├── CopySpacePre.java │ │ │ │ │ ├── CountSpace.java │ │ │ │ │ ├── ExportChangedTiles.java │ │ │ │ │ ├── ExportSpaceToFiles.java │ │ │ │ │ ├── ImportFilesToSpace.java │ │ │ │ │ ├── TaskedSpaceBasedStep.java │ │ │ │ │ ├── TransportTools.java │ │ │ │ │ └── tools │ │ │ │ │ └── ImportFilesQuickValidator.java │ │ │ ├── inputs │ │ │ │ ├── Input.java │ │ │ │ ├── InputFromOutput.java │ │ │ │ ├── InputsFromJob.java │ │ │ │ ├── InputsFromS3.java │ │ │ │ ├── ModelBasedInput.java │ │ │ │ └── UploadUrl.java │ │ │ ├── outputs │ │ │ │ ├── CreatedVersion.java │ │ │ │ ├── DownloadUrl.java │ │ │ │ ├── FeatureStatistics.java │ │ │ │ ├── ModelBasedOutput.java │ │ │ │ ├── Output.java │ │ │ │ ├── OutputMetadata.java │ │ │ │ └── TileInvalidations.java │ │ │ ├── payloads │ │ │ │ └── StepPayload.java │ │ │ └── resources │ │ │ │ ├── AwsRDSClient.java │ │ │ │ ├── ExecutionResource.java │ │ │ │ ├── IOResource.java │ │ │ │ ├── Load.java │ │ │ │ └── TooManyResourcesClaimed.java │ │ │ └── util │ │ │ ├── AwsClients.java │ │ │ ├── JobWebClient.java │ │ │ ├── S3Client.java │ │ │ ├── S3ClientHelper.java │ │ │ └── test │ │ │ ├── ContentCreator.java │ │ │ └── StepTestBase.java │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ └── com.here.xyz.jobs.steps.impl.tools.ResourceAndTimeCalculator$Provider │ │ ├── build.properties │ │ ├── jobs │ │ └── transport.sql │ │ └── log4j2.json │ └── test │ ├── java │ └── com │ │ └── here │ │ └── xyz │ │ └── jobs │ │ └── steps │ │ ├── CopySpaceStepsTest.java │ │ └── impl │ │ ├── CreateIndexStepTest.java │ │ ├── DropIndexStepTest.java │ │ ├── ImportStepTest.java │ │ ├── StepTest.java │ │ ├── export │ │ ├── CompositeExportStepTest.java │ │ ├── ExportChangedTilesStepTest.java │ │ ├── ExportStepTest.java │ │ ├── ExportStepValidationTest.java │ │ ├── ExportTestBase.java │ │ └── VersionRefExportStepTest.java │ │ └── transport │ │ ├── CompressFilesStepTest.java │ │ └── QuickValidatorTest.java │ └── resources │ ├── testFeatureCollections │ └── fcWithMixedGeometryTypes.geojson │ └── testFiles │ ├── file1.csvgeojson │ ├── file1.csvwkb │ ├── file1.geojson │ ├── file1.geojsonfc │ ├── file2.csvgeojson │ ├── file2.csvwkb │ ├── file2.geojson │ └── file2.geojsonfc ├── xyz-models ├── LICENSE ├── buildSchemas ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── here │ │ │ └── xyz │ │ │ ├── ChangeNotification.java │ │ │ ├── Extensible.java │ │ │ ├── FeatureChange.java │ │ │ ├── LazyParsable.java │ │ │ ├── Payload.java │ │ │ ├── Typed.java │ │ │ ├── XyzSerializable.java │ │ │ ├── bin │ │ │ ├── ConnectorPayload.java │ │ │ └── README │ │ │ ├── events │ │ │ ├── ContentModifiedNotification.java │ │ │ ├── ContextAwareEvent.java │ │ │ ├── DeleteChangesetsEvent.java │ │ │ ├── Event.java │ │ │ ├── EventNotification.java │ │ │ ├── GetChangesetStatisticsEvent.java │ │ │ ├── GetFeaturesByBBoxEvent.java │ │ │ ├── GetFeaturesByGeometryEvent.java │ │ │ ├── GetFeaturesByIdEvent.java │ │ │ ├── GetFeaturesByTileEvent.java │ │ │ ├── GetStatisticsEvent.java │ │ │ ├── GetStorageStatisticsEvent.java │ │ │ ├── HealthCheckEvent.java │ │ │ ├── IterateChangesetsEvent.java │ │ │ ├── IterateFeaturesEvent.java │ │ │ ├── LoadFeaturesEvent.java │ │ │ ├── ModifyFeaturesEvent.java │ │ │ ├── ModifySpaceEvent.java │ │ │ ├── ModifySubscriptionEvent.java │ │ │ ├── OneTimeActionEvent.java │ │ │ ├── PropertiesQuery.java │ │ │ ├── PropertyQuery.java │ │ │ ├── PropertyQueryList.java │ │ │ ├── RelocatedEvent.java │ │ │ ├── SearchForFeaturesEvent.java │ │ │ ├── SelectiveEvent.java │ │ │ ├── SpatialQueryEvent.java │ │ │ ├── TransformEvent.java │ │ │ ├── UpdateStrategy.java │ │ │ └── WriteFeaturesEvent.java │ │ │ ├── models │ │ │ ├── geojson │ │ │ │ ├── HQuad.java │ │ │ │ ├── WebMercatorTile.java │ │ │ │ ├── coordinates │ │ │ │ │ ├── BBox.java │ │ │ │ │ ├── JTSHelper.java │ │ │ │ │ ├── LineStringCoordinates.java │ │ │ │ │ ├── LinearRingCoordinates.java │ │ │ │ │ ├── MultiLineStringCoordinates.java │ │ │ │ │ ├── MultiPointCoordinates.java │ │ │ │ │ ├── MultiPolygonCoordinates.java │ │ │ │ │ ├── PointCoordinates.java │ │ │ │ │ ├── PolygonCoordinates.java │ │ │ │ │ ├── Position.java │ │ │ │ │ ├── PositionList.java │ │ │ │ │ └── WKTHelper.java │ │ │ │ ├── declaration │ │ │ │ │ ├── IBoundedCoordinates.java │ │ │ │ │ └── ILonLat.java │ │ │ │ ├── exceptions │ │ │ │ │ └── InvalidGeometryException.java │ │ │ │ └── implementation │ │ │ │ │ ├── Feature.java │ │ │ │ │ ├── FeatureCollection.java │ │ │ │ │ ├── Geometry.java │ │ │ │ │ ├── GeometryCollection.java │ │ │ │ │ ├── GeometryItem.java │ │ │ │ │ ├── LineString.java │ │ │ │ │ ├── MultiLineString.java │ │ │ │ │ ├── MultiPoint.java │ │ │ │ │ ├── MultiPolygon.java │ │ │ │ │ ├── Point.java │ │ │ │ │ ├── Polygon.java │ │ │ │ │ ├── Properties.java │ │ │ │ │ └── XyzNamespace.java │ │ │ └── hub │ │ │ │ ├── Connector.java │ │ │ │ ├── ConnectorDeserializer.java │ │ │ │ ├── ConnectorSerializer.java │ │ │ │ ├── FeatureModificationList.java │ │ │ │ ├── Ref.java │ │ │ │ ├── Space.java │ │ │ │ ├── Subscription.java │ │ │ │ ├── Tag.java │ │ │ │ └── jwt │ │ │ │ ├── ActionMatrix.java │ │ │ │ ├── AttributeMap.java │ │ │ │ ├── JWTPayload.java │ │ │ │ └── ServiceMatrix.java │ │ │ ├── responses │ │ │ ├── BinaryResponse.java │ │ │ ├── ChangesetsStatisticsResponse.java │ │ │ ├── CountResponse.java │ │ │ ├── DetailedErrorResponse.java │ │ │ ├── ErrorResponse.java │ │ │ ├── HealthStatus.java │ │ │ ├── ModifiedEventResponse.java │ │ │ ├── ModifiedPayloadResponse.java │ │ │ ├── ModifiedResponseResponse.java │ │ │ ├── NotModifiedResponse.java │ │ │ ├── StatisticsResponse.java │ │ │ ├── StorageStatistics.java │ │ │ ├── SuccessResponse.java │ │ │ ├── XyzError.java │ │ │ ├── XyzResponse.java │ │ │ ├── changesets │ │ │ │ ├── Changeset.java │ │ │ │ └── ChangesetCollection.java │ │ │ └── maintenance │ │ │ │ ├── ConnectorStatus.java │ │ │ │ └── SpaceStatus.java │ │ │ └── util │ │ │ ├── Hasher.java │ │ │ └── KeyValue.java │ └── resources │ │ └── ConnectorPayload.fbs │ └── test │ ├── java │ └── com │ │ └── here │ │ └── xyz │ │ ├── JsonMappingTest.java │ │ ├── SerializationTests.java │ │ ├── bin │ │ └── TestConnectorPayload.java │ │ ├── events │ │ └── EventTest.java │ │ ├── models │ │ └── geojson │ │ │ ├── HQuadTest.java │ │ │ ├── WebMercatorTileTest.java │ │ │ ├── coordinates │ │ │ └── test │ │ │ │ ├── BBoxTest.java │ │ │ │ └── JTSConverterTest.java │ │ │ └── implementation │ │ │ ├── LazyParsedFeatureCollectionTest.java │ │ │ ├── TestClone.java │ │ │ ├── TestGeometry.java │ │ │ └── Test_NSxyz.java │ │ └── responses │ │ └── TestBinaryResponse.java │ └── resources │ └── com │ └── here │ └── xyz │ └── test │ ├── ErrorAsFeatureCollection.json │ ├── GetFeaturesByTileEvent.json │ ├── GetFeaturesByTileEvent2.json │ ├── GetFeaturesByTileEvent3.json │ ├── SpaceWithListenersAsList.json │ ├── SpaceWithListenersAsMap.json │ ├── SpaceWithListenersInStrangeOrder.json │ ├── SpaceWithNullListeners.json │ ├── featureMissingType.json │ ├── featureWithNumberId.json │ ├── feature_collection_example.json │ ├── feature_example.json │ ├── features_array.jsonl │ ├── geometries.json │ ├── nullFeature.json │ ├── one_feature.json │ └── processedData.json ├── xyz-psql-connector ├── LICENSE ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── here │ │ │ └── xyz │ │ │ └── psql │ │ │ ├── DatabaseHandler.java │ │ │ ├── DatabaseMaintainer.java │ │ │ ├── DatabaseWriter.java │ │ │ ├── PSQLXyzConnector.java │ │ │ ├── QueryRunner.java │ │ │ ├── factory │ │ │ ├── MaintenanceSQL.java │ │ │ └── TweaksSQL.java │ │ │ ├── query │ │ │ ├── DeleteChangesets.java │ │ │ ├── ExtendedSpace.java │ │ │ ├── GetChangesetStatistics.java │ │ │ ├── GetFastStatistics.java │ │ │ ├── GetFeatures.java │ │ │ ├── GetFeaturesByBBox.java │ │ │ ├── GetFeaturesByBBoxClustered.java │ │ │ ├── GetFeaturesByBBoxTweaked.java │ │ │ ├── GetFeaturesByGeometry.java │ │ │ ├── GetFeaturesByGeometryBuilder.java │ │ │ ├── GetFeaturesById.java │ │ │ ├── GetFeaturesByIdsBuilder.java │ │ │ ├── GetStatistics.java │ │ │ ├── GetStorageStatistics.java │ │ │ ├── InlineQueryRunner.java │ │ │ ├── IterateChangesets.java │ │ │ ├── IterateFeatures.java │ │ │ ├── LoadFeatures.java │ │ │ ├── ModifySpace.java │ │ │ ├── ModifySubscription.java │ │ │ ├── SearchForFeatures.java │ │ │ ├── Spatial.java │ │ │ ├── WriteFeatures.java │ │ │ ├── XyzEventBasedQueryRunner.java │ │ │ ├── XyzQueryRunner.java │ │ │ ├── bbox │ │ │ │ └── GetSamplingStrengthEstimation.java │ │ │ └── helpers │ │ │ │ ├── FetchExistingIds.java │ │ │ │ ├── GetIndexList.java │ │ │ │ ├── GetTablesWithColumn.java │ │ │ │ ├── GetTablesWithComment.java │ │ │ │ ├── TableExists.java │ │ │ │ └── versioning │ │ │ │ ├── GetHeadVersion.java │ │ │ │ ├── GetMinAvailableVersion.java │ │ │ │ ├── GetNextVersion.java │ │ │ │ └── SetVersion.java │ │ │ └── tools │ │ │ └── DhString.java │ └── resources │ │ ├── h3Core.sql │ │ ├── log4j2.properties │ │ └── xyz_ext.sql │ └── test │ ├── java │ └── com │ │ └── here │ │ └── xyz │ │ └── psql │ │ ├── PSQLAbstractIT.java │ │ ├── PSQLConcurrencyIT.java │ │ ├── PSQLDeleteIT.java │ │ ├── PSQLExtendedSpacesIT.java │ │ ├── PSQLHashedSpaceIdIT.java │ │ ├── PSQLIndexIT.java │ │ ├── PSQLLoadFeatures.java │ │ ├── PSQLMetaTableIT.java │ │ ├── PSQLReadIT.java │ │ ├── PSQLResponseSizeIT.java │ │ ├── PSQLSearchIT.java │ │ ├── PSQLWriteIT.java │ │ ├── PSQLXyzConnectorIT.java │ │ ├── PsqlOtaIT.java │ │ └── tools │ │ ├── FeatureGenerator.java │ │ └── Helper.java │ └── resources │ └── events │ ├── BasicSearchByPropertiesAndTagsEvent.json │ ├── DeleteSpaceEvent.json │ ├── GetFeaturesByIdEvent.json │ ├── GetStatisticsEvent.json │ ├── HealthCheckEvent.json │ ├── HealthCheckEventWithAutoIndexing.json │ ├── HealthCheckWithEnableHashedSpaceIdEvent.json │ ├── InsertFeaturesEvent.json │ ├── InsertFeaturesEventTransactional.json │ ├── InsertFeaturesEventWithHash.json │ ├── InsertFeaturesForSearchTestEvent.json │ ├── InsertNullGeometry.json │ ├── IterateMySpace.json │ ├── LoadFeaturesEvent.json │ ├── SearchForFeaturesByPropertiesEvent.json │ ├── SearchForFeaturesEvent.json │ ├── TestCreateTable.json │ └── UpsertFeaturesEvent.json ├── xyz-util ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── here │ │ │ └── xyz │ │ │ ├── psql │ │ │ └── query │ │ │ │ ├── QueryBuilder.java │ │ │ │ └── XyzQueryBuilder.java │ │ │ └── util │ │ │ ├── ARN.java │ │ │ ├── Async.java │ │ │ ├── Compression.java │ │ │ ├── Random.java │ │ │ ├── db │ │ │ ├── ConnectorParameters.java │ │ │ ├── ECPSTool.java │ │ │ ├── JdbcClient.java │ │ │ ├── SQLQuery.java │ │ │ ├── datasource │ │ │ │ ├── CachedPooledDataSources.java │ │ │ │ ├── DataSourceProvider.java │ │ │ │ ├── DatabaseSettings.java │ │ │ │ ├── PooledDataSources.java │ │ │ │ └── StaticDataSources.java │ │ │ └── pg │ │ │ │ ├── IndexHelper.java │ │ │ │ ├── LockHelper.java │ │ │ │ ├── SQLError.java │ │ │ │ ├── Script.java │ │ │ │ └── XyzSpaceTableHelper.java │ │ │ ├── di │ │ │ ├── ImplementationInstanceProvider.java │ │ │ └── ImplementationProvider.java │ │ │ ├── geo │ │ │ ├── GeoTools.java │ │ │ └── GeometryValidator.java │ │ │ ├── openapi │ │ │ └── OpenApiGenerator.java │ │ │ ├── runtime │ │ │ ├── FunctionRuntime.java │ │ │ └── LambdaFunctionRuntime.java │ │ │ ├── service │ │ │ ├── AbstractRouterBuilder.java │ │ │ ├── BaseConfig.java │ │ │ ├── BaseHttpServerVerticle.java │ │ │ ├── ConfigDecryptor.java │ │ │ ├── Core.java │ │ │ ├── HttpException.java │ │ │ ├── Initializable.java │ │ │ ├── aws │ │ │ │ ├── AwsSecretManagerClient.java │ │ │ │ ├── S3ObjectSummary.java │ │ │ │ ├── S3Uri.java │ │ │ │ ├── SecretManagerCredentialsProvider.java │ │ │ │ ├── SimulatedContext.java │ │ │ │ └── dynamo │ │ │ │ │ ├── DynamoClient.java │ │ │ │ │ └── IndexDefinition.java │ │ │ ├── errors │ │ │ │ ├── DetailedHttpException.java │ │ │ │ ├── ErrorDefinition.java │ │ │ │ └── ErrorManager.java │ │ │ ├── logging │ │ │ │ ├── AccessLog.java │ │ │ │ └── LogUtil.java │ │ │ └── rest │ │ │ │ ├── Api.java │ │ │ │ └── TooManyRequestsException.java │ │ │ └── web │ │ │ ├── HubWebClient.java │ │ │ ├── HubWebClientAsync.java │ │ │ └── XyzWebClient.java │ └── resources │ │ ├── docker │ │ ├── Dockerfile │ │ ├── Dockerfile-job-service │ │ ├── Dockerfile-postgres │ │ ├── Dockerfile-postgres.v17 │ │ └── Dockerfile-s3-explorer │ │ └── sql │ │ ├── Exception.js │ │ ├── FeatureWriter.js │ │ ├── README.md │ │ ├── common.sql │ │ ├── feature_writer.sql │ │ └── geo.sql │ └── test │ ├── java │ └── com │ │ └── here │ │ └── xyz │ │ ├── test │ │ ├── AsyncTest.java │ │ ├── EcpsTest.java │ │ ├── SQLGeoQuadFunctions.java │ │ ├── SQLGeoTileCalculationsFunctions.java │ │ ├── SQLITBase.java │ │ ├── SQLQueryIT.java │ │ ├── SQLScriptsIT.java │ │ ├── featurewriter │ │ │ ├── SpaceWriter.java │ │ │ ├── TestSuite.java │ │ │ ├── rest │ │ │ │ ├── RestSpaceWriter.java │ │ │ │ ├── RestTestSuite.java │ │ │ │ ├── composite │ │ │ │ │ ├── history │ │ │ │ │ │ ├── HubComposite_DEFAULT_WithHistoryTestSuiteIT.java │ │ │ │ │ │ ├── HubComposite_EXTENSION_WithHistoryTestSuiteIT.java │ │ │ │ │ │ └── HubComposite_SUPER_WithHistoryTestSuiteIT.java │ │ │ │ │ └── nohistory │ │ │ │ │ │ ├── HubComposite_DEFAULT_NoHistoryTestSuiteIT.java │ │ │ │ │ │ ├── HubComposite_EXTENSION_NoHistoryTestSuiteIT.java │ │ │ │ │ │ └── HubComposite_SUPER_NoHistoryTestSuiteIT.java │ │ │ │ └── noncomposite │ │ │ │ │ ├── history │ │ │ │ │ └── HubNonCompositeWithHistoryTestSuiteIT.java │ │ │ │ │ └── nohistory │ │ │ │ │ └── HubNonCompositeNoHistoryTestSuiteIT.java │ │ │ └── sql │ │ │ │ ├── SQLSpaceWriter.java │ │ │ │ ├── SQLTestSuite.java │ │ │ │ ├── composite │ │ │ │ ├── history │ │ │ │ │ ├── SQLComposite_DEFAULT_WithHistoryTestSuiteIT.java │ │ │ │ │ ├── SQLComposite_EXTENSION_WithHistoryTestSuiteIT.java │ │ │ │ │ └── SQLComposite_SUPER_WithHistoryTestSuiteIT.java │ │ │ │ └── nohistory │ │ │ │ │ ├── SQLComposite_DEFAULT_NoHistoryTestSuiteIT.java │ │ │ │ │ ├── SQLComposite_EXTENSION_NoHistoryTestSuiteIT.java │ │ │ │ │ └── SQLComposite_SUPER_NoHistoryTestSuiteIT.java │ │ │ │ └── noncomposite │ │ │ │ ├── history │ │ │ │ └── SQLNonCompositeWithHistoryTestSuiteIT.java │ │ │ │ └── nohistory │ │ │ │ └── SQLNonCompositeNoHistoryTestSuiteIT.java │ │ └── util │ │ │ └── geo │ │ │ └── GeometryValidatorIT.java │ │ └── util │ │ ├── db │ │ └── SQLQueryUnitTests.java │ │ └── service │ │ └── aws │ │ └── S3UriTest.java │ ├── js │ ├── db │ │ └── featurewriter │ │ │ ├── JsSpaceWriter.js │ │ │ └── TestFeatureWriter.js │ ├── package.json │ └── plv8.js │ └── resources │ ├── functions0 │ └── functions.sql │ ├── functions2 │ └── functions.sql │ ├── junit-platform.properties │ └── sqlSamples │ └── functions.sql └── xyz.svg /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @heremaps/xyz-hub -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.iws 3 | *.ipr 4 | .vertx/ 5 | .idea/ 6 | target/ 7 | file-uploads/ 8 | release.properties -------------------------------------------------------------------------------- /.run/CService.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | -------------------------------------------------------------------------------- /.run/JobService.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 19 | -------------------------------------------------------------------------------- /.run/_wait for xyz-job-steps [debug].run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | -------------------------------------------------------------------------------- /.run/xyz-job-steps [debug].run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | The team behind the [XYZ Hub](https://github.com/heremaps/xyz-hub) gratefully accepts contributions via 4 | [pull requests](https://help.github.com/articles/about-pull-requests/) filed against the 5 | [GitHub project](https://github.com/heremaps/xyz-hub/pulls). 6 | 7 | # Signing each Commit 8 | 9 | As part of filing a pull request we ask you to sign off the 10 | [Developer Certificate of Origin](https://developercertificate.org/) (DCO) in each commit. 11 | Any Pull Request with commits that are not signed off will be reject by the 12 | [DCO check](https://probot.github.io/apps/dco/). 13 | 14 | A DCO is lightweight way for a contributor to confirm that you wrote or otherwise have the right 15 | to submit code or documentation to a project. Simply add `Signed-off-by` as shown in the example below 16 | to indicate that you agree with the DCO. 17 | 18 | An example signed commit message: 19 | 20 | ``` 21 | README.md: Fix minor spelling mistake 22 | 23 | Signed-off-by: John Doe 24 | ``` 25 | 26 | Git has the `-s` flag that can sign a commit for you, see example below: 27 | 28 | `$ git commit -s -m 'README.md: Fix minor spelling mistake'` 29 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/httpconnector/util/Futures.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.httpconnector.util; 2 | 3 | import io.vertx.core.Future; 4 | 5 | /** 6 | * Some utility methods to work with Futures. 7 | */ 8 | public class Futures { 9 | 10 | public static Future futurify(ThrowingMapper mapper) { 11 | try { 12 | return Future.succeededFuture(mapper.map()); 13 | } 14 | catch (Exception e) { 15 | return Future.failedFuture(e); 16 | } 17 | } 18 | 19 | @FunctionalInterface 20 | public interface ThrowingMapper { 21 | F map() throws Exception; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/httpconnector/util/emr/config/EmrConfig.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.httpconnector.util.emr.config; 2 | 3 | import com.here.xyz.XyzSerializable; 4 | import java.util.List; 5 | 6 | public class EmrConfig implements XyzSerializable { 7 | private List steps; 8 | 9 | public List getSteps() { 10 | return steps; 11 | } 12 | 13 | public void setSteps(List steps) { 14 | this.steps = steps; 15 | } 16 | 17 | public EmrConfig withSteps(List steps) { 18 | setSteps(steps); 19 | return this; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/httpconnector/util/jobs/JDBCBasedJob.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.httpconnector.util.jobs; 2 | 3 | import static io.netty.handler.codec.http.HttpResponseStatus.BAD_GATEWAY; 4 | 5 | import com.here.xyz.httpconnector.task.StatusHandler; 6 | import com.here.xyz.util.service.HttpException; 7 | import io.vertx.core.Future; 8 | 9 | public abstract class JDBCBasedJob extends Job { 10 | 11 | @Override 12 | public Future executeAbort() { 13 | return super.executeAbort() 14 | //Job will fail - because SQL Queries are getting terminated 15 | .compose(job -> StatusHandler.getInstance().abortJob(this), 16 | e -> Future.failedFuture(new HttpException(BAD_GATEWAY, "Abort failed [" + getStatus() + "]"))) 17 | .map(v -> this); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/auth/AuthorizationType.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.hub.auth; 2 | 3 | public enum AuthorizationType { 4 | JWT, 5 | DUMMY 6 | } 7 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/auth/CompositeAuthorizationHandler.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.hub.auth; 2 | 3 | import io.vertx.core.Future; 4 | import io.vertx.ext.web.RoutingContext; 5 | 6 | public interface CompositeAuthorizationHandler { 7 | Future authorize(RoutingContext context); 8 | } 9 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/auth/XyzHubCompositeAuthorizationHandler.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.hub.auth; 2 | 3 | import io.vertx.core.Future; 4 | import io.vertx.ext.web.RoutingContext; 5 | 6 | public class XyzHubCompositeAuthorizationHandler implements CompositeAuthorizationHandler { 7 | 8 | public Future authorize(RoutingContext context) { 9 | return Future.succeededFuture(true); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/cache/CacheClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2023 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.cache; 21 | 22 | import io.vertx.core.Future; 23 | 24 | public interface CacheClient { 25 | 26 | Future get(String key); 27 | 28 | /** 29 | * 30 | * @param key 31 | * @param value 32 | * @param ttl The live time of the cache-record in seconds 33 | */ 34 | void set(String key, byte[] value, long ttl); 35 | 36 | void remove(String key); 37 | 38 | void shutdown(); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/cache/NoopCacheClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2023 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.cache; 21 | 22 | import io.vertx.core.Future; 23 | 24 | public class NoopCacheClient implements CacheClient { 25 | 26 | @Override 27 | public Future get(String key) { 28 | return Future.succeededFuture(null); 29 | } 30 | 31 | @Override 32 | public void set(String key, byte[] value, long ttl) { 33 | } 34 | 35 | @Override 36 | public void remove(String key) { 37 | } 38 | 39 | @Override 40 | public void shutdown() { 41 | //Nothing to do. 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/connectors/test/DummyEncryptingPreProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2020 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.connectors.test; 21 | 22 | import com.here.xyz.connectors.EncryptingProcessorConnector; 23 | 24 | public class DummyEncryptingPreProcessor extends EncryptingProcessorConnector { 25 | 26 | /** 27 | * Default constructor to set the needed values for automatic encryption. 28 | */ 29 | public DummyEncryptingPreProcessor() { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/connectors/test/DummyListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.connectors.test; 21 | 22 | import com.here.xyz.connectors.ListenerConnector; 23 | 24 | // TODO move this class and the com.here.xyz.hub.connectors.test.DummyPreProcessor to a separate TEST connector lib 25 | public class DummyListener extends ListenerConnector { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/connectors/test/DummyPreProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.connectors.test; 21 | 22 | import com.here.xyz.connectors.NotificationParams; 23 | import com.here.xyz.connectors.ProcessorConnector; 24 | import com.here.xyz.events.ModifySpaceEvent; 25 | 26 | public class DummyPreProcessor extends ProcessorConnector { 27 | @Override 28 | protected ModifySpaceEvent processModifySpace(ModifySpaceEvent event, NotificationParams notificationParams) { 29 | return event; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/connectors/test/ExceptionPreProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.connectors.test; 21 | 22 | import com.here.xyz.connectors.NotificationParams; 23 | import com.here.xyz.connectors.ProcessorConnector; 24 | import com.here.xyz.events.ModifyFeaturesEvent; 25 | 26 | public class ExceptionPreProcessor extends ProcessorConnector { 27 | @Override 28 | protected ModifyFeaturesEvent processModifyFeatures(ModifyFeaturesEvent event, NotificationParams notificationParams) throws Exception { 29 | throw new Exception("Foo"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/rest/HistoryQueryApi.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heremaps/xyz-hub/5a632e298bb1202ebf86fcde028f6f615f17f9dc/xyz-hub-service/src/main/java/com/here/xyz/hub/rest/HistoryQueryApi.java -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/spi/Modules.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.hub.spi; 2 | 3 | import com.here.xyz.hub.auth.CompositeAuthorizationHandler; 4 | import java.util.Optional; 5 | import java.util.ServiceLoader; 6 | import java.util.ServiceLoader.Provider; 7 | import org.apache.logging.log4j.LogManager; 8 | import org.apache.logging.log4j.Logger; 9 | 10 | public final class Modules { 11 | private static final Logger logger = LogManager.getLogger(); 12 | private static final CompositeAuthorizationHandler authorizationHandlerInstance = load(CompositeAuthorizationHandler.class); 13 | 14 | 15 | public static CompositeAuthorizationHandler getCompositeAuthorizationHandler() { 16 | return authorizationHandlerInstance; 17 | } 18 | 19 | private static T load(Class klass) { 20 | ServiceLoader loader = ServiceLoader.load(klass); 21 | Optional> optionalProvider = loader.stream().findFirst(); 22 | 23 | if (optionalProvider.isEmpty()) { 24 | logger.fatal("Module not present: " + klass); 25 | throw new RuntimeException(); 26 | } 27 | 28 | return optionalProvider.get().get(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/util/ByteSizeAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.util; 21 | 22 | public interface ByteSizeAware { 23 | long getByteSize(); 24 | } 25 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/util/health/checks/ClusterHealthCheck.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.hub.util.health.checks; 2 | 3 | import static com.here.xyz.hub.util.health.schema.Status.Result.ERROR; 4 | import static com.here.xyz.hub.util.health.schema.Status.Result.OK; 5 | 6 | import com.here.xyz.hub.rest.admin.Node; 7 | import com.here.xyz.hub.util.health.schema.Response; 8 | import com.here.xyz.hub.util.health.schema.Status; 9 | 10 | public class ClusterHealthCheck extends ExecutableCheck { 11 | 12 | public ClusterHealthCheck() { 13 | setName("Cluster"); 14 | setTarget(Target.REMOTE); 15 | } 16 | 17 | @Override 18 | public Status execute() { 19 | Status s = new Status().withResult(OK); 20 | Response r = new Response(); 21 | try { 22 | r.setAdditionalProperty("nodes", Node.getClusterNodes()); 23 | s.setResult(OK); 24 | } 25 | catch (Exception e) { 26 | r.setMessage("Error: " + e.getMessage()); 27 | s.setResult(ERROR); 28 | } 29 | setResponse(r); 30 | return s; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/util/health/checks/DBHealthCheck.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | package com.here.xyz.hub.util.health.checks; 20 | 21 | import java.net.URI; 22 | 23 | public abstract class DBHealthCheck extends ExecutableCheck { 24 | 25 | public DBHealthCheck(URI connectionString) { 26 | this.connectionString = connectionString; 27 | setTarget(Target.REMOTE); 28 | setRole(Role.DATABASE); 29 | } 30 | 31 | public URI connectionString; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/util/health/schema/HTTPResultMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | package com.here.xyz.hub.util.health.schema; 20 | 21 | import com.fasterxml.jackson.annotation.JsonIgnore; 22 | import java.net.HttpURLConnection; 23 | 24 | public interface HTTPResultMapper { 25 | 26 | Status.Result getResult(); 27 | 28 | @JsonIgnore 29 | default int getSuggestedHTTPStatusCode() { 30 | switch (getResult()) { 31 | case OK: 32 | case WARNING: 33 | return HttpURLConnection.HTTP_OK; 34 | case UNKNOWN: 35 | default: 36 | case UNAVAILABLE: 37 | case ERROR: 38 | case CRITICAL: 39 | case MAINTENANCE: 40 | return HttpURLConnection.HTTP_UNAVAILABLE; 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/util/health/schema/Public.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | package com.here.xyz.hub.util.health.schema; 20 | 21 | public class Public { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/util/metrics/MemoryMetric.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.util.metrics; 21 | 22 | import static com.here.xyz.hub.util.metrics.base.Metric.MetricUnit.PERCENT; 23 | 24 | import com.here.xyz.hub.Service; 25 | import com.here.xyz.hub.util.metrics.base.BareValuesMetric; 26 | import java.util.Collection; 27 | import java.util.Collections; 28 | 29 | public class MemoryMetric extends BareValuesMetric { 30 | 31 | public MemoryMetric(String metricName) { 32 | super(metricName, PERCENT); 33 | } 34 | 35 | @Override 36 | protected Collection gatherValues() { 37 | return Collections.singleton((double) Service.getUsedMemoryPercent()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/util/metrics/base/AttributedMetricCollector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.util.metrics.base; 21 | 22 | import com.here.xyz.hub.util.metrics.base.AttributedMetricCollection.Attribute; 23 | import java.util.Collection; 24 | import java.util.Map; 25 | 26 | public abstract class AttributedMetricCollector extends Metric, V>>{ 27 | 28 | public AttributedMetricCollector(String metricName, MetricUnit unit) { 29 | super(metricName, unit); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/util/metrics/base/BareValuesMetric.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.util.metrics.base; 21 | 22 | import java.util.Collection; 23 | 24 | public abstract class BareValuesMetric extends Metric> { 25 | 26 | public BareValuesMetric(String metricName, MetricUnit unit) { 27 | super(metricName, unit); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/java/com/here/xyz/hub/util/metrics/base/Metric.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.util.metrics.base; 21 | 22 | public abstract class Metric { 23 | 24 | private String metricName; 25 | private MetricUnit unit; 26 | 27 | public Metric(String metricName, MetricUnit unit) { 28 | this.metricName = metricName; 29 | this.unit = unit; 30 | } 31 | 32 | public String getName() { 33 | return metricName; 34 | } 35 | 36 | public MetricUnit getUnit() { 37 | return unit; 38 | } 39 | 40 | protected abstract V gatherValues(); 41 | 42 | public enum MetricUnit { 43 | COUNT, 44 | PERCENT, 45 | BYTES, 46 | MILLISECONDS 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/META-INF/services/com.here.xyz.httpconnector.util.emr.EMRManager$Provider: -------------------------------------------------------------------------------- 1 | com.here.xyz.httpconnector.util.emr.EMRManager$Provider -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/META-INF/services/com.here.xyz.hub.auth.CompositeAuthorizationHandler: -------------------------------------------------------------------------------- 1 | com.here.xyz.hub.auth.XyzHubCompositeAuthorizationHandler -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/META-INF/services/com.here.xyz.hub.config.SpaceConfigClient$Provider: -------------------------------------------------------------------------------- 1 | com.here.xyz.hub.config.dynamo.DynamoSpaceConfigClient$Provider 2 | com.here.xyz.hub.config.jdbc.JDBCSpaceConfigClient$Provider 3 | com.here.xyz.hub.config.memory.InMemSpaceConfigClient$Provider -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/META-INF/services/com.here.xyz.hub.spi.RestConfiguration: -------------------------------------------------------------------------------- 1 | com.here.xyz.hub.spi.XyzHubRestConfiguration -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/auth/dummyJwt.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | {} 6 | ], 7 | "createFeatures": [ 8 | {} 9 | ], 10 | "updateFeatures": [ 11 | {} 12 | ], 13 | "deleteFeatures": [ 14 | {} 15 | ], 16 | "manageSpaces": [ 17 | {} 18 | ], 19 | "adminSpaces": [ 20 | {} 21 | ], 22 | "managePackages": [ 23 | {} 24 | ], 25 | "accessConnectors": [ 26 | {} 27 | ], 28 | "manageConnectors": [ 29 | {} 30 | ], 31 | "useCapabilities": [ 32 | {} 33 | ], 34 | "useAdminCapabilities": [ 35 | {} 36 | ] 37 | } 38 | }, 39 | "aid": "ANONYMOUS", 40 | "skipAuth": true, 41 | "iat": 1577833200, 42 | "exp": 2000000000 43 | } -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/auth/jwt.pub: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0XyPlkIr5oFvTiSg9MAM 3 | goY5gLXwX7uY2TsegfCO7x80ZixTJIjW+gfCdtGJtkCdl5a15YV8la0jnBqneprg 4 | asdjsxAldWUkKtA8MiEAylRM88OYC3menXvhZFyOE3NurV6oSQtMIKggg1nejCwV 5 | fVfAaHTtuTnP9Bez0wDlm4MO64cRE7JwspMjEI3rOwZcI7qQJ1cM0NQmm4WEXtef 6 | OSoucJ2WPuGM+Zhu32kMb3MUvJKlkicssr8fsNF/HQ8zN2NVvpitLThn+CYM3xkZ 7 | AanY2+88OBK9kjwPtJQR0KQ2EKC4KYT/6prM/triwerLoy32ioLnNNWB/O9Onaei 8 | qQIDAQAB 9 | -----END PUBLIC KEY----- -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017-2024 HERE Europe B.V. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # SPDX-License-Identifier: Apache-2.0 17 | # License-Filename: LICENSE 18 | # 19 | 20 | build.version=${project.version} 21 | build.time=${build.time} 22 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/connector-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "LOG_CONFIG": "log4j2-console-plain.json", 3 | "HTTP_PORT": 9090, 4 | "ECPS_PHRASE": "local", 5 | 6 | "DB_STATEMENT_TIMEOUT_IN_S" : 86400, 7 | "DB_ACQUIRE_RETRY_ATTEMPTS" : 10, 8 | "DB_CHECKOUT_TIMEOUT" : 10, 9 | 10 | "STORAGE_DB_URL": "jdbc:postgresql://localhost/postgres", 11 | "STORAGE_DB_USER": "postgres", 12 | "STORAGE_DB_PASSWORD": "password", 13 | 14 | "MAX_CONCURRENT_MAINTENANCE_TASKS" : 1 , 15 | "MISSING_MAINTENANCE_WARNING_IN_HR" : 12, 16 | 17 | "STORAGE_DB_URL": "jdbc:postgresql://localhost/postgres", 18 | "STORAGE_DB_USER": "postgres", 19 | "STORAGE_DB_PASSWORD": "password", 20 | 21 | "LOCALSTACK_ENDPOINT" : "http://localhost:4566", 22 | 23 | "JOBS_S3_BUCKET": "test-bucket", 24 | "JOBS_REGION": "eu-west-1", 25 | "JOB_CHECK_QUEUE_INTERVAL_MILLISECONDS" : 130, 26 | "JOB_DB_POOL_SIZE_PER_CLIENT" : 10, 27 | "JOB_DB_POOL_SIZE_PER_STATUS_CLIENT" : 5, 28 | "JOB_DB_POOL_SIZE_PER_MAINTENANCE_CLIENT" : 15, 29 | 30 | "JOB_MAX_RDS_MAX_ACU_UTILIZATION" : 70, 31 | 32 | "JOB_MAX_RDS_INFLIGHT_IMPORT_BYTES" : 32212254720, 33 | "JOB_MAX_RDS_MAX_RUNNING_IDX_CREATIONS" : 10, 34 | "JOB_MAX_RDS_MAX_RUNNING_IMPORT_QUERIES" : 10, 35 | 36 | "JOB_SUPPORTED_RDS" : ["psql:0","c1:0"], 37 | "HUB_ENDPOINT" : "http://localhost:8080/hub" 38 | } -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/log4j2-console-json.json: -------------------------------------------------------------------------------- 1 | { 2 | "configuration": { 3 | "status": "info", 4 | "name": "Default Log Config", 5 | "packages": "com.here.xyz", 6 | "appenders": { 7 | "Console": { 8 | "name": "STDOUT", 9 | "PatternLayout": { 10 | "MarkerPatternSelector": { 11 | "defaultPattern": "{\"t\":\"%p\",\"time\":\"%d{ISO8601}\",\"unixtime\":\"%d{UNIX_MILLIS}\",\"msg\":\"%enc{%.-4096msg%ex}{JSON} \",\"streamId\":\"%marker\",\"src\":\"%c\"}%n%xEx{none}", 12 | "PatternMatch": { 13 | "key": "ACCESS", 14 | "pattern": "%m%n" 15 | } 16 | } 17 | } 18 | } 19 | }, 20 | "loggers": { 21 | "root": { 22 | "level": "info", 23 | "AppenderRef": { 24 | "ref": "STDOUT" 25 | } 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/log4j2-console-plain.json: -------------------------------------------------------------------------------- 1 | { 2 | "configuration": { 3 | "status": "info", 4 | "name": "Default Log Config", 5 | "packages": "com.here.xyz", 6 | "appenders": { 7 | "Console": { 8 | "name": "STDOUT", 9 | "PatternLayout": { 10 | "pattern": "%d %-5p %c{1} %.-4096msg %enc{%ex}{JSON}%n%xEx{none}" 11 | } 12 | } 13 | }, 14 | "loggers": { 15 | "root": { 16 | "level": "info", 17 | "AppenderRef": { 18 | "ref": "STDOUT" 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/log4j2-docker-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "configuration": { 3 | "status": "info", 4 | "name": "Default Log Config", 5 | "packages": "com.here.xyz", 6 | "appenders": { 7 | "RollingRandomAccessFile": { 8 | "name": "RollingFile-Appender", 9 | "fileName": "${env:LOG_PATH}/trace.log.0", 10 | "filePattern": "${env:LOG_PATH}/trace.log.%i", 11 | "PatternLayout": { 12 | "MarkerPatternSelector": { 13 | "defaultPattern": "{\"t\":\"%p\",\"time\":\"%d{ISO8601}\",\"unixtime\":\"%d{UNIX_MILLIS}\",\"msg\":\"%enc{%.-4096msg%ex}{JSON} \",\"streamId\":\"%marker\",\"src\":\"%c\"}%n%xEx{none}", 14 | "PatternMatch": { 15 | "key": "ACCESS", 16 | "pattern": "%m%n" 17 | } 18 | } 19 | }, 20 | "Policies": { 21 | "SizeBasedTriggeringPolicy": { 22 | "size": "64 MB" 23 | } 24 | }, 25 | "DefaultRolloverStrategy": { 26 | "max": "2" 27 | } 28 | } 29 | }, 30 | "loggers": { 31 | "root": { 32 | "level": "info", 33 | "AppenderRef": { 34 | "ref": "RollingFile-Appender" 35 | } 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/log4j2-docker.json: -------------------------------------------------------------------------------- 1 | { 2 | "configuration": { 3 | "status": "info", 4 | "name": "Default Log Config", 5 | "packages": "com.here.xyz", 6 | "appenders": { 7 | "RollingRandomAccessFile": { 8 | "name": "RollingFile-Appender", 9 | "fileName": "${env:LOG_PATH}/trace.log.0", 10 | "filePattern": "${env:LOG_PATH}/trace.log.%i", 11 | "PatternLayout": { 12 | "MarkerPatternSelector": { 13 | "defaultPattern": "{\"time\":\"%d{ISO8601}\",\"t\":\"%p\",\"unixtime\":\"%d{UNIX_MILLIS}\",\"msg\":\"%enc{%.-4096msg%ex}{JSON} \",\"streamId\":\"%marker\",\"src\":\"%c\"}%n%xEx{none}", 14 | "PatternMatch": { 15 | "key": "ACCESS", 16 | "pattern": "%m%n" 17 | } 18 | } 19 | }, 20 | "Policies": { 21 | "SizeBasedTriggeringPolicy": { 22 | "size": "64 MB" 23 | } 24 | }, 25 | "DefaultRolloverStrategy": { 26 | "max": "2" 27 | } 28 | } 29 | }, 30 | "loggers": { 31 | "root": { 32 | "level": "warn", 33 | "AppenderRef": { 34 | "ref": "RollingFile-Appender" 35 | } 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/log4j2.component.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017-2019 HERE Europe B.V. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # SPDX-License-Identifier: Apache-2.0 17 | # License-Filename: LICENSE 18 | # 19 | 20 | log4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector 21 | log4j2.asyncLoggerRingBufferSize=65536 22 | log4j2.asyncQueueFullPolicy=Discard 23 | log4j2.discardThreshold=INFO 24 | log4j2.clock=CachedClock 25 | -------------------------------------------------------------------------------- /xyz-hub-service/src/main/resources/settings.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "id": "SpaceStorageMatchingMap", 3 | "data": { 4 | "^.*:test$": { 5 | "local": "psql_db2_hashed" 6 | } 7 | } 8 | }] -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/RestTests.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.hub.rest; 2 | 3 | public interface RestTests { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/httpconnector/HCDeleteFeatureApiIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.httpconnector; 21 | 22 | import com.here.xyz.hub.rest.DeleteFeatureApiIT; 23 | import org.junit.AfterClass; 24 | import org.junit.BeforeClass; 25 | 26 | public class HCDeleteFeatureApiIT extends DeleteFeatureApiIT { 27 | 28 | @BeforeClass 29 | public static void setupClass() { 30 | usedStorageId = httpStorageId; 31 | DeleteFeatureApiIT.setupClass(); 32 | } 33 | 34 | @AfterClass 35 | public static void tearDownClass() { 36 | usedStorageId = embeddedStorageId; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/httpconnector/HCPropertiesSearch2IT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.httpconnector; 21 | 22 | import com.here.xyz.hub.rest.PropertiesSearch2IT; 23 | import org.junit.AfterClass; 24 | import org.junit.BeforeClass; 25 | 26 | @SuppressWarnings("unused") 27 | public class HCPropertiesSearch2IT extends PropertiesSearch2IT { 28 | 29 | @BeforeClass 30 | public static void setup() { 31 | usedStorageId = httpStorageId; 32 | PropertiesSearch2IT.setup(); 33 | } 34 | 35 | @AfterClass 36 | public static void tearDown() { 37 | usedStorageId = embeddedStorageId; 38 | remove(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/httpconnector/HCPropertiesSearchIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.httpconnector; 21 | 22 | import com.here.xyz.hub.rest.PropertiesSearchIT; 23 | import org.junit.AfterClass; 24 | import org.junit.BeforeClass; 25 | 26 | @SuppressWarnings("unused") 27 | public class HCPropertiesSearchIT extends PropertiesSearchIT { 28 | 29 | @BeforeClass 30 | public static void setup() { 31 | usedStorageId = httpStorageId; 32 | PropertiesSearchIT.setup(); 33 | } 34 | 35 | @AfterClass 36 | public static void tearDown() { 37 | usedStorageId = embeddedStorageId; 38 | remove(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/httpconnector/HCReadFeatureApiGeomIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.httpconnector; 21 | 22 | import com.here.xyz.hub.rest.ReadFeatureApiGeomIT; 23 | import org.junit.AfterClass; 24 | import org.junit.BeforeClass; 25 | 26 | public class HCReadFeatureApiGeomIT extends ReadFeatureApiGeomIT { 27 | 28 | @BeforeClass 29 | public static void setup() { 30 | usedStorageId = httpStorageId; 31 | ReadFeatureApiGeomIT.setup(); 32 | } 33 | @AfterClass 34 | public static void tearDown() { 35 | usedStorageId = embeddedStorageId; 36 | remove(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/httpconnector/HCReadFeatureApiIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.httpconnector; 21 | 22 | import com.here.xyz.hub.rest.ReadFeatureApiIT; 23 | import org.junit.AfterClass; 24 | import org.junit.BeforeClass; 25 | 26 | public class HCReadFeatureApiIT extends ReadFeatureApiIT { 27 | 28 | @BeforeClass 29 | public static void setup() { 30 | usedStorageId = httpStorageId; 31 | ReadFeatureApiIT.setup(); 32 | } 33 | @AfterClass 34 | public static void tearDown() { 35 | usedStorageId = embeddedStorageId; 36 | remove(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/versioning/VDeleteFeatureApiIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.versioning; 21 | 22 | import com.here.xyz.hub.rest.DeleteFeatureApiIT; 23 | import org.junit.After; 24 | import org.junit.Before; 25 | 26 | public class VDeleteFeatureApiIT extends DeleteFeatureApiIT { 27 | 28 | @Before 29 | public void setup() { 30 | VersioningBaseIT.setup(); 31 | } 32 | 33 | @After 34 | public void tearDown() { 35 | VersioningBaseIT.tearDown(); 36 | } 37 | 38 | @Override 39 | protected void countFeatures(int expected) { 40 | VersioningBaseIT.countExpected(expected); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/versioning/VModifyFeatureCompositeSpaceIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.versioning; 21 | 22 | import com.here.xyz.hub.rest.ModifyFeatureCompositeSpaceIT; 23 | import org.junit.Before; 24 | 25 | public class VModifyFeatureCompositeSpaceIT extends ModifyFeatureCompositeSpaceIT { 26 | 27 | @Before 28 | public void setup() { 29 | tearDown(); 30 | 31 | String spaceId = "x-psql-test"; 32 | VersioningBaseIT.createSpace(spaceId, getCreateSpacePath(), 10); 33 | createSpaceWithCustomStorage(spaceId + "-2", "psql", null); 34 | createSpaceWithExtension(spaceId); 35 | createSpaceWithExtension(spaceId + "-ext"); 36 | 37 | touchSpaces(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/versioning/VPropertiesSearch2IT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.versioning; 21 | 22 | import com.here.xyz.hub.rest.PropertiesSearch2IT; 23 | import org.junit.AfterClass; 24 | import org.junit.BeforeClass; 25 | 26 | public class VPropertiesSearch2IT extends PropertiesSearch2IT { 27 | 28 | @BeforeClass 29 | public static void setup() { 30 | String spaceId = "x-psql-test"; 31 | removeSpace(spaceId); 32 | VersioningBaseIT.createSpace(spaceId, getCreateSpacePath(), 10); 33 | addFeatures(); 34 | } 35 | @AfterClass 36 | public static void tearDown() { 37 | VersioningBaseIT.tearDown(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/versioning/VPropertiesSearchIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.versioning; 21 | 22 | import com.here.xyz.hub.rest.PropertiesSearchIT; 23 | import org.junit.AfterClass; 24 | import org.junit.BeforeClass; 25 | 26 | public class VPropertiesSearchIT extends PropertiesSearchIT { 27 | 28 | @BeforeClass 29 | public static void setup() { 30 | VersioningBaseIT.setup(); 31 | } 32 | @AfterClass 33 | public static void tearDown() { 34 | VersioningBaseIT.tearDown(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/versioning/VReadFeatureApiGeomIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.versioning; 21 | 22 | import com.here.xyz.hub.rest.ReadFeatureApiGeomIT; 23 | import org.junit.AfterClass; 24 | import org.junit.BeforeClass; 25 | 26 | public class VReadFeatureApiGeomIT extends ReadFeatureApiGeomIT { 27 | 28 | @BeforeClass 29 | public static void setup() { 30 | String spaceId = "x-psql-test"; 31 | removeSpace(spaceId); 32 | VersioningBaseIT.createSpace(spaceId, getCreateSpacePath(), 10); 33 | addFeatures(spaceId, "/xyz/hub/mixedGeometryTypes.json", 11); 34 | } 35 | @AfterClass 36 | public static void tearDown() { 37 | VersioningBaseIT.tearDown(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/versioning/VReadFeatureApiIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.versioning; 21 | 22 | import com.here.xyz.hub.rest.ReadFeatureApiIT; 23 | import org.junit.AfterClass; 24 | import org.junit.BeforeClass; 25 | 26 | public class VReadFeatureApiIT extends ReadFeatureApiIT { 27 | 28 | @BeforeClass 29 | public static void setup() { 30 | VersioningBaseIT.setup(); 31 | } 32 | @AfterClass 33 | public static void tearDown() { 34 | VersioningBaseIT.tearDown(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/versioning/VStoreFeaturesApiIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.versioning; 21 | 22 | import com.here.xyz.hub.rest.StoreFeaturesApiIT; 23 | import org.junit.After; 24 | import org.junit.Before; 25 | 26 | public class VStoreFeaturesApiIT extends StoreFeaturesApiIT { 27 | 28 | @Before 29 | public void setup() { 30 | String spaceId = "x-psql-test"; 31 | removeSpace(spaceId); 32 | VersioningBaseIT.createSpace(spaceId, getCreateSpacePath(), 10); 33 | } 34 | @After 35 | public void tearDown() { 36 | VersioningBaseIT.tearDown(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/java/com/here/xyz/hub/rest/versioning/VUpdateFeatureApiIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.hub.rest.versioning; 21 | 22 | import com.here.xyz.hub.rest.UpdateFeatureApiIT; 23 | import org.junit.After; 24 | import org.junit.Before; 25 | 26 | public class VUpdateFeatureApiIT extends UpdateFeatureApiIT { 27 | 28 | @Before 29 | public void setup() { 30 | VersioningBaseIT.setup(); 31 | } 32 | @After 33 | public void tearDown() { 34 | VersioningBaseIT.tearDown(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_ADMIN_MESSAGING.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "useAdminCapabilities": [ 5 | { 6 | "id": "messaging" 7 | } 8 | ] 9 | } 10 | }, 11 | "aid": "XYZ-01234567-89ab-cdef-0123-456789abcdef", 12 | "iat": 1521982864, 13 | "exp": 2000000000 14 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_ADMIN_STATISTICS.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "useAdminCapabilities": [ 5 | { 6 | "id": "statistics" 7 | } 8 | ] 9 | } 10 | }, 11 | "aid": "XYZ-01234567-89ab-cdef-0123-456789abcdef", 12 | "iat": 1521982864, 13 | "exp": 2000000000 14 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_ALL.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | {} 6 | ], 7 | "createFeatures": [ 8 | {} 9 | ], 10 | "updateFeatures": [ 11 | {} 12 | ], 13 | "deleteFeatures": [ 14 | {} 15 | ], 16 | "manageSpaces": [ 17 | {} 18 | ], 19 | "adminSpaces": [ 20 | {} 21 | ], 22 | "accessConnectors": [ 23 | {} 24 | ], 25 | "manageConnectors": [ 26 | {} 27 | ], 28 | "useCapabilities": [ 29 | {} 30 | ] 31 | } 32 | }, 33 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 34 | "iat": 1521982864, 35 | "exp": 2000000000 36 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_ADMIN.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "adminSpaces": [ 30 | { 31 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 32 | } 33 | ] 34 | } 35 | }, 36 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 37 | "iat": 1521982864, 38 | "exp": 2000000000 39 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_MANAGE_ALL_SPACES_ONLY.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | {} 6 | ] 7 | } 8 | }, 9 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 10 | "iat": 1521982864, 11 | "exp": 2000000000 12 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_MANAGE_PACKAGES_HERE.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "managePackages": [ 30 | { 31 | "id": "HERE" 32 | } 33 | ] 34 | } 35 | }, 36 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 37 | "iat": 1521982864, 38 | "exp": 2000000000 39 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_MANAGE_PACKAGES_HERE_OSM.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "managePackages": [ 30 | { 31 | "id": "HERE" 32 | }, 33 | { 34 | "id": "OSM" 35 | } 36 | ] 37 | } 38 | }, 39 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 40 | "iat": 1521982864, 41 | "exp": 2000000000 42 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_MANAGE_PACKAGES_HERE_WITH_OWNER.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "managePackages": [ 30 | { 31 | "id": "HERE", 32 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 33 | } 34 | ] 35 | } 36 | }, 37 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 38 | "iat": 1521982864, 39 | "exp": 2000000000 40 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_NO_ADMIN.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ] 29 | } 30 | }, 31 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 32 | "iat": 1521982864, 33 | "exp": 2000000000 34 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_READ_ALL_FEATURES.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | {} 6 | ], 7 | "createFeatures": [ 8 | { 9 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 10 | } 11 | ], 12 | "updateFeatures": [ 13 | { 14 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 15 | } 16 | ], 17 | "deleteFeatures": [ 18 | { 19 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 20 | } 21 | ], 22 | "manageSpaces": [ 23 | { 24 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 25 | } 26 | ] 27 | } 28 | }, 29 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 30 | "iat": 1521982864, 31 | "exp": 2000000000 32 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_READ_PACKAGES_HERE.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | }, 8 | { 9 | "packages": "HERE" 10 | } 11 | ], 12 | "createFeatures": [ 13 | { 14 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 15 | } 16 | ], 17 | "updateFeatures": [ 18 | { 19 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 20 | } 21 | ], 22 | "deleteFeatures": [ 23 | { 24 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 25 | } 26 | ], 27 | "manageSpaces": [ 28 | { 29 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 30 | } 31 | ] 32 | } 33 | }, 34 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 35 | "iat": 1521982864, 36 | "exp": 2000000000 37 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_READ_WRITE_PACKAGES_HERE.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | }, 8 | { 9 | "packages": "HERE" 10 | } 11 | ], 12 | "createFeatures": [ 13 | { 14 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 15 | }, 16 | { 17 | "packages": "HERE" 18 | } 19 | ], 20 | "updateFeatures": [ 21 | { 22 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 23 | }, 24 | { 25 | "packages": "HERE" 26 | } 27 | ], 28 | "deleteFeatures": [ 29 | { 30 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 31 | }, 32 | { 33 | "packages": "HERE" 34 | } 35 | ], 36 | "manageSpaces": [ 37 | { 38 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 39 | } 40 | ] 41 | } 42 | }, 43 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 44 | "iat": 1521982864, 45 | "exp": 2000000000 46 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_ACCESS_CONNECTOR_RULE_TAGGER.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "accessConnectors": [ 30 | { 31 | "id": "rule-tagger" 32 | } 33 | ] 34 | } 35 | }, 36 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 37 | "iat": 1521982864, 38 | "exp": 2000000000 39 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_ANOTHER_LISTENER.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "accessConnectors": [ 30 | { 31 | "id": "another-listener" 32 | } 33 | ] 34 | } 35 | }, 36 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 37 | "iat": 1521982864, 38 | "exp": 2000000000 39 | } 40 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_FEATURES_MANAGE_ALL_SPACES.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | {} 26 | ] 27 | } 28 | }, 29 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 30 | "iat": 1521982864, 31 | "exp": 2000000000 32 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_FEATURES_ONLY.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ] 24 | } 25 | }, 26 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 27 | "iat": 1521982864, 28 | "exp": 2000000000 29 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_LIMITS.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "adminSpaces": [ 30 | { 31 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 32 | } 33 | ] 34 | } 35 | }, 36 | "limits": { 37 | "maxSpaces": 1, 38 | "maxFeaturesPerSpace": 1 39 | }, 40 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 41 | "iat": 1521982864, 42 | "exp": 2000000000 43 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_LISTENER.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "accessConnectors": [ 30 | { 31 | "id": "sns-publisher" 32 | }, 33 | { 34 | "id": "listener-test" 35 | } 36 | ] 37 | } 38 | }, 39 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 40 | "iat": 1521982864, 41 | "exp": 2000000000 42 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_MANAGE_CONNECTORS_WITH_PREFIX_ID.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageConnectors": [ 5 | { 6 | "id": "xyz-*" 7 | } 8 | ] 9 | } 10 | }, 11 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 12 | "iat": 1521982864, 13 | "exp": 2000000000 14 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_MANAGE_CONNECTOR_ONE_ID.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageConnectors": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 7 | "id": "test-connector2" 8 | } 9 | ] 10 | } 11 | }, 12 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 13 | "iat": 1521982864, 14 | "exp": 2000000000 15 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_MANAGE_CONNECTOR_PSQL.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageConnectors": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 7 | "id": "psql" 8 | } 9 | ] 10 | } 11 | }, 12 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 13 | "iat": 1521982864, 14 | "exp": 2000000000 15 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_MANAGE_OWN_CONNECTORS.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageConnectors": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ] 9 | } 10 | }, 11 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 12 | "iat": 1521982864, 13 | "exp": 2000000000 14 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_MANAGE_SPACES_PACKAGE_HERE.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "packages": "HERE" 7 | } 8 | ] 9 | } 10 | }, 11 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 12 | "iat": 1521982864, 13 | "exp": 2000000000 14 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_MS_PACKAGE_HERE_AND_MP_OSM.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "packages": "HERE" 7 | } 8 | ], 9 | "managePackages": [ 10 | { 11 | "id": "OSM" 12 | } 13 | ] 14 | } 15 | }, 16 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 17 | "iat": 1521982864, 18 | "exp": 2000000000 19 | } 20 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_PSQL.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "accessConnectors": [ 30 | { 31 | "id": "psql" 32 | } 33 | ] 34 | } 35 | }, 36 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 37 | "iat": 1521982864, 38 | "exp": 2000000000 39 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_USE_CAPABILITIES.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "useCapabilities": [ 30 | { 31 | "id": "searchablePropertiesConfiguration" 32 | }, 33 | { 34 | "id": "hexbinClustering" 35 | } 36 | ] 37 | } 38 | }, 39 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 40 | "iat": 1521982864, 41 | "exp": 2000000000 42 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_1_WITH_USE_CAPABILITIES_AND_ADMIN.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 27 | } 28 | ], 29 | "adminSpaces": [ 30 | { 31 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 32 | } 33 | ], 34 | "useCapabilities": [ 35 | { 36 | "id": "searchablePropertiesConfiguration" 37 | }, 38 | { 39 | "id": "hexbinClustering" 40 | } 41 | ] 42 | } 43 | }, 44 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 45 | "iat": 1521982864, 46 | "exp": 2000000000 47 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 27 | } 28 | ], 29 | "adminSpaces": [ 30 | { 31 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 32 | } 33 | ] 34 | } 35 | }, 36 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 37 | "iat": 1521982864, 38 | "exp": 2000000000 39 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_2_ALL.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | {} 6 | ], 7 | "createFeatures": [ 8 | {} 9 | ], 10 | "updateFeatures": [ 11 | {} 12 | ], 13 | "deleteFeatures": [ 14 | {} 15 | ], 16 | "manageSpaces": [ 17 | {} 18 | ], 19 | "adminSpaces": [ 20 | {} 21 | ], 22 | "accessConnectors": [ 23 | {} 24 | ], 25 | "manageConnectors": [ 26 | {} 27 | ], 28 | "useCapabilities": [ 29 | {} 30 | ] 31 | } 32 | }, 33 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 34 | "iat": 1521982864, 35 | "exp": 2000000000 36 | } 37 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_2_MANAGE_PACKAGES_HERE_OSM.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 27 | } 28 | ], 29 | "managePackages": [ 30 | { 31 | "id": "HERE" 32 | }, 33 | { 34 | "id": "OSM" 35 | } 36 | ] 37 | } 38 | }, 39 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 40 | "iat": 1521982864, 41 | "exp": 2000000000 42 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_2_WITH_FEATURES_ADMIN_ALL_SPACES.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 22 | } 23 | ], 24 | "adminSpaces": [ 25 | {} 26 | ] 27 | } 28 | }, 29 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 30 | "iat": 1521982864, 31 | "exp": 2000000000 32 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_2_WITH_MANAGE_CONNECTORS.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageConnectors": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 7 | } 8 | ] 9 | } 10 | }, 11 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 12 | "iat": 1521982864, 13 | "exp": 2000000000 14 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_3.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "readFeatures": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER3" 7 | } 8 | ], 9 | "createFeatures": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER3" 12 | } 13 | ], 14 | "updateFeatures": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER3" 17 | } 18 | ], 19 | "deleteFeatures": [ 20 | { 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER3" 22 | } 23 | ], 24 | "manageSpaces": [ 25 | { 26 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER3" 27 | } 28 | ] 29 | } 30 | }, 31 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER3", 32 | "iat": 1521982864, 33 | "exp": 2000000000 34 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_OWNER_3_WITH_CUSTOM_SPACE_IDS.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER3" 7 | }, 8 | { 9 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER3", 10 | "space": "somePrefix-*" 11 | } 12 | ] 13 | } 14 | }, 15 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER3", 16 | "iat": 1521982864, 17 | "exp": 2000000000 18 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_SPACE_1_MANAGE_SPACES.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "space": "space1" 7 | } 8 | ] 9 | } 10 | }, 11 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 12 | "iat": 1521982864, 13 | "exp": 2000000000 14 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/ACCESS_SPACE_2_MANAGE_SPACES.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "space": "space-2" 7 | } 8 | ] 9 | } 10 | }, 11 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 12 | "iat": 1521982864, 13 | "exp": 2000000000 14 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/CONNECTOR_AUTH_TEST_C1_AND_C2.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "adminSpaces": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "accessConnectors": [ 15 | { 16 | "id": "c1" 17 | }, 18 | { 19 | "id": "c2" 20 | } 21 | ] 22 | } 23 | }, 24 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 25 | "iat": 1521982864, 26 | "exp": 2000000000 27 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/NO_ACCESS.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": {}, 3 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 4 | "iat": 1521982864, 5 | "exp": 2000000000 6 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/STORAGE_AUTH_TEST_C1_ONLY.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "adminSpaces": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "accessConnectors": [ 15 | { 16 | "id": "c1" 17 | } 18 | ] 19 | } 20 | }, 21 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 22 | "iat": 1521982864, 23 | "exp": 2000000000 24 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/STORAGE_AUTH_TEST_C1_OWNER_AND_ID.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "adminSpaces": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "accessConnectors": [ 15 | { 16 | "id": "c1", 17 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 18 | } 19 | ] 20 | } 21 | }, 22 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 23 | "iat": 1521982864, 24 | "exp": 2000000000 25 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/STORAGE_AUTH_TEST_C2_OTHER_OWNER_AND_ID.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 7 | } 8 | ], 9 | "adminSpaces": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 12 | } 13 | ], 14 | "accessConnectors": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 17 | "id": "c2" 18 | } 19 | ] 20 | } 21 | }, 22 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 23 | "iat": 1521982864, 24 | "exp": 2000000000 25 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/STORAGE_AUTH_TEST_C2_OWNER_AND_ID.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "adminSpaces": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "accessConnectors": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 17 | "id": "c2" 18 | } 19 | ] 20 | } 21 | }, 22 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 23 | "iat": 1521982864, 24 | "exp": 2000000000 25 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/STORAGE_AUTH_TEST_C3_OTHER_OWNER_AND_ID.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 7 | } 8 | ], 9 | "adminSpaces": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 12 | } 13 | ], 14 | "accessConnectors": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 17 | "id": "c3" 18 | } 19 | ] 20 | } 21 | }, 22 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 23 | "iat": 1521982864, 24 | "exp": 2000000000 25 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/STORAGE_AUTH_TEST_C3_OWNER_AND_ID.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "adminSpaces": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "accessConnectors": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 17 | "id": "c3" 18 | } 19 | ] 20 | } 21 | }, 22 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 23 | "iat": 1521982864, 24 | "exp": 2000000000 25 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/STORAGE_AUTH_TEST_OTHER_OWNER_ID_ONLY.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 7 | } 8 | ], 9 | "adminSpaces": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 12 | } 13 | ], 14 | "accessConnectors": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2" 17 | } 18 | ] 19 | } 20 | }, 21 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 22 | "iat": 1521982864, 23 | "exp": 2000000000 24 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/STORAGE_AUTH_TEST_OWNER_ID_ONLY.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "adminSpaces": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "accessConnectors": [ 15 | { 16 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 17 | } 18 | ] 19 | } 20 | }, 21 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 22 | "iat": 1521982864, 23 | "exp": 2000000000 24 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/auth/STORAGE_AUTH_TEST_PSQL_ONLY.json: -------------------------------------------------------------------------------- 1 | { 2 | "urm": { 3 | "xyz-hub": { 4 | "manageSpaces": [ 5 | { 6 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 7 | } 8 | ], 9 | "adminSpaces": [ 10 | { 11 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER1" 12 | } 13 | ], 14 | "accessConnectors": [ 15 | { 16 | "id": "psql" 17 | } 18 | ] 19 | } 20 | }, 21 | "aid": "XYZ-01234567-89ab-cdef-0123-456789aUSER1", 22 | "iat": 1521982864, 23 | "exp": 2000000000 24 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/mock-servers/localstack/docker-entrypoint-initaws.d/01-create-bucket.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Copyright (C) 2017-2024 HERE Europe B.V. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # SPDX-License-Identifier: Apache-2.0 19 | # License-Filename: LICENSE 20 | # 21 | 22 | awslocal s3api create-bucket --bucket test-bucket --create-bucket-configuration LocationConstraint=eu-west-1 23 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/recipes/openapi-recipe-experimental.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Data Hub API - Experimental 3 | exclude: 4 | - components.schemas.Space.properties.tags 5 | replace: 6 | - type: value 7 | path: info.version 8 | replace: ${VERSION} 9 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/recipes/openapi-recipes-extension-example.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | values: 3 | key1: This is a value which can be replaced using ${key1} mechanism. 4 | key2: Modified 5 | recipes: 6 | - name: base 7 | replace: 8 | - type: value 9 | path: "*" 10 | find: space 11 | replace: layer 12 | - type: value 13 | path: info.version 14 | replace: ${VERSION} 15 | - name: intermediate 16 | extends: base 17 | exclude: 18 | - paths.'/spaces'.get.parameters.name=includeRights 19 | replace: 20 | - type: value 21 | path: paths.'/spaces/{spaceId}/features'.post.summary 22 | find: Modify 23 | replace: ${key2} 24 | - name: stable 25 | extends: intermediate 26 | exclude: 27 | - paths.'/spaces'.get.parameters.name=includeConnectors 28 | - paths.'/spaces'.get.parameters.name=contentUpdatedAt 29 | replace: 30 | - type: value 31 | path: paths.'/spaces/{spaceId}/features'.post.description 32 | replace: Create or patch features. 33 | - type: value 34 | path: paths.'/spaces/{spaceId}/tile/{type}/{tileId}'.get.description 35 | replace: List the features selected by tile type and tile id. 36 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createCustomIdSpace.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "somePrefix-mySpace", 3 | "title": "My Demo Space" 4 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createDefaultSpace.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-auth-test-space", 3 | "title": "My Demo Space", 4 | "tileMinLevel": 0, 5 | "tileMaxLevel": 20, 6 | "ISOCountryCodesAsProperty": false, 7 | "insertBBox": true, 8 | "client": {} 9 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createPsqlSpace.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-auth-test-space", 3 | "title": "My Demo Space", 4 | "tileMinLevel": 0, 5 | "tileMaxLevel": 20, 6 | "ISOCountryCodesAsProperty": false, 7 | "insertBBox": true, 8 | "storage": { 9 | "id": "psql", 10 | "params": {} 11 | }, 12 | "client": {} 13 | } 14 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createSharedSpace.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-auth-test-space-shared", 3 | "title": "My Shared Demo Space", 4 | "tileMinLevel": 0, 5 | "tileMaxLevel": 20, 6 | "ISOCountryCodesAsProperty": false, 7 | "insertBBox": true, 8 | "client": {}, 9 | "shared": true 10 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createSpaceWithListener.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-auth-test-space", 3 | "title": "My Demo Space", 4 | "tileMinLevel": 0, 5 | "tileMaxLevel": 20, 6 | "ISOCountryCodesAsProperty": false, 7 | "insertBBox": true, 8 | "client": {}, 9 | "listeners": [ 10 | { 11 | "id": "c1", 12 | "eventTypes": ["GetFeaturesByIdEvent.request"], 13 | "params": { 14 | "someSpaceSpecificParamForTheConnector": "some value" 15 | } 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createSpaceWithListenersObject.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-auth-test-space", 3 | "title": "My Demo Space", 4 | "tileMinLevel": 0, 5 | "tileMaxLevel": 20, 6 | "ISOCountryCodesAsProperty": false, 7 | "insertBBox": true, 8 | "client": {}, 9 | "listeners": { 10 | "another-listener": [{ 11 | "eventTypes": ["GetFeaturesByIdEvent.request"], 12 | "params": { 13 | "someSpaceSpecificParamForTheConnector": "some value" 14 | } 15 | }] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createSpaceWithPackage.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "My Demo Space with package", 3 | "packages": ["HERE", "OSM"] 4 | } 5 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createTestStorageSpace.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-auth-test-space", 3 | "title": "My Demo Space", 4 | "tileMinLevel": 0, 5 | "tileMaxLevel": 20, 6 | "ISOCountryCodesAsProperty": false, 7 | "insertBBox": true, 8 | "storage": { 9 | "id": "c1", 10 | "params": {} 11 | }, 12 | "client": {} 13 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createTestStorageSpaceC2.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-auth-test-space", 3 | "title": "My Demo Space", 4 | "tileMinLevel": 0, 5 | "tileMaxLevel": 20, 6 | "ISOCountryCodesAsProperty": false, 7 | "insertBBox": true, 8 | "storage": { 9 | "id": "c2", 10 | "params": {} 11 | }, 12 | "client": {} 13 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createTestStorageSpaceC3.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-auth-test-space", 3 | "title": "My Demo Space", 4 | "tileMinLevel": 0, 5 | "tileMaxLevel": 20, 6 | "ISOCountryCodesAsProperty": false, 7 | "insertBBox": true, 8 | "storage": { 9 | "id": "c3", 10 | "params": {} 11 | }, 12 | "client": {} 13 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/auth/createTestStorageSpaceC4.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-auth-test-space", 3 | "title": "My Demo Space", 4 | "tileMinLevel": 0, 5 | "tileMaxLevel": 20, 6 | "ISOCountryCodesAsProperty": false, 7 | "insertBBox": true, 8 | "storage": { 9 | "id": "c4", 10 | "params": {} 11 | }, 12 | "client": {} 13 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/connectors/embeddedConnector.json: -------------------------------------------------------------------------------- 1 | { 2 | "remoteFunctions": { 3 | "local": { 4 | "type": "Embedded", 5 | "id": "test-connector", 6 | "warmUp": 0, 7 | "className": "com.here.xyz.hub.connectors.test.TestStorageConnector", 8 | "env": {} 9 | } 10 | }, 11 | "connectionSettings": { 12 | "minConnections": 0, 13 | "maxConnections": 128 14 | }, 15 | "trusted": false, 16 | "params": { 17 | }, 18 | "contactEmails": [ 19 | "test@here.com" 20 | ], 21 | "id": "test-connector", 22 | "capabilities": { 23 | "searchablePropertiesConfiguration": true, 24 | "clusteringTypes": [ 25 | "hexbin", 26 | "quad", 27 | "quadbin" 28 | ], 29 | "maxPayloadSize": 6291456, 30 | "maxUncompressedSize": 1, 31 | "preserializedResponseSupport": true, 32 | "relocationSupport": true, 33 | "enableAutoCache": true, 34 | "propertySearch": true 35 | } 36 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/connectors/embeddedConnector2.json: -------------------------------------------------------------------------------- 1 | { 2 | "remoteFunctions": { 3 | "local": { 4 | "type": "Embedded", 5 | "id": "test-connector2", 6 | "warmUp": 0, 7 | "className": "com.here.xyz.hub.connectors.test.TestStorageConnector", 8 | "env": {} 9 | } 10 | }, 11 | "connectionSettings": { 12 | "minConnections": 0, 13 | "maxConnections": 128 14 | }, 15 | "trusted": false, 16 | "params": { 17 | }, 18 | "contactEmails": [ 19 | "test@here.com" 20 | ], 21 | "id": "test-connector2", 22 | "capabilities": { 23 | "searchablePropertiesConfiguration": true, 24 | "clusteringTypes": [ 25 | "hexbin", 26 | "quad", 27 | "quadbin" 28 | ], 29 | "maxPayloadSize": 6291456, 30 | "maxUncompressedSize": 1, 31 | "preserializedResponseSupport": true, 32 | "relocationSupport": true, 33 | "enableAutoCache": true, 34 | "propertySearch": true 35 | } 36 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/connectors/embeddedConnectorPatch.json: -------------------------------------------------------------------------------- 1 | { 2 | "contactEmails": [ 3 | "newEmail@here.com" 4 | ], 5 | "id": "test-connector", 6 | "capabilities": { 7 | "preserializedResponseSupport": false 8 | } 9 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/connectors/embeddedConnectorReplace.json: -------------------------------------------------------------------------------- 1 | { 2 | "remoteFunctions": { 3 | "local": { 4 | "type": "Embedded", 5 | "id": "test-connector", 6 | "warmUp": 0, 7 | "className": "com.here.xyz.hub.connectors.test.TestStorageConnector", 8 | "env": {} 9 | } 10 | }, 11 | "connectionSettings": { 12 | "minConnections": 64, 13 | "maxConnections": 256 14 | }, 15 | "trusted": false, 16 | "params": { 17 | }, 18 | "contactEmails": [ 19 | "test@here.com" 20 | ], 21 | "id": "test-connector", 22 | "capabilities": { 23 | "searchablePropertiesConfiguration": true, 24 | "clusteringTypes": [ 25 | "hexbin", 26 | "quad", 27 | "quadbin" 28 | ], 29 | "maxPayloadSize": 6291456, 30 | "maxUncompressedSize": 1, 31 | "preserializedResponseSupport": true, 32 | "relocationSupport": true, 33 | "enableAutoCache": true, 34 | "propertySearch": false 35 | } 36 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/connectors/embeddedConnectorWithExtensionSupport.json: -------------------------------------------------------------------------------- 1 | { 2 | "remoteFunctions": { 3 | "local": { 4 | "type": "Embedded", 5 | "id": "test-connector", 6 | "warmUp": 0, 7 | "className": "com.here.xyz.hub.connectors.test.TestStorageConnector", 8 | "env": {} 9 | } 10 | }, 11 | "connectionSettings": { 12 | "minConnections": 0, 13 | "maxConnections": 128 14 | }, 15 | "trusted": false, 16 | "params": { 17 | }, 18 | "contactEmails": [ 19 | "test@here.com" 20 | ], 21 | "id": "test-connector", 22 | "capabilities": { 23 | "extensionSupport": true, 24 | "maxPayloadSize": 6291456, 25 | "maxUncompressedSize": 1, 26 | "preserializedResponseSupport": true, 27 | "relocationSupport": true, 28 | "enableAutoCache": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/connectors/embeddedConnectorWithOtherId.json: -------------------------------------------------------------------------------- 1 | { 2 | "remoteFunctions": { 3 | "local": { 4 | "type": "Embedded", 5 | "id": "test-connector", 6 | "warmUp": 0, 7 | "className": "com.here.xyz.hub.connectors.test.TestStorageConnector", 8 | "env": {} 9 | } 10 | }, 11 | "connectionSettings": { 12 | "minConnections": 0, 13 | "maxConnections": 128 14 | }, 15 | "trusted": false, 16 | "params": { 17 | }, 18 | "contactEmails": [ 19 | "test@here.com" 20 | ], 21 | "id": "xyz-connector", 22 | "capabilities": { 23 | "searchablePropertiesConfiguration": true, 24 | "clusteringTypes": [ 25 | "hexbin", 26 | "quad", 27 | "quadbin" 28 | ], 29 | "maxPayloadSize": 6291456, 30 | "maxUncompressedSize": 1, 31 | "preserializedResponseSupport": true, 32 | "relocationSupport": true, 33 | "enableAutoCache": true, 34 | "propertySearch": true 35 | } 36 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/connectors/embeddedConnectorWithOwner2.json: -------------------------------------------------------------------------------- 1 | { 2 | "remoteFunctions": { 3 | "local": { 4 | "type": "Embedded", 5 | "id": "test-connector", 6 | "warmUp": 0, 7 | "className": "com.here.xyz.hub.connectors.test.TestStorageConnector", 8 | "env": {} 9 | } 10 | }, 11 | "connectionSettings": { 12 | "minConnections": 0, 13 | "maxConnections": 128 14 | }, 15 | "trusted": false, 16 | "params": { 17 | }, 18 | "contactEmails": [ 19 | "test@here.com" 20 | ], 21 | "owner": "XYZ-01234567-89ab-cdef-0123-456789aUSER2", 22 | "id": "test-connector", 23 | "capabilities": { 24 | "searchablePropertiesConfiguration": true, 25 | "clusteringTypes": [ 26 | "hexbin", 27 | "quad", 28 | "quadbin" 29 | ], 30 | "maxPayloadSize": 6291456, 31 | "maxUncompressedSize": 1, 32 | "preserializedResponseSupport": true, 33 | "relocationSupport": true, 34 | "enableAutoCache": true, 35 | "propertySearch": true 36 | } 37 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/connectors/embeddedConnectorWithoutId.json: -------------------------------------------------------------------------------- 1 | { 2 | "connectionSettings": { 3 | "minConnections": 0, 4 | "maxConnections": 128 5 | }, 6 | "trusted": false, 7 | "params": { 8 | }, 9 | "contactEmails": [ 10 | "test@here.com" 11 | ], 12 | "capabilities": { 13 | "searchablePropertiesConfiguration": true, 14 | "clusteringTypes": [ 15 | "hexbin", 16 | "quad", 17 | "quadbin" 18 | ], 19 | "maxPayloadSize": 6291456, 20 | "maxUncompressedSize": 1, 21 | "preserializedResponseSupport": true, 22 | "relocationSupport": true, 23 | "enableAutoCache": true, 24 | "propertySearch": true 25 | } 26 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createFeatureById.json: -------------------------------------------------------------------------------- 1 | { 2 | "features": [ 3 | { 4 | "geometry": { 5 | "type": "Point", 6 | "coordinates": [ 7 | -77.075, 8 | -12.057 9 | ] 10 | }, 11 | "id": "Q271455", 12 | "type": "Feature", 13 | "properties": { 14 | "name": "Estadio Universidad San Marcos Updated", 15 | "@ns:com:here:xyz": { 16 | "tags": [ 17 | "stadium", 18 | "soccer" 19 | ] 20 | }, 21 | "occupant": "National University of San Marcos Updated", 22 | "sport": "association baseball", 23 | "capacity": 67470 24 | } 25 | } 26 | ], 27 | "type": "FeatureCollection" 28 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpace.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-psql-test", 3 | "title": "My Demo Space", 4 | "client": {} 5 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpacePsql.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "My Demo Space", 3 | "storage": { 4 | "id": "psql", 5 | "params": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithCopyright.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "My Demo Space", 3 | "copyright": [ 4 | { 5 | "label": "Copyright Label", 6 | "alt": "Description" 7 | }, 8 | { 9 | "label": "Copyright Label 2", 10 | "alt": "Description 2" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithExceptionPreProcessor.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-failing", 3 | "title": "Testing number of failed entries", 4 | "description": "Testing number of failed entries", 5 | "processors": [ 6 | { 7 | "id": "failing1", 8 | "params": { 9 | }, 10 | "eventTypes": [ 11 | "ModifyFeaturesEvent.request" 12 | ] 13 | }, 14 | { 15 | "id": "exception", 16 | "params": { 17 | }, 18 | "eventTypes": [ 19 | "ModifyFeaturesEvent.request" 20 | ] 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithExtension.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-psql-extending-test", 3 | "title": "My Demo Space", 4 | "extends": { 5 | "spaceId": "x-psql-test-extensible" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithFailingAndErrorPreProcessor.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-failing", 3 | "title": "Testing number of failed entries", 4 | "description": "Testing number of failed entries", 5 | "processors": [ 6 | { 7 | "id": "failing1", 8 | "params": { 9 | }, 10 | "eventTypes": [ 11 | "ModifyFeaturesEvent.request" 12 | ] 13 | }, 14 | { 15 | "id": "error", 16 | "params": { 17 | }, 18 | "eventTypes": [ 19 | "ModifyFeaturesEvent.request" 20 | ] 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithFailingPreProcessor.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-failing", 3 | "title": "Testing number of failed entries", 4 | "description": "Testing number of failed entries", 5 | "processors": [ 6 | { 7 | "id": "failing1", 8 | "params": { 9 | }, 10 | "eventTypes": [ 11 | "ModifyFeaturesEvent.request" 12 | ] 13 | }, 14 | { 15 | "id": "failing1", 16 | "params": { 17 | }, 18 | "eventTypes": [ 19 | "ModifyFeaturesEvent.request" 20 | ] 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithGlobalVersioning.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-psql-test", 3 | "title": "My Demo Space", 4 | "enableGlobalVersioning" : true, 5 | "client": {} 6 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithInvalidJson.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "My Demo Space", 3 | "storage": { 4 | "id": "psql" 5 | "params": {} 6 | }, 7 | "client": {} 8 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithListener.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Test Space Listener", 3 | "description": "Test Space Listener", 4 | "listeners": [ 5 | { 6 | "id": "listener-test", 7 | "eventTypes": [ 8 | "ModifyFeaturesEvent.response" 9 | ], 10 | "params": { 11 | "targetArn": "arn:aws:sns:test-sns" 12 | } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithNotAllowedStorage.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "My Demo Space", 3 | "storage": { 4 | "id": "non-allowed-storage", 5 | "params": {} 6 | }, 7 | "client": {} 8 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithProcessor.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Test Space Processor", 3 | "description": "Test Space Processor", 4 | "processors": [ 5 | { 6 | "id": "rule-tagger", 7 | "params": { 8 | "taggingRules": { 9 | "y2k": "$.features[?(@.properties.createdAt>=946684800)]" 10 | } 11 | }, 12 | "eventTypes": [ 13 | "ModifySpaceEvent.request", 14 | "ModifyFeaturesEvent.request" 15 | ] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithSearchableProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-psql-test", 3 | "title": "My space with searchableProperties", 4 | "searchableProperties": { 5 | "name": true, 6 | "other": false 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithSearchablePropertiesConnectorC1.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-psql-test", 3 | "title": "My space with searchableProperties", 4 | "storage": { 5 | "id": "c1" 6 | }, 7 | "searchableProperties": { 8 | "name": true, 9 | "other": false 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithSortableProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "x-psql-test", 3 | "title": "My space with sortableProperties", 4 | "sortableProperties":[["name"],["other"]] 5 | } 6 | -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSpaceWithoutId.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "My Demo Space", 3 | "client": {} 4 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSubscription.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "test-subscription-1", 3 | "destination": "some-destination", 4 | "config": { 5 | "type": "PER_FEATURE", 6 | "params": { 7 | "destinationType": "stream" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/createSubscriptionWithoutId.json: -------------------------------------------------------------------------------- 1 | { 2 | "destination": "some-destination", 3 | "config": { 4 | "type": "PER_FEATURE" 5 | } 6 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/emptyFeatureCollection.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection" 3 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/featureWithNumberId.json: -------------------------------------------------------------------------------- 1 | { 2 | "features": [ 3 | { 4 | "geometry": { 5 | "type": "Point", 6 | "coordinates": [ 7 | -77.075, 8 | -12.057 9 | ] 10 | }, 11 | "id": 1234, 12 | "type": "Feature", 13 | "properties": { 14 | "name": "Estadio Universidad San Marcos Updated", 15 | "@ns:com:here:xyz": { 16 | "tags": [ 17 | "stadium", 18 | "soccer" 19 | ] 20 | }, 21 | "occupant": "National University of San Marcos Updated", 22 | "sport": "association baseball", 23 | "capacity": 67470 24 | } 25 | } 26 | ], 27 | "type": "FeatureCollection" 28 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/patchFeature.json: -------------------------------------------------------------------------------- 1 | { 2 | "geometry": { 3 | "type": "Point", 4 | "coordinates": [ 5 | -77.075, 6 | -12.057 7 | ] 8 | }, 9 | "type": "Feature", 10 | "properties": { 11 | "name": "Estadio Universidad San Marcos Updated", 12 | "occupant": "National University of San Marcos Updated" 13 | } 14 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/publishSpace.json: -------------------------------------------------------------------------------- 1 | { 2 | "shared": true 3 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/task/FeatureSample01.json: -------------------------------------------------------------------------------- 1 | { 2 | "type":"Feature", 3 | "id":"aa", 4 | "geometry":{ 5 | "type":"Point", 6 | "coordinates":[ 7 | -2.960847, 8 | 53.430828 9 | ] 10 | }, 11 | "properties":{ 12 | "@ns:com:here:xyz":{ 13 | "space":"2aGEUZpZ", 14 | "createdAt":1579685281744, 15 | "updatedAt":1579685281744, 16 | "version": 0, 17 | "tags":[ "tag1"] 18 | }, 19 | "name":"Anfield" 20 | } 21 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/updateFeature.json: -------------------------------------------------------------------------------- 1 | { 2 | "geometry": { 3 | "type": "Point", 4 | "coordinates": [ 5 | -77.075, 6 | -12.057 7 | ] 8 | }, 9 | "type": "Feature", 10 | "properties": { 11 | "name": "Estadio Universidad San Marcos Updated", 12 | "@ns:com:here:xyz": { 13 | "tags": [ 14 | "stadium", 15 | "soccer" 16 | ] 17 | }, 18 | "occupant": "National University of San Marcos Updated", 19 | "sport": "association baseball", 20 | "capacity": 67470 21 | } 22 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/updateFeatureById.json: -------------------------------------------------------------------------------- 1 | { 2 | "features": [ 3 | { 4 | "geometry": { 5 | "type": "Point", 6 | "coordinates": [ 7 | -77.075, 8 | -12.057 9 | ] 10 | }, 11 | "id": "Q271454", 12 | "type": "Feature", 13 | "properties": { 14 | "name": "Estadio Universidad San Marcos Updated", 15 | "@ns:com:here:xyz": { 16 | "tags": [ 17 | "stadium", 18 | "soccer" 19 | ] 20 | }, 21 | "occupant": "National University of San Marcos Updated", 22 | "sport": "association baseball", 23 | "capacity": 67470 24 | } 25 | } 26 | ], 27 | "type": "FeatureCollection" 28 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/updateFeatureNonModified.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Feature", 3 | "id": "A", 4 | "geometry": { 5 | "type": "Point", 6 | "coordinates": [ 7 | 0.0, 8 | 0.0, 9 | 0.0 10 | ] 11 | }, 12 | "properties": { 13 | "@ns:com:here:xyz": { 14 | "space": "x-psql-test", 15 | "createdAt": 1711038285360, 16 | "updatedAt": 1711038285360, 17 | "version": 1 18 | }, 19 | "name": "test" 20 | } 21 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/updateSpace.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "My Demo Space Updated", 3 | "tileMinLevel": 1, 4 | "tileMaxLevel": 21, 5 | "ISOCountryCodesAsProperty": true, 6 | "insertBBox": true, 7 | "client": {} 8 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/updateSpaceWithSearchableProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "My Demo Space updated with searchableProperties", 3 | "searchableProperties": { 4 | "name": true, 5 | "other": false 6 | } 7 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/updateSpaceWithSearchablePropertiesConnectorC1.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "My Demo Space updated with searchableProperties", 3 | "storage": { 4 | "id": "c1" 5 | }, 6 | "searchableProperties": { 7 | "name": true, 8 | "other": false 9 | } 10 | } -------------------------------------------------------------------------------- /xyz-hub-test/src/test/resources/xyz/hub/wrongType.json: -------------------------------------------------------------------------------- 1 | { 2 | "features": [ 3 | { 4 | "geometry": { 5 | "type": "Point", 6 | "coordinates": [ 7 | -77.075, 8 | -12.057 9 | ] 10 | }, 11 | "id": 1234, 12 | "type": "WrongType", 13 | "properties": { 14 | "name": "Estadio Universidad San Marcos Updated", 15 | "@ns:com:here:xyz": { 16 | "tags": [ 17 | "stadium", 18 | "soccer" 19 | ] 20 | }, 21 | "occupant": "National University of San Marcos Updated", 22 | "sport": "association baseball", 23 | "capacity": 67470 24 | } 25 | } 26 | ], 27 | "type": "FeatureCollection" 28 | } -------------------------------------------------------------------------------- /xyz-jobs/README.md: -------------------------------------------------------------------------------- 1 | # XYZ Job Framework 2 | 3 | A framework that can be used to perform long-running jobs (e.g., bulk import / export) on XYZ spaces. 4 | 5 | ## Steps to start the Job Framework locally 6 | 7 | 1. Start all dependent containers: `docker compose --file docker-compose-dynamodb.yml up -d --build --force-recreate postgres redis dynamodb aws-localstack` 8 | 2. Build & deploy the Job Step Lambda into the localstack by running the run-config `xyz-job-steps [install]` 9 | 3. Start the XYZ Hub Service by running the run-config `HubService` 10 | 4. Start the XYZ Job Service by running the run-config `JobService` 11 | 5. Optional run `CService` 12 | 13 | Optionally: Start the JobPlayground by running `JobPlayground#main()` -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/CombinedDatasetDescription.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets; 21 | 22 | import java.util.List; 23 | 24 | /** 25 | * A {@link DatasetDescription} which is a logical representation of multiple Sub-DatasetDescriptions being combined. 26 | * @param The type of the Sub-DatasetDescriptions 27 | */ 28 | public interface CombinedDatasetDescription { 29 | 30 | /** 31 | * Creates the Sub-DatasetDescriptions this CombinedDatasetDescription is representing. 32 | * @return The list of Sub-DatasetDescription instances 33 | */ 34 | List createChildEntities(); 35 | } 36 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/FileBasedTarget.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets; 21 | 22 | public interface FileBasedTarget { 23 | FileOutputSettings getOutputSettings(); 24 | void setOutputSettings(FileOutputSettings outputSettings); 25 | T withOutputSettings(FileOutputSettings outputSettings); 26 | } 27 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/Identifiable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets; 21 | 22 | public abstract class Identifiable extends DatasetDescription { 23 | 24 | private String id; 25 | 26 | public String getId() { 27 | return id; 28 | } 29 | 30 | public void setId(String id) { 31 | this.id = id; 32 | } 33 | 34 | public T withId(String id) { 35 | setId(id); 36 | return (T) this; 37 | } 38 | 39 | public String getKey() { 40 | return getId(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/VersionedSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets; 21 | 22 | import com.here.xyz.models.hub.Ref; 23 | 24 | public interface VersionedSource { 25 | 26 | Ref getVersionRef(); 27 | 28 | void setVersionRef(Ref versionRef); 29 | 30 | T withVersionRef(Ref versionRef); 31 | } 32 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/files/FileChunking.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets.files; 21 | 22 | public class FileChunking { 23 | private int maxSizeMB = 512; 24 | 25 | public int getMaxSizeMB() { 26 | return maxSizeMB; 27 | } 28 | 29 | public void setMaxSizeMB(int maxSizeMB) { 30 | this.maxSizeMB = maxSizeMB; 31 | } 32 | 33 | public FileChunking withMaxSizeMB(int maxSizeMB) { 34 | setMaxSizeMB(maxSizeMB); 35 | return this; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/files/FileFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets.files; 21 | 22 | import com.fasterxml.jackson.annotation.JsonSubTypes; 23 | import com.here.xyz.Typed; 24 | 25 | @JsonSubTypes({ 26 | @JsonSubTypes.Type(value = GeoJson.class, name = "GeoJson"), 27 | @JsonSubTypes.Type(value = GeoParquet.class, name = "GeoParquet"), 28 | @JsonSubTypes.Type(value = Csv.class, name = "Csv") 29 | }) 30 | public abstract class FileFormat implements Typed { 31 | 32 | public enum EntityPerLine { 33 | Feature, 34 | FeatureCollection 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/files/FileInputSettings.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets.files; 21 | 22 | import com.here.xyz.XyzSerializable; 23 | 24 | public class FileInputSettings { 25 | private FileFormat format = new GeoJson(); 26 | 27 | public FileFormat getFormat() { 28 | return format; 29 | } 30 | 31 | public void setFormat(FileFormat format) { 32 | this.format = format; 33 | } 34 | 35 | public FileInputSettings withFormat(FileFormat format) { 36 | setFormat(format); 37 | return this; 38 | } 39 | 40 | @Override 41 | public boolean equals(Object obj) { 42 | return XyzSerializable.equals(this, obj); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/files/GeoParquet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets.files; 21 | 22 | public class GeoParquet extends FileFormat { 23 | private String version; 24 | 25 | public String getVersion() { 26 | return version; 27 | } 28 | 29 | public void setVersion(String version) { 30 | this.version = version; 31 | } 32 | 33 | public GeoParquet withVersion(String version) { 34 | setVersion(version); 35 | return this; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/filters/FilteringSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets.filters; 21 | 22 | public interface FilteringSource { 23 | 24 | Filters getFilters(); 25 | 26 | void setFilters(Filters filters); 27 | 28 | T withFilters(Filters filters); 29 | } 30 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/streams/DynamicStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets.streams; 21 | 22 | import com.here.xyz.jobs.datasets.DatasetDescription; 23 | 24 | public abstract class DynamicStream extends DatasetDescription { 25 | 26 | @Override 27 | public String getKey() { 28 | return getClass().getSimpleName(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/datasets/streams/Notifications.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.datasets.streams; 21 | 22 | public class Notifications extends DynamicStream { 23 | } 24 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/processes/ProcessDescription.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.processes; 21 | 22 | import com.here.xyz.Typed; 23 | 24 | public abstract class ProcessDescription implements Typed { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/resources/META-INF/services/com.here.xyz.jobs.config.JobConfigClient$Provider: -------------------------------------------------------------------------------- 1 | com.here.xyz.jobs.config.DynamoJobConfigClient$Provider 2 | com.here.xyz.jobs.config.InMemJobConfigClient$Provider -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/resources/META-INF/services/com.here.xyz.jobs.steps.impl.tools.ResourceAndTimeCalculator$Provider: -------------------------------------------------------------------------------- 1 | com.here.xyz.jobs.steps.impl.tools.ResourceAndTimeCalculator$Provider -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/resources/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017-2024 HERE Europe B.V. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # SPDX-License-Identifier: Apache-2.0 17 | # License-Filename: LICENSE 18 | # 19 | 20 | xyzhub.version=${project.version} 21 | xyzhub.buildTime=${build.time} 22 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/resources/jobs.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "HTTP_PORT": 7070, 3 | "ECPS_PHRASE": "local", 4 | 5 | "DB_STATEMENT_TIMEOUT_IN_S" : 86400, 6 | "DB_ACQUIRE_RETRY_ATTEMPTS" : 10, 7 | "DB_CHECKOUT_TIMEOUT" : 10, 8 | 9 | "MAX_CONCURRENT_MAINTENANCE_TASKS" : 1 , 10 | "MISSING_MAINTENANCE_WARNING_IN_HR" : 12, 11 | 12 | "STORAGE_DB_URL": "jdbc:postgresql://localhost/postgres", 13 | "STORAGE_DB_USER": "postgres", 14 | "STORAGE_DB_PASSWORD": "password", 15 | 16 | "LOCALSTACK_ENDPOINT" : "http://localhost:4566", 17 | "AWS_REGION" : "us-east-1", 18 | 19 | "STEP_LAMBDA_ARN" : "arn:aws:lambda:us-east-1:000000000000:function:job-step", 20 | 21 | "JOBS_DYNAMODB_TABLE_ARN": "arn:aws:dynamodb:localhost:000000008000:table/xyz-jobs-local", 22 | "JOBS_S3_BUCKET": "test-bucket", 23 | 24 | "HUB_ENDPOINT" : "http://localhost:8080/hub" 25 | } -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/resources/log4j2.component.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017-2024 HERE Europe B.V. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # SPDX-License-Identifier: Apache-2.0 17 | # License-Filename: LICENSE 18 | # 19 | 20 | log4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector 21 | log4j2.asyncLoggerRingBufferSize=65536 22 | log4j2.asyncQueueFullPolicy=Discard 23 | log4j2.discardThreshold=INFO 24 | log4j2.clock=CachedClock 25 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/resources/log4j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "configuration": { 3 | "status": "info", 4 | "name": "Default Log Config", 5 | "packages": "com.here.xyz", 6 | "appenders": { 7 | "Console": { 8 | "name": "STDOUT", 9 | "PatternLayout": { 10 | "pattern": "%d %-5p %c{1} %.-4096msg %enc{%ex}{JSON}%n%xEx{none}" 11 | } 12 | } 13 | }, 14 | "loggers": { 15 | "root": { 16 | "level": "info", 17 | "AppenderRef": { 18 | "ref": "STDOUT" 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-service/src/main/resources/openapi-recipes.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | recipes: 3 | - name: contract 4 | replace: 5 | - type: value 6 | path: servers.0.url 7 | replace: ${SERVER_URL} 8 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/bash/environment.json: -------------------------------------------------------------------------------- 1 | { 2 | "Variables": { 3 | "HUB_ENDPOINT": "http://host.docker.internal:8080/hub", 4 | "ECPS_PHRASE": "local", 5 | "JOBS_S3_BUCKET": "test-bucket", 6 | "LOCALSTACK_ENDPOINT": "http://localstack:4566", 7 | "LOCAL_DB_HOST_OVERRIDE": "postgres", 8 | "JOB_API_ENDPOINT": "http://host.docker.internal:7070", 9 | "_JAVA_OPTIONS": "-Xshare:off -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5050" 10 | } 11 | } -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/S3DataFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.steps; 21 | 22 | import java.util.Map; 23 | 24 | public interface S3DataFile { 25 | boolean isCompressed(); 26 | long getByteSize(); 27 | String getS3Bucket(); 28 | String getS3Key(); 29 | long getEstimatedUncompressedByteSize(); 30 | Map getMetadata(); 31 | } 32 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/StepExecution.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.steps; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 23 | import com.fasterxml.jackson.annotation.JsonSubTypes; 24 | import com.here.xyz.Typed; 25 | 26 | @JsonSubTypes({ 27 | @JsonSubTypes.Type(value = Step.class) 28 | }) 29 | @JsonIgnoreProperties(ignoreUnknown = true) 30 | public interface StepExecution extends Typed { 31 | boolean isEquivalentTo(StepExecution other); 32 | } 33 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/execution/JobInternalDelegateStep.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2025 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.steps.execution; 21 | 22 | import com.here.xyz.jobs.steps.Step; 23 | import java.util.List; 24 | 25 | public class JobInternalDelegateStep extends DelegateStep { 26 | 27 | //Only needed for deserialization purposes 28 | private JobInternalDelegateStep() { 29 | super(); 30 | } 31 | 32 | public JobInternalDelegateStep(Step delegate, List outputSets) { 33 | super(delegate, delegate, outputSets); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/inputs/ModelBasedInput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.steps.inputs; 21 | 22 | import com.fasterxml.jackson.annotation.JsonTypeInfo; 23 | import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; 24 | 25 | @JsonTypeInfo(use = Id.NAME, property = "type") 26 | public abstract class ModelBasedInput extends Input { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/outputs/CreatedVersion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.steps.outputs; 21 | 22 | public class CreatedVersion extends ModelBasedOutput { 23 | private long version; 24 | 25 | public long getVersion() { 26 | return version; 27 | } 28 | 29 | public void setVersion(long version) { 30 | this.version = version; 31 | } 32 | 33 | public CreatedVersion withVersion(long version) { 34 | setVersion(version); 35 | return this; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/outputs/OutputMetadata.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.steps.outputs; 21 | 22 | import java.util.Map; 23 | 24 | public class OutputMetadata { 25 | private DownloadUrl allOutputs; 26 | private Map perOutput; 27 | } -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/resources/TooManyResourcesClaimed.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.jobs.steps.resources; 2 | 3 | public class TooManyResourcesClaimed extends Exception { 4 | 5 | public TooManyResourcesClaimed(String message) { 6 | super(message); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/resources/META-INF/services/com.here.xyz.jobs.steps.impl.tools.ResourceAndTimeCalculator$Provider: -------------------------------------------------------------------------------- 1 | com.here.xyz.jobs.steps.impl.tools.ResourceAndTimeCalculator$Provider -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/resources/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017-2024 HERE Europe B.V. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # SPDX-License-Identifier: Apache-2.0 17 | # License-Filename: LICENSE 18 | # 19 | 20 | xyzhub.version=${project.version} 21 | xyzhub.buildTime=${build.time} 22 | -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/main/resources/log4j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "configuration": { 3 | "packages": "com.amazonaws.services.lambda.runtime.log4j2", 4 | "appenders": { 5 | "LAMBDA": { 6 | "type": "Lambda", 7 | "name": "LAMBDA", 8 | "PatternLayout": { 9 | "pattern": "%d{yyyy-MM-dd HH:mm:ss} <%X{AWSRequestId}> %-5p %c:%.-4096m%n" 10 | } 11 | } 12 | }, 13 | "loggers": { 14 | "root": { 15 | "level": "${env:LOG_LEVEL:-info}", 16 | "AppenderRef": { 17 | "ref": "LAMBDA" 18 | } 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /xyz-jobs/xyz-job-steps/src/test/java/com/here/xyz/jobs/steps/impl/StepTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.jobs.steps.impl; 21 | 22 | import com.here.xyz.jobs.util.test.StepTestBase; 23 | import org.junit.jupiter.api.AfterEach; 24 | import org.junit.jupiter.api.BeforeEach; 25 | 26 | import java.sql.SQLException; 27 | 28 | public abstract class StepTest extends StepTestBase { 29 | 30 | @BeforeEach 31 | public void setup() throws SQLException { 32 | cleanup(); 33 | createSpace(SPACE_ID); 34 | } 35 | 36 | @AfterEach 37 | public void cleanup() throws SQLException { 38 | deleteSpace(SPACE_ID); 39 | cleanS3Files(JOB_ID); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /xyz-models/buildSchemas: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #NOTE: flatc must be installed on the system prior to running this script. 4 | 5 | srcFolder='src/main/resources' 6 | schemas=$(find "$srcFolder" -name '*.fbs') 7 | 8 | flatc --java -o src/main/java $schemas -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/bin/README: -------------------------------------------------------------------------------- 1 | Binary model classes have to be re-generated when the schemas get changed. 2 | Schemas can be found under src/main/resources/*.fbs 3 | 4 | The binary schema classes can be generated from their schemas using the following call: 5 | 6 | cd xyz-models 7 | ./buildSchemas -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/events/GetStorageStatisticsEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.events; 21 | 22 | import java.util.List; 23 | 24 | public class GetStorageStatisticsEvent extends Event { 25 | 26 | private List spaceIds; 27 | 28 | public List getSpaceIds() { 29 | return spaceIds; 30 | } 31 | 32 | public void setSpaceIds(List spaceIds) { 33 | this.spaceIds = spaceIds; 34 | } 35 | 36 | public GetStorageStatisticsEvent withSpaceIds(List spaceIds) { 37 | setSpaceIds(spaceIds); 38 | return this; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/events/PropertyQueryList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.events; 21 | 22 | import java.util.ArrayList; 23 | 24 | public class PropertyQueryList extends ArrayList { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/models/geojson/coordinates/LineStringCoordinates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.models.geojson.coordinates; 21 | 22 | public class LineStringCoordinates extends PositionList { 23 | 24 | public LineStringCoordinates() { 25 | super(); 26 | } 27 | 28 | public LineStringCoordinates(int size) { 29 | super(size); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/models/geojson/coordinates/LinearRingCoordinates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.models.geojson.coordinates; 21 | 22 | public class LinearRingCoordinates extends PositionList { 23 | 24 | // Min length 4. First and last positions are the same. At least 3 non-identical positions. 25 | 26 | public LinearRingCoordinates() { 27 | super(); 28 | } 29 | 30 | public LinearRingCoordinates(int size) { 31 | super(size); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/models/geojson/coordinates/MultiLineStringCoordinates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.models.geojson.coordinates; 21 | 22 | import com.here.xyz.models.geojson.declaration.IBoundedCoordinates; 23 | import java.util.ArrayList; 24 | 25 | public class MultiLineStringCoordinates extends ArrayList implements IBoundedCoordinates { 26 | 27 | public MultiLineStringCoordinates() { 28 | super(); 29 | } 30 | 31 | public MultiLineStringCoordinates(int size) { 32 | super(size); 33 | } 34 | 35 | public BBox calculateBBox() { 36 | return IBoundedCoordinates.calculate(this); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/models/geojson/coordinates/MultiPointCoordinates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.models.geojson.coordinates; 21 | 22 | import com.here.xyz.models.geojson.declaration.IBoundedCoordinates; 23 | import java.util.ArrayList; 24 | 25 | public class MultiPointCoordinates extends ArrayList implements IBoundedCoordinates { 26 | 27 | public MultiPointCoordinates() { 28 | super(); 29 | } 30 | 31 | public MultiPointCoordinates(int size) { 32 | super(size); 33 | } 34 | 35 | public BBox calculateBBox() { 36 | return IBoundedCoordinates.calculate(this); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/models/geojson/coordinates/MultiPolygonCoordinates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.models.geojson.coordinates; 21 | 22 | import com.here.xyz.models.geojson.declaration.IBoundedCoordinates; 23 | import java.util.ArrayList; 24 | 25 | public class MultiPolygonCoordinates extends ArrayList implements IBoundedCoordinates { 26 | 27 | public MultiPolygonCoordinates() { 28 | super(); 29 | } 30 | 31 | public MultiPolygonCoordinates(int size) { 32 | super(size); 33 | } 34 | 35 | public BBox calculateBBox() { 36 | return IBoundedCoordinates.calculate(this); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/models/geojson/coordinates/PointCoordinates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.models.geojson.coordinates; 21 | 22 | public class PointCoordinates extends Position { 23 | 24 | public PointCoordinates() { 25 | super(); 26 | } 27 | 28 | public PointCoordinates(double x, double y) { 29 | super(x, y); 30 | } 31 | 32 | public PointCoordinates(double x, double y, double z) { 33 | super(x, y, z); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/models/geojson/coordinates/PolygonCoordinates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.models.geojson.coordinates; 21 | 22 | import com.here.xyz.models.geojson.declaration.IBoundedCoordinates; 23 | import java.util.ArrayList; 24 | 25 | public class PolygonCoordinates extends ArrayList implements IBoundedCoordinates { 26 | 27 | public PolygonCoordinates() { 28 | super(); 29 | } 30 | 31 | public PolygonCoordinates(int size) { 32 | super(size); 33 | } 34 | 35 | public BBox calculateBBox() { 36 | return IBoundedCoordinates.calculate(this); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/models/geojson/coordinates/PositionList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.models.geojson.coordinates; 21 | 22 | import com.here.xyz.models.geojson.declaration.IBoundedCoordinates; 23 | import java.util.ArrayList; 24 | 25 | /** 26 | * A list of positions. 27 | */ 28 | public class PositionList extends ArrayList implements IBoundedCoordinates { 29 | 30 | public PositionList() { 31 | super(); 32 | } 33 | 34 | public PositionList(int size) { 35 | super(size); 36 | } 37 | 38 | public BBox calculateBBox() { 39 | return IBoundedCoordinates.calculate(this); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/models/geojson/exceptions/InvalidGeometryException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.models.geojson.exceptions; 21 | 22 | /** 23 | * An exception that is thrown when the geometry of a feature is invalid. 24 | */ 25 | public class InvalidGeometryException extends Exception { 26 | 27 | public InvalidGeometryException(String message) { 28 | super(message); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/models/hub/jwt/ServiceMatrix.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.models.hub.jwt; 21 | 22 | import java.util.LinkedHashMap; 23 | 24 | /** 25 | * The service action matrix contains the action matrices of multiple services. The key is the service identifier and the value the 26 | * corresponding action matrix that describes all access rights the corresponding user or application does have for that service. This 27 | * structure is very helpful for caching and offline access control. 28 | */ 29 | public class ServiceMatrix extends LinkedHashMap { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/responses/ModifiedPayloadResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.responses; 21 | 22 | public abstract class ModifiedPayloadResponse extends XyzResponse { 23 | 24 | private String eventType; 25 | 26 | @SuppressWarnings("unused") 27 | public String getEventType() { 28 | return this.eventType; 29 | } 30 | 31 | @SuppressWarnings("WeakerAccess") 32 | public void setEventType(String eventType) { 33 | this.eventType = eventType; 34 | } 35 | 36 | @SuppressWarnings("unused") 37 | public T withEventType(String eventType) { 38 | setEventType(eventType); 39 | //noinspection unchecked 40 | return (T) this; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/responses/NotModifiedResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.responses; 21 | 22 | import com.fasterxml.jackson.annotation.JsonTypeName; 23 | 24 | @JsonTypeName(value = "NotModifiedResponse") 25 | public class NotModifiedResponse extends XyzResponse { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /xyz-models/src/main/java/com/here/xyz/util/Hasher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.util; 21 | 22 | import com.google.common.hash.Hashing; 23 | import java.nio.charset.Charset; 24 | 25 | public class Hasher { 26 | 27 | public static final String getHash(String toBeHashed) { 28 | //noinspection UnstableApiUsage 29 | return Hashing.murmur3_128() 30 | .newHasher() 31 | .putString(toBeHashed, Charset.defaultCharset()) 32 | .hash() 33 | .toString(); 34 | } 35 | 36 | public static final String getHash(byte[] bytes) { 37 | return Hashing.murmur3_128() 38 | .newHasher() 39 | .putBytes(bytes) 40 | .hash() 41 | .toString(); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /xyz-models/src/main/resources/ConnectorPayload.fbs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2021 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | namespace com.here.xyz.bin; 21 | 22 | table ConnectorPayload { 23 | mime_type: string; 24 | etag: string; 25 | bytes: [ubyte]; 26 | } 27 | 28 | root_type ConnectorPayload; -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/ErrorAsFeatureCollection.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "error": "NotImplemented", 4 | "errorMessage": "This is a test." 5 | } -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/GetFeaturesByTileEvent.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "GetFeaturesByTileEvent", 3 | "connectorParams": { 4 | "propertySearch": true 5 | }, 6 | "streamId": "mJHEpcMfYPUW00000003", 7 | "ifNoneMatch": "abc", 8 | "preferPrimaryDataSource": null, 9 | "params": null, 10 | "space": "x-psql-test", 11 | "metadata": null, 12 | "tid": "123", 13 | "aid": "123", 14 | "tags": [], 15 | "propertiesQuery": null, 16 | "selection": null, 17 | "limit": 30000, 18 | "clip": false, 19 | "bbox": [ 20 | -77.080078125, 21 | -12.060809058367298, 22 | -77.0745849609375, 23 | -12.05543709446954 24 | ], 25 | "clusteringType": null, 26 | "clusteringParams": null, 27 | "level": 16, 28 | "x": 18736, 29 | "y": 34979, 30 | "quadkey": "2100300120310022", 31 | "margin": 0 32 | } 33 | -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/GetFeaturesByTileEvent2.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "GetFeaturesByTileEvent", 3 | "connectorParams": { 4 | "propertySearch": true 5 | }, 6 | "streamId": "mJHEpcMfYPUW00000004", 7 | "ifNoneMatch": "def", 8 | "preferPrimaryDataSource": null, 9 | "params": null, 10 | "space": "x-psql-test", 11 | "metadata": null, 12 | "tid": "456", 13 | "aid": "456", 14 | "tags": [], 15 | "bbox": [ 16 | -77.080078125, 17 | -12.060809058367298, 18 | -77.0745849609375, 19 | -12.05543709446954 20 | ], 21 | "propertiesQuery": null, 22 | "selection": null, 23 | "limit": 30000, 24 | "clip": false, 25 | "clusteringType": null, 26 | "clusteringParams": null, 27 | "level": 16, 28 | "x": 18736, 29 | "y": 34979, 30 | "quadkey": "2100300120310022", 31 | "margin": 0 32 | } 33 | -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/GetFeaturesByTileEvent3.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "GetFeaturesByTileEvent", 3 | "connectorParams": { 4 | "propertySearch": true 5 | }, 6 | "streamId": "mJHEpcMfYPUW00000004", 7 | "ifNoneMatch": "def", 8 | "preferPrimaryDataSource": null, 9 | "params": null, 10 | "space": "x-psql-tes", 11 | "metadata": null, 12 | "tid": "456", 13 | "aid": "456", 14 | "tags": [], 15 | "propertiesQuery": null, 16 | "selection": null, 17 | "limit": 30000, 18 | "clip": false, 19 | "bbox": [ 20 | -77.080078125, 21 | -12.060809058367298, 22 | -77.0745849609375, 23 | -12.05543709446954 24 | ], 25 | "clusteringType": null, 26 | "clusteringParams": null, 27 | "level": 16, 28 | "x": 18736, 29 | "y": 34979, 30 | "quadkey": "2100300120310022", 31 | "margin": 0 32 | } 33 | -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/SpaceWithListenersAsList.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Space", 3 | "title": "Old style space with Listeners/Processors in List", 4 | "processors": [ 5 | { 6 | "id": "rule-tagger", 7 | "params": { 8 | "not_the_real_order": 0, 9 | "storageMode": "FULL" 10 | }, 11 | "eventTypes": [ 12 | "ModifySpaceEvent.request" 13 | ] 14 | }, 15 | { 16 | "id": "rule-tagger", 17 | "params": { 18 | "not_the_real_order": 1, 19 | "storageMode": "DIFF" 20 | }, 21 | "eventTypes": [ 22 | "ModifySpaceEvent.request" 23 | ] 24 | }, 25 | { 26 | "id": "rule-tagger", 27 | "params": { 28 | "not_the_real_order": 2, 29 | "storageMode": "DIFF" 30 | }, 31 | "eventTypes": [ 32 | "ModifySpaceEvent.request" 33 | ] 34 | } 35 | ], 36 | "listeners": [ 37 | { 38 | "id": "schema-validator", 39 | "params": { 40 | "not_the_real_order": 0, 41 | "storageMode": "FULL" 42 | }, 43 | "eventTypes": [ 44 | "ModifySpaceEvent.request" 45 | ] 46 | }, 47 | { 48 | "id": "test", 49 | "params": { 50 | "not_the_real_order": 1, 51 | "storageMode": "DIFF" 52 | }, 53 | "eventTypes": [ 54 | "ModifySpaceEvent.request" 55 | ] 56 | } 57 | ] 58 | } -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/SpaceWithNullListeners.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Space", 3 | "title": "New style space with null values", 4 | "processors": null, 5 | "listeners": { 6 | "schema-validator": null 7 | } 8 | } -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/featureMissingType.json: -------------------------------------------------------------------------------- 1 | { 2 | "features": [ 3 | { 4 | "geometry": { 5 | "type": "Point", 6 | "coordinates": [ 7 | -77.075, 8 | -12.057 9 | ] 10 | }, 11 | "id": 1234, 12 | "properties": { 13 | "name": "Estadio Universidad San Marcos Updated", 14 | "@ns:com:here:xyz": { 15 | "tags": [ 16 | "stadium", 17 | "soccer" 18 | ] 19 | }, 20 | "occupant": "National University of San Marcos Updated", 21 | "sport": "association baseball", 22 | "capacity": 67470 23 | } 24 | } 25 | ], 26 | "type": "FeatureCollection" 27 | } 28 | -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/featureWithNumberId.json: -------------------------------------------------------------------------------- 1 | { 2 | "features": [ 3 | { 4 | "geometry": { 5 | "type": "Point", 6 | "coordinates": [ 7 | -77.075, 8 | -12.057 9 | ] 10 | }, 11 | "id": 1234, 12 | "type": "Feature", 13 | "properties": { 14 | "name": "Estadio Universidad San Marcos Updated", 15 | "@ns:com:here:xyz": { 16 | "tags": [ 17 | "stadium", 18 | "soccer" 19 | ] 20 | }, 21 | "occupant": "National University of San Marcos Updated", 22 | "sport": "association baseball", 23 | "capacity": 67470 24 | } 25 | } 26 | ], 27 | "type": "FeatureCollection" 28 | } -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/feature_collection_example.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "id": "Q45671", 6 | "type": "Feature", 7 | "customString": "string_value", 8 | "customLong": 4, 9 | "geometry": { 10 | "type": "Point", 11 | "coordinates": [ 12 | -2.960827777, 13 | 53.430819444, 14 | 0 15 | ] 16 | }, 17 | "properties": { 18 | "name": "Anfield", 19 | "@ns:com:here:maphub": { 20 | "previousGuid": "8100c1baecf3749485ccba46529e751d683d1a4f", 21 | "guid": "15be2f6763b783457d71f2b38a45b8c6bf28c9dc", 22 | "layerId": "grp|xyzhub|data", 23 | "id": -372, 24 | "createdTS": 1487963959666, 25 | "lastUpdateTS": 1488896925130 26 | }, 27 | "occupant": "Liverpool F.C.", 28 | "sport": "association football", 29 | "@ns:com:here:xyz": { 30 | "isocc": [ 31 | "GBR" 32 | ], 33 | "id": "my-space:Q45671", 34 | "space": "my-space", 35 | "tags": [ 36 | "stadium", 37 | "soccer" 38 | ] 39 | }, 40 | "capacity": 54167 41 | } 42 | } 43 | ] 44 | } -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/feature_example.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Q45671", 3 | "type": "Feature", 4 | "customString": "string_value", 5 | "customLong": 4, 6 | "geometry": { 7 | "type": "Point", 8 | "coordinates": [ 9 | -2.960827777, 10 | 53.430819444, 11 | 0 12 | ] 13 | }, 14 | "properties": { 15 | "name": "Anfield", 16 | "@ns:com:here:maphub": { 17 | "previousGuid": "8100c1baecf3749485ccba46529e751d683d1a4f", 18 | "guid": "15be2f6763b783457d71f2b38a45b8c6bf28c9dc", 19 | "layerId": "grp|xyzhub|data", 20 | "id": -372, 21 | "createdTS": 1487963959666, 22 | "lastUpdateTS": 1488896925130 23 | }, 24 | "occupant": "Liverpool F.C.", 25 | "sport": "association football", 26 | "@ns:com:here:xyz": { 27 | "isocc": [ 28 | "GBR" 29 | ], 30 | "id": "my-space:Q45671", 31 | "space": "my-space", 32 | "tags": [ 33 | "stadium", 34 | "soccer" 35 | ] 36 | }, 37 | "capacity": 54167 38 | } 39 | } -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/features_array.jsonl: -------------------------------------------------------------------------------- 1 | {"type":"Feature","id":"1","geometry":{"type":"Point","coordinates":[1.0,1.0]},"properties":{"test":1,"momType":"Place"}} 2 | {"type":"Feature","id":"2","geometry":{"type":"Point","coordinates":[2.0,2.0]},"properties":{"test":2,"momType":"Address"}} 3 | {"type":"Feature","id":"3","geometry":{"type":"Point","coordinates":[3.0,3.0]},"properties":{"test":3,"momType":"Topology"}} 4 | {"type":"Feature","id":"4","geometry":{"type":"Point","coordinates":[4.0,4.0]},"properties":{"test":4,"momType":"Topology"}} 5 | {"type":"Feature","id":"5","geometry":{"type":"Point","coordinates":[5.0,5.0]},"properties":{"test":5,"momType":"Place"}} 6 | {"type":"Feature","id":"6","geometry":{"type":"Point","coordinates":[6.0,6.0]},"properties":{"test":6,"momType":"Address"}} 7 | {"type":"Feature","id":"7","geometry":{"type":"Point","coordinates":[7.0,7.0]},"properties":{"test":7,"momType":"Address"}} -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/geometries.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Feature", 3 | "id": "A1", 4 | "geometry": { 5 | "type": "GeometryCollection", 6 | "geometries": [ 7 | { 8 | "type": "Point", 9 | "coordinates": [ 10 | -2.960827777, 11 | 53.430819444 12 | ] 13 | }, 14 | { 15 | "type": "Point", 16 | "coordinates": [ 17 | -2.960827777, 18 | 53.430819444, 19 | 0 20 | ] 21 | }, 22 | { 23 | "type": "MultiPoint", 24 | "coordinates": [ 25 | [ 26 | -2.960827777, 27 | 53.430819443 28 | ], 29 | [ 30 | -2.960827777, 31 | 53.430819444, 32 | 0.3 33 | ] 34 | ] 35 | }, 36 | { 37 | "type": "LineString", 38 | "coordinates": [ 39 | [ 40 | -2.960827777, 41 | 53.430819443 42 | ], 43 | [ 44 | -2.960827777, 45 | 53.430819444, 46 | 0 47 | ] 48 | ] 49 | } 50 | ] 51 | } 52 | } -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/nullFeature.json: -------------------------------------------------------------------------------- 1 | { 2 | "features": [null], 3 | "type": "FeatureCollection" 4 | } 5 | -------------------------------------------------------------------------------- /xyz-models/src/test/resources/com/here/xyz/test/one_feature.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Q45671", 3 | "type": "Feature", 4 | "customString": "string_value", 5 | "customLong": 4, 6 | "geometry": { 7 | "type": "Point", 8 | "coordinates": [ 9 | -2.960827777, 10 | 53.430819444, 11 | 0 12 | ] 13 | }, 14 | "properties": { 15 | "name": "Anfield", 16 | "@ns:com:here:maphub": { 17 | "previousGuid": "8100c1baecf3749485ccba46529e751d683d1a4f", 18 | "guid": "15be2f6763b783457d71f2b38a45b8c6bf28c9dc", 19 | "layerId": "grp|xyzhub|data", 20 | "id": -372, 21 | "createdTS": 1487963959666, 22 | "lastUpdateTS": 1488896925130 23 | }, 24 | "occupant": "Liverpool F.C.", 25 | "sport": "association football", 26 | "@ns:com:here:xyz": { 27 | "isocc": [ 28 | "GBR" 29 | ], 30 | "id": "my-space:Q45671", 31 | "space": "my-space", 32 | "tags": [ 33 | "stadium", 34 | "soccer" 35 | ] 36 | }, 37 | "capacity": 54167 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /xyz-psql-connector/src/main/java/com/here/xyz/psql/tools/DhString.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.psql.tools; 2 | 3 | import java.util.Locale; 4 | 5 | public class DhString 6 | { public static final String format(String format, Object... args) { return String.format(Locale.US,format,args); } 7 | } 8 | -------------------------------------------------------------------------------- /xyz-psql-connector/src/main/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017-2020 HERE Europe B.V. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # SPDX-License-Identifier: Apache-2.0 17 | # License-Filename: LICENSE 18 | # 19 | 20 | packages=com.amazonaws.services.lambda.runtime.log4j2 21 | 22 | #Define the LAMBDA appender 23 | appender.LAMBDA.type = Lambda 24 | appender.LAMBDA.name = LAMBDA 25 | appender.LAMBDA.layout.type = PatternLayout 26 | appender.LAMBDA.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} <%X{AWSRequestId}> %-5p %c:%.-4096m%n 27 | 28 | rootLogger.level = ${env:LOG_LEVEL:-info} 29 | rootLogger.appenderRef.stdout.ref = LAMBDA 30 | -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/java/com/here/xyz/psql/PsqlOtaIT.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.psql; 2 | 3 | import static org.junit.Assert.assertNotNull; 4 | import static org.junit.Assert.assertTrue; 5 | 6 | import com.here.xyz.XyzSerializable; 7 | import com.here.xyz.events.OneTimeActionEvent; 8 | import com.here.xyz.responses.SuccessResponse; 9 | import com.here.xyz.responses.XyzResponse; 10 | import java.util.Collections; 11 | 12 | public class PsqlOtaIT extends PSQLAbstractIT { 13 | 14 | //@Test 15 | public void testOtaEvent() throws Exception { 16 | OneTimeActionEvent ota = new OneTimeActionEvent() 17 | .withPhase("test") 18 | .withInputData(Collections.singletonMap("someKey", "someValue")); 19 | XyzResponse response = XyzSerializable.deserialize(invokeLambda(ota)); 20 | assertNotNull(response); 21 | assertNoErrorInResponse(response); 22 | assertTrue(response instanceof SuccessResponse); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/BasicSearchByPropertiesAndTagsEvent.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "SearchForFeaturesEvent", 3 | "space": "foo", 4 | "params": {}, 5 | "connectorParams": { 6 | "propertySearch": true, 7 | "connectorId": "test-connector" 8 | }, 9 | "limit": 400 10 | } 11 | -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/DeleteSpaceEvent.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "ModifySpaceEvent", 3 | "params": {}, 4 | "space": "foo", 5 | "operation": "DELETE", 6 | "tags": null, 7 | "connectorParams": { 8 | "propertySearch": true, 9 | "connectorId": "test-connector" 10 | } 11 | } -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/GetFeaturesByIdEvent.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "GetFeaturesByIdEvent", 3 | "streamId": "xIou1GnJDwpb0000009C", 4 | "space": "foo", 5 | "ids": ["1","2" ], 6 | "connectorParams": { 7 | "propertySearch": true, 8 | "connectorId": "test-connector" 9 | } 10 | } -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/GetStatisticsEvent.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "GetStatisticsEvent", 3 | "space": "foo", 4 | "params": {}, 5 | "connectorParams": { 6 | "propertySearch": true, 7 | "connectorId": "test-connector" 8 | } 9 | } -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/HealthCheckEvent.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "HealthCheckEvent", 3 | "minResponseTime": 100, 4 | "connectorParams": { 5 | "propertySearch": true, 6 | "connectorId": "test-connector" 7 | }, 8 | "params": { 9 | "propertySearch": true 10 | } 11 | } -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/HealthCheckEventWithAutoIndexing.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "HealthCheckEvent", 3 | "minResponseTime": 100, 4 | "connectorParams": { 5 | "propertySearch": true, 6 | "connectorId": "test-connector", 7 | "autoIndexing" : true 8 | }, 9 | "params": { 10 | "propertySearch": true 11 | } 12 | } -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/HealthCheckWithEnableHashedSpaceIdEvent.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "HealthCheckEvent", 3 | "minResponseTime": 100, 4 | "connectorParams": { 5 | "propertySearch": true, 6 | "autoIndexing" : true, 7 | "enableHashedSpaceId": true, 8 | "connectorId": "test-connector" 9 | }, 10 | "params": { 11 | "propertySearch": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/InsertFeaturesEvent.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "ModifyFeaturesEvent", 3 | "space": "foo", 4 | "params": {}, 5 | "connectorParams": { 6 | "propertySearch": true, 7 | "connectorId": "test-connector" 8 | }, 9 | "insertFeatures": [ 10 | { 11 | "geometry": { 12 | "type": "Point", 13 | "coordinates": [ 14 | 14.3222, 15 | -2.32506, 16 | 0 17 | ] 18 | }, 19 | "type": "Feature", 20 | "properties": { 21 | "name": "Toyota", 22 | "size": 8.5, 23 | "car": true, 24 | "@ns:com:here:xyz": { 25 | "space" : "foo", 26 | "createdAt" : 1517504700726, 27 | "updatedAt" : 1517504700726, 28 | "tags": [ 29 | "yellow" 30 | ] 31 | } 32 | } 33 | }, 34 | { 35 | "geometry": { 36 | "type": "Point", 37 | "coordinates": [ 38 | 14.3222, 39 | -2.32506, 40 | 0 41 | ] 42 | }, 43 | "type": "Feature", 44 | "properties": { 45 | "name": "Tesla", 46 | "@ns:com:here:xyz": { 47 | "space" : "foo", 48 | "createdAt" : 1517504700726, 49 | "updatedAt" : 1517504700726, 50 | "tags": [ 51 | "red" 52 | ] 53 | } 54 | } 55 | } 56 | ] 57 | } 58 | -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/InsertFeaturesEventWithHash.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "ModifyFeaturesEvent", 3 | "space": "foo", 4 | "conflictDetectionEnabled": true, 5 | "params": {}, 6 | "connectorParams": { 7 | "propertySearch": true, 8 | "connectorId": "test-connector" 9 | }, 10 | "insertFeatures": [ 11 | { 12 | "geometry": { 13 | "type": "Point", 14 | "coordinates": [ 15 | 14.3222, 16 | -2.32506 17 | ] 18 | }, 19 | "type": "Feature", 20 | "properties": { 21 | "name": "Toyota", 22 | "@ns:com:here:xyz": { 23 | "space" : "foo", 24 | "createdAt" : 1517504700726, 25 | "updatedAt" : 1517504700726, 26 | "version": 0, 27 | "tags": [ 28 | "yellow" 29 | ] 30 | } 31 | } 32 | }, 33 | { 34 | "geometry": { 35 | "type": "Point", 36 | "coordinates": [ 37 | 14.3222, 38 | -2.32506 39 | ] 40 | }, 41 | "type": "Feature", 42 | "properties": { 43 | "name": "Tesla", 44 | "@ns:com:here:xyz": { 45 | "space" : "foo", 46 | "createdAt" : 1517504700726, 47 | "updatedAt" : 1517504700726, 48 | "version": 0, 49 | "tags": [ 50 | "red" 51 | ] 52 | } 53 | } 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/InsertNullGeometry.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "ModifyFeaturesEvent", 3 | "space": "foo", 4 | "params": {}, 5 | "connectorParams": { 6 | "propertySearch": true, 7 | "connectorId": "test-connector" 8 | }, 9 | "insertFeatures": [ 10 | { 11 | "id": "1", 12 | "geometry": null, 13 | "type": "Feature", 14 | "properties": { 15 | "name": "Toyota", 16 | "size": 8.5, 17 | "car": true, 18 | "@ns:com:here:xyz": { 19 | "space" : "foo", 20 | "createdAt" : 1517504700726, 21 | "updatedAt" : 1517504700726, 22 | "tags": [ 23 | "yellow" 24 | ] 25 | } 26 | } 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/IterateMySpace.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "IterateFeaturesEvent", 3 | "space": "foo", 4 | "params": {}, 5 | "connectorParams": { 6 | "propertySearch": true, 7 | "connectorId": "test-connector" 8 | }, 9 | "limit": 5, 10 | "propertiesQuery": [[]] 11 | } -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/SearchForFeaturesByPropertiesEvent.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "SearchForFeaturesEvent", 3 | "space": "foo", 4 | "params": {}, 5 | "connectorParams": { 6 | "propertySearch": true, 7 | "connectorId": "test-connector" 8 | }, 9 | "propertiesQuery": [ 10 | [ 11 | { 12 | "key": "properties.size", 13 | "operation": "GREATER_THAN_OR_EQUALS", 14 | "values": [ 15 | 8.4 16 | ] 17 | }, 18 | { 19 | "key": "properties.size", 20 | "operation": "LESS_THAN", 21 | "values": [ 22 | 9 23 | ] 24 | } 25 | ], 26 | [ 27 | { 28 | "key": "properties.name", 29 | "operation": "EQUALS", 30 | "values": [ 31 | "Tesla" 32 | ] 33 | } 34 | ] 35 | ], 36 | "limit": 400 37 | } 38 | -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/SearchForFeaturesEvent.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "SearchForFeaturesEvent", 3 | "space": "foo", 4 | "params": {}, 5 | "connectorParams": { 6 | "propertySearch": true, 7 | "connectorId": "test-connector" 8 | }, 9 | "tags": [ 10 | ["yellow"], 11 | ["red"] 12 | ], 13 | "limit": 400 14 | } -------------------------------------------------------------------------------- /xyz-psql-connector/src/test/resources/events/TestCreateTable.json: -------------------------------------------------------------------------------- 1 | { 2 | "connectorParams": { 3 | "propertySearch": true, 4 | "connectorId": "test-connector" 5 | }, 6 | "type": "LoadFeaturesEvent", 7 | "streamId": "VwSa8UFALpu500000001", 8 | "space": "foo", 9 | "idsMap": { 10 | "test": null 11 | } 12 | } -------------------------------------------------------------------------------- /xyz-util/src/main/java/com/here/xyz/util/service/AbstractRouterBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2023 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.util.service; 21 | 22 | import io.vertx.core.Future; 23 | import io.vertx.core.Vertx; 24 | import io.vertx.ext.web.Router; 25 | 26 | public interface AbstractRouterBuilder { 27 | Future buildRoutes(Vertx vertx); 28 | } 29 | -------------------------------------------------------------------------------- /xyz-util/src/main/java/com/here/xyz/util/service/Initializable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2019 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.util.service; 21 | 22 | import io.vertx.core.Future; 23 | 24 | public interface Initializable { 25 | default Future init() { 26 | return Future.succeededFuture(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /xyz-util/src/main/java/com/here/xyz/util/service/aws/S3ObjectSummary.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.util.service.aws; 2 | 3 | import software.amazon.awssdk.services.s3.model.S3Object; 4 | 5 | public record S3ObjectSummary(String key, String bucket, long size) { 6 | public boolean isEmpty() { 7 | return size == 0; 8 | } 9 | public static S3ObjectSummary fromS3Object(S3Object s3Object, String bucketName) { 10 | return new S3ObjectSummary(s3Object.key(), bucketName, s3Object.size()); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /xyz-util/src/main/java/com/here/xyz/util/service/aws/dynamo/IndexDefinition.java: -------------------------------------------------------------------------------- 1 | package com.here.xyz.util.service.aws.dynamo; 2 | 3 | public class IndexDefinition { 4 | 5 | private final String hashKey; 6 | private final String rangeKey; 7 | 8 | public IndexDefinition(String hashKey) { 9 | this.hashKey = hashKey; 10 | this.rangeKey = null; 11 | } 12 | 13 | public IndexDefinition(String hashKey, String rangeKey) { 14 | this.hashKey = hashKey; 15 | this.rangeKey = rangeKey; 16 | } 17 | 18 | public String getHashKey() { 19 | return hashKey; 20 | } 21 | 22 | public String getRangeKey() { 23 | return rangeKey; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /xyz-util/src/main/resources/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:17-slim 2 | 3 | MAINTAINER Benjamin Rögner "benjamin.roegner@here.com" 4 | MAINTAINER Lucas Ceni "lucas.ceni@here.com" 5 | MAINTAINER Dimitar Goshev "dimitar.goshev@here.com" 6 | 7 | ENV LOG_CONFIG log4j2-console-plain.json 8 | ENV LOG_PATH /var/log/xyz 9 | ENV FS_WEB_ROOT www 10 | 11 | #Override the following environment variables to let the service connect to different host names 12 | ENV LOCALSTACK_ENDPOINT http://aws-localstack:4566 13 | ENV STORAGE_DB_URL jdbc:postgresql://postgres/postgres 14 | ENV PSQL_HOST postgres 15 | ENV XYZ_HUB_REDIS_URI redis://redis 16 | ENV HTTP_CONNECTOR_ENDPOINT http://xyz-http-connector:9090/psql 17 | ENV HUB_ENDPOINT http://xyz-hub:8080/hub 18 | 19 | COPY xyz-hub-service/target/xyz-hub-service.jar . 20 | ADD xyz-util/src/main/resources/docker/Dockerfile / 21 | 22 | EXPOSE 8080 9090 23 | CMD java -jar xyz-hub-service.jar 24 | -------------------------------------------------------------------------------- /xyz-util/src/main/resources/docker/Dockerfile-job-service: -------------------------------------------------------------------------------- 1 | FROM openjdk:17-slim 2 | 3 | MAINTAINER Benjamin Rögner "benjamin.roegner@here.com" 4 | MAINTAINER Lucas Ceni "lucas.ceni@here.com" 5 | MAINTAINER Dimitar Goshev "dimitar.goshev@here.com" 6 | MAINTAINER Minikon Nah "minikon.nah@here.com" 7 | MAINTAINER Maximilian Chrzan "maximilian.chrzan@here.com" 8 | 9 | ENV LOG_CONFIG log4j2-console-plain.json 10 | ENV LOG_PATH /var/log/xyz 11 | 12 | #Override the following environment variables to let the service connect to different host names 13 | ENV LOCALSTACK_ENDPOINT http://aws-localstack:4566 14 | ENV HUB_ENDPOINT http://xyz-hub:8080/hub 15 | 16 | COPY xyz-jobs/xyz-job-service/target/xyz-job-service-fat.jar . 17 | ADD xyz-util/src/main/resources/docker/Dockerfile-job-service / 18 | 19 | EXPOSE 7070 20 | CMD java -jar xyz-job-service-fat.jar 21 | -------------------------------------------------------------------------------- /xyz-util/src/main/resources/docker/Dockerfile-s3-explorer: -------------------------------------------------------------------------------- 1 | FROM deskoh/aws-js-s3-explorer 2 | 3 | #Patch settings to use local stack endpoint and default local bucket 4 | RUN echo 'AWS.config = new AWS.Config({credentials: new AWS.Credentials("localstack", "localstack"), endpoint: new AWS.Endpoint("http://localhost:4566"), s3ForcePathStyle: true}); \ 5 | addEventListener("load", event => { \ 6 | settingsScope.settings.entered_bucket = "test-bucket"; \ 7 | settingsScope.settings.auth = "auth"; \ 8 | settingsScope.settings.cred = {endpointUrl: "http://localhost:4566", accessKeyId: "localstack", secretAccessKey: "localstack", s3ForcePathStyle: true}; \ 9 | settingsScope.update(); \ 10 | });' >> explorer.js -------------------------------------------------------------------------------- /xyz-util/src/main/resources/sql/README.md: -------------------------------------------------------------------------------- 1 | This folder contains SQL scripts that will be installed into all connector databases 2 | automatically at initialization time. 3 | Each script will be installed into its own schema named like the file itself (without file suffix) 4 | with an added version number of the software version in which the script was updated the last time. 5 | Additionally, the "latest" version of each script will be installed into the "latest" schema 6 | (A schema without a version suffix that will always point to the latest installed version). 7 | 8 | E.g., a script named common.sql would be installed into the following schemas if 9 | it has changes in the current software version 1.0.1: 10 | 11 | - common:1.0.1 12 | - common -------------------------------------------------------------------------------- /xyz-util/src/test/java/com/here/xyz/test/featurewriter/sql/SQLTestSuite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | package com.here.xyz.test.featurewriter.sql; 21 | 22 | import com.here.xyz.test.featurewriter.SpaceWriter; 23 | import com.here.xyz.test.featurewriter.TestSuite; 24 | 25 | public abstract class SQLTestSuite extends TestSuite { 26 | 27 | @Override 28 | protected SpaceWriter spaceWriter() { 29 | return new SQLSpaceWriter(composite, getClass().getSimpleName()); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /xyz-util/src/test/js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-tests", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "plv8.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/heremaps/xyz-hub.git" 12 | }, 13 | "dependencies": { 14 | "pg": "^8.12.0", 15 | "deasync": "^0.1.30" 16 | }, 17 | "private": true 18 | } 19 | -------------------------------------------------------------------------------- /xyz-util/src/test/resources/functions0/functions.sql: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | CREATE OR REPLACE FUNCTION myTestFunction(input text) RETURNS TEXT AS 21 | $BODY$ 22 | BEGIN 23 | RETURN 'Hello Friend, ' || input; 24 | END; 25 | $BODY$ 26 | LANGUAGE plpgsql VOLATILE; -------------------------------------------------------------------------------- /xyz-util/src/test/resources/functions2/functions.sql: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | CREATE OR REPLACE FUNCTION myTestFunction(input text) RETURNS TEXT AS 21 | $BODY$ 22 | BEGIN 23 | RETURN 'Hello, ' || input; 24 | END; 25 | $BODY$ 26 | LANGUAGE plpgsql VOLATILE; -------------------------------------------------------------------------------- /xyz-util/src/test/resources/junit-platform.properties: -------------------------------------------------------------------------------- 1 | junit.jupiter.execution.parallel.enabled = true 2 | junit.jupiter.execution.parallel.config.fixed.parallelism = 20 3 | junit.jupiter.execution.parallel.mode.classes.default = concurrent -------------------------------------------------------------------------------- /xyz-util/src/test/resources/sqlSamples/functions.sql: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2024 HERE Europe B.V. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * SPDX-License-Identifier: Apache-2.0 17 | * License-Filename: LICENSE 18 | */ 19 | 20 | CREATE OR REPLACE FUNCTION myTestFunction(input text) RETURNS TEXT AS 21 | $BODY$ 22 | BEGIN 23 | RETURN 'Hello World, ' || input; 24 | END; 25 | $BODY$ 26 | LANGUAGE plpgsql VOLATILE; --------------------------------------------------------------------------------