diff --git a/.fossa.yml b/.fossa.yml index 005b660973c55b1ecb92b77bff52c5159978f3db..09b5fc51ab43d1499d01a0da799b7402cee5c50b 100644 --- a/.fossa.yml +++ b/.fossa.yml @@ -32,3 +32,7 @@ analyze: type: mvn target: provider/indexer-ibm/pom.xml path: . + - name: indexer-reference + type: mvn + target: provider/indexer-reference/pom.xml + path: . diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd9ed5237bca01c5868c7034c090b2045df56c54..52342cee8e791f9d7f0706da78bc0d442ef2d9c7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,7 @@ variables: OSDU_GCP_STORAGE_RECORDS_BATCH_SIZE: 20 OSDU_GCP_DATA_GROUP: osdu OSDU_GCP_ENV_VARS: AUTHORIZE_API=$OSDU_GCP_ENTITLEMENTS_URL,GOOGLE_CLOUD_PROJECT=$OSDU_GCP_PROJECT,REDIS_SEARCH_HOST=$REDIS_SEARCH_HOST,REDIS_GROUP_HOST=$REDIS_GROUP_HOST,SECURITY_HTTPS_CERTIFICATE_TRUST=$OSDU_SECURITY_HTTPS_CERTIFICATE_TRUST,INDEXER_HOST=$OSDU_GCP_INDEXER_HOST,STORAGE_QUERY_RECORD_HOST=$OSDU_GCP_STORAGE_QUERY_RECORD_HOST,STORAGE_SCHEMA_HOST=$OSDU_GCP_STORAGE_SCHEMA_HOST,STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST=$OSDU_GCP_STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST,STORAGE_HOSTNAME=$OSDU_GCP_STORAGE_HOSTNAME,STORAGE_RECORDS_BATCH_SIZE=$OSDU_GCP_STORAGE_RECORDS_BATCH_SIZE,INDEXER_QUEUE_HOST=$OSDU_GCP_INDEXER_QUEUE_HOST,LEGALTAG_API=$OSDU_GCP_LEGALTAG_API,CRS_API=$OSDU_GCP_CRS_API,DATA_GROUP=$OSDU_GCP_DATA_GROUP,GOOGLE_AUDIENCES=$GOOGLE_AUDIENCE,INDEXER_QUE_SERVICE_MAIL=$OSDU_GCP_QUEUE_SA_EMAIL,SCHEMA_HOST=$OSDU_GCP_SCHEMA_URL/api/schema-service/v1/schema --vpc-connector=$OSDU_GCP_VPC_CONNECTOR + OSDU_GCP_TEST_SUBDIR: testing/$OSDU_GCP_SERVICE-test-$OSDU_GCP_VENDOR IBM_BUILD_SUBDIR: provider/indexer-ibm IBM_INT_TEST_SUBDIR: testing/indexer-test-ibm diff --git a/NOTICE b/NOTICE index cbd4bf4a82a797ceb9a2f1bec0bd42363cd633ec..6b22e74c2e0fad3759f5f580c6e8c2c67c6b8cb6 100644 --- a/NOTICE +++ b/NOTICE @@ -180,6 +180,7 @@ The following software have components provided under the terms of this license: - Apache Commons BeanUtils (from http://commons.apache.org/proper/commons-beanutils/) - Apache Commons CLI (from http://commons.apache.org/proper/commons-cli/) - Apache Commons Codec (from http://commons.apache.org/proper/commons-codec/) +- Apache Commons Collections (from http://commons.apache.org/proper/commons-collections/) - Apache Commons Lang (from http://commons.apache.org/proper/commons-lang/) - Apache Commons Logging (from http://commons.apache.org/proper/commons-logging/) - Apache Commons Validator (from http://commons.apache.org/proper/commons-validator/) @@ -210,6 +211,7 @@ The following software have components provided under the terms of this license: - AutoValue (from ) - Azure AD Spring Security Integration Spring Boot Starter (from https://github.com/Microsoft/azure-spring-boot) - Azure Metrics Spring Boot Starter (from https://github.com/Microsoft/azure-spring-boot) +- BSON (from http://bsonspec.org) - Bean Validation API (from http://beanvalidation.org) - Byte Buddy (without dependencies) (from ) - Byte Buddy Java agent (from ) @@ -231,21 +233,29 @@ The following software have components provided under the terms of this license: - Doxia :: XDoc Module (from ) - Doxia :: XHTML Module (from ) - Elastic JNA Distribution (from https://github.com/java-native-access/jna) +- Elastic JNA Distribution (from https://github.com/java-native-access/jna) +- Elasticsearch: 5.0.0-alpha5 (from https://github.com/elastic/elasticsearch) - Elasticsearch: 5.0.0-alpha5 (from https://github.com/elastic/elasticsearch) - FindBugs-jsr305 (from http://findbugs.sourceforge.net/) - Google APIs Client Library for Java (from ) +- Google APIs Client Library for Java (from ) +- Google App Engine extensions to the Google HTTP Client Library for Java. (from ) - Google App Engine extensions to the Google HTTP Client Library for Java. (from ) - Google Cloud Core (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core) - Google Cloud Core HTTP (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-http) +- Google Cloud Core HTTP (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-http) - Google Cloud Core gRPC (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-grpc) - Google Cloud Datastore (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-datastore) +- Google Cloud Datastore (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-datastore) - Google Cloud Key Management Service (KMS) API v1-rev22-1.23.0 (from ) - Google Cloud Logging (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-logging) - Google Cloud Pub/Sub (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-pubsub) +- Google Cloud Pub/Sub (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-pubsub) - Google Cloud Storage (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-storage) - Google HTTP Client Library for Java (from https://github.com/google/google-http-java-client.git) - Google HTTP Client Library for Java (from https://github.com/google/google-http-java-client.git) - Google OAuth Client Library for Java (from ) +- Google OAuth Client Library for Java (from ) - Gson (from https://github.com/google/gson) - Gson (from https://github.com/google/gson) - Guava InternalFutureFailureAccess and InternalFutures (from ) @@ -253,6 +263,7 @@ The following software have components provided under the terms of this license: - Guava: Google Core Libraries for Java (from https://github.com/google/guava.git) - Guava: Google Core Libraries for Java (from https://github.com/google/guava.git) - HPPC Collections (from http://labs.carrotsearch.com) +- HPPC Collections (from http://labs.carrotsearch.com) - Hibernate Validator Engine (from ) - IBM COS Java SDK for Amazon S3 (from https://github.com/ibm/ibm-cos-sdk-java) - IBM COS Java SDK for COS KMS (from https://github.com/ibm/ibm-cos-sdk-java) @@ -274,6 +285,7 @@ The following software have components provided under the terms of this license: - Jackson (from http://jackson.codehaus.org) - Jackson (from http://jackson.codehaus.org) - Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://github.com/google/google-http-java-client.git/google-http-client-jackson2) +- Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://github.com/google/google-http-java-client.git/google-http-client-jackson2) - Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary) - Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary) - Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310) @@ -300,6 +312,7 @@ The following software have components provided under the terms of this license: - Java Native Access (from https://github.com/java-native-access/jna) - Java Native Access Platform (from https://github.com/java-native-access/jna) - Java Servlet API (from http://servlet-spec.java.net) +- Java UUID Generator (from http://wiki.fasterxml.com/JugHome) - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) - Jetty Server (from ) @@ -316,19 +329,34 @@ The following software have components provided under the terms of this license: - Logback Contrib :: JSON :: Core (from ) - Logback Contrib :: Jackson (from ) - Lucene Common Analyzers (from ) +- Lucene Common Analyzers (from ) +- Lucene Core (from ) - Lucene Core (from ) - Lucene Grouping (from ) +- Lucene Grouping (from ) +- Lucene Highlighter (from ) - Lucene Highlighter (from ) - Lucene Join (from ) +- Lucene Join (from ) +- Lucene Memory (from ) +- Lucene Memory (from ) - Lucene Memory (from ) - Lucene Memory (from ) - Lucene Miscellaneous (from ) +- Lucene Miscellaneous (from ) +- Lucene Queries (from ) - Lucene Queries (from ) - Lucene QueryParsers (from ) +- Lucene QueryParsers (from ) +- Lucene Sandbox (from ) - Lucene Sandbox (from ) +- Lucene Spatial (from ) - Lucene Spatial 3D (from ) +- Lucene Spatial 3D (from ) +- Lucene Spatial Extras (from ) - Lucene Spatial Extras (from ) - Lucene Suggest (from ) +- Lucene Suggest (from ) - MapStruct Core (from ) - Maven Artifact (from ) - Maven Artifact Manager (from ) @@ -350,13 +378,16 @@ The following software have components provided under the terms of this license: - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java) +- Microsoft Azure Java Core Library (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure Netty HTTP Client Library (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure SDK for SQL API of Azure Cosmos DB Service (from https://github.com/Azure/azure-sdk-for-java) -- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) - Mockito (from http://mockito.org) - Mockito (from http://mockito.org) +- Mockito (from http://www.mockito.org) - Mojo's Maven plugin for Cobertura (from http://mojo.codehaus.org/cobertura-maven-plugin/) +- MongoDB Driver (from http://www.mongodb.org) +- MongoDB Java Driver Core (from http://www.mongodb.org) - Netty Reactive Streams HTTP support (from ) - Netty Reactive Streams Implementation (from ) - Netty/Buffer (from http://netty.io/) @@ -402,20 +433,24 @@ The following software have components provided under the terms of this license: - PowerMock (from http://www.powermock.org) - Protocol Buffer extensions to the Google HTTP Client Library for Java. (from ) - QpidJMS Client (from ) +- RabbitMQ Java Client (from http://www.rabbitmq.com) - Reactive Streams Netty driver (from https://github.com/reactor/reactor-netty) - Retrofit (from ) - Servlet Specification 2.5 API (from ) - Simple XML (from http://simple.sourceforge.net) - SnakeYAML (from http://www.snakeyaml.org) - Spatial4J (from http://www.locationtech.org/projects/locationtech.spatial4j) +- Spring AMQP Core (from https://projects.spring.io/spring-amqp) - Spring AOP (from https://github.com/spring-projects/spring-framework) - Spring Beans (from https://github.com/spring-projects/spring-framework) - Spring Boot (from http://projects.spring.io/spring-boot/) +- Spring Boot AMQP Starter (from http://projects.spring.io/spring-boot/) - Spring Boot Actuator (from http://projects.spring.io/spring-boot/) - Spring Boot Actuator AutoConfigure (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-actuator-autoconfigure) - Spring Boot Actuator Starter (from http://projects.spring.io/spring-boot/) - Spring Boot AutoConfigure (from http://projects.spring.io/spring-boot/) - Spring Boot Configuration Processor (from http://projects.spring.io/spring-boot/) +- Spring Boot Data MongoDB Starter (from http://projects.spring.io/spring-boot/) - Spring Boot Dependencies (from http://projects.spring.io/spring-boot/) - Spring Boot Jersey Starter (from http://projects.spring.io/spring-boot/) - Spring Boot Json Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-json) @@ -434,11 +469,14 @@ The following software have components provided under the terms of this license: - Spring Core (from https://github.com/spring-projects/spring-framework) - Spring Data Core (from ) - Spring Data Core (from ) +- Spring Data MongoDB - Core (from ) - Spring Expression Language (SpEL) (from https://github.com/spring-projects/spring-framework) - Spring JMS (from https://github.com/spring-projects/spring-framework) - Spring Messaging (from https://github.com/spring-projects/spring-framework) - Spring Plugin - Core (from ) - Spring Plugin - Metadata Extension (from ) +- Spring RabbitMQ Support (from https://projects.spring.io/spring-amqp) +- Spring Retry (from http://www.springsource.org) - Spring Security JWT Library (from http://github.com/spring-projects/spring-security-oauth) - Spring Security JWT Library (from http://github.com/spring-projects/spring-security-oauth) - Spring TestContext Framework (from https://github.com/spring-projects/spring-framework) @@ -452,17 +490,23 @@ The following software have components provided under the terms of this license: - Xerces2-j (from https://xerces.apache.org/xerces2-j/) - aalto-xml (from ) - aggs-matrix-stats (from https://github.com/elastic/elasticsearch) +- aggs-matrix-stats (from https://github.com/elastic/elasticsearch) - aws-ssm-java-caching-client (from https://github.com/awslabs/aws-ssm-java-caching-client) - cli (from https://github.com/elastic/elasticsearch) +- cli (from https://github.com/elastic/elasticsearch) +- com.google.api.grpc:grpc-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis) - com.google.api.grpc:grpc-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis) - com.google.api.grpc:proto-google-cloud-logging-v2 (from https://github.com/googleapis/googleapis) - com.google.api.grpc:proto-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis) +- com.google.api.grpc:proto-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis) - com.google.api.grpc:proto-google-common-protos (from https://github.com/googleapis/googleapis) - com.google.api.grpc:proto-google-iam-v1 (from https://github.com/googleapis/googleapis) - commons-collections (from ) - compiler (from http://github.com/spullara/mustache.java) +- compiler (from http://github.com/spullara/mustache.java) - datastore-v1-proto-client (from ) - elasticsearch-core (from https://github.com/elastic/elasticsearch) +- elasticsearch-core (from https://github.com/elastic/elasticsearch) - elasticsearch-geo (from https://github.com/elastic/elasticsearch) - error-prone annotations (from ) - error-prone annotations (from ) @@ -497,6 +541,7 @@ The following software have components provided under the terms of this license: - jersey-spring4 (from ) - jose4j (from https://bitbucket.org/b_c/jose4j/) - lang-mustache (from https://github.com/elastic/elasticsearch) +- lang-mustache (from https://github.com/elastic/elasticsearch) - lettuce (from http://github.com/mp911de/lettuce/wiki) - mapper-extras (from https://github.com/elastic/elasticsearch) - micrometer-core (from https://github.com/micrometer-metrics/micrometer) @@ -504,18 +549,24 @@ The following software have components provided under the terms of this license: - org.xmlunit:xmlunit-core (from http://www.xmlunit.org/) - oro (from ) - parent-join (from https://github.com/elastic/elasticsearch) +- parent-join (from https://github.com/elastic/elasticsearch) - powermock-api-support (from ) - powermock-core (from http://www.powermock.org) - powermock-module-junit4 (from http://www.powermock.org) - powermock-module-junit4-common (from ) - powermock-reflect (from ) - proto-google-cloud-datastore-v1 (from https://github.com/googleapis/api-client-staging) +- proto-google-cloud-datastore-v1 (from https://github.com/googleapis/api-client-staging) - proton-j (from ) - rank-eval (from https://github.com/elastic/elasticsearch) +- rank-eval (from https://github.com/elastic/elasticsearch) +- rest (from https://github.com/elastic/elasticsearch) - rest (from https://github.com/elastic/elasticsearch) - rest-high-level (from https://github.com/elastic/elasticsearch) +- rest-high-level (from https://github.com/elastic/elasticsearch) - rxjava (from https://github.com/ReactiveX/RxJava) - secure-sm (from https://github.com/elastic/elasticsearch) +- secure-sm (from https://github.com/elastic/elasticsearch) - spring-security-config (from http://spring.io/spring-security) - spring-security-core (from http://spring.io/spring-security) - spring-security-oauth2-client (from http://spring.io/spring-security) @@ -539,6 +590,7 @@ The following software have components provided under the terms of this license: - tomcat-embed-el (from http://tomcat.apache.org/) - tomcat-embed-websocket (from http://tomcat.apache.org/) - x-content (from https://github.com/elastic/elasticsearch) +- x-content (from https://github.com/elastic/elasticsearch) - xml-apis (from ) ======================================================================== @@ -550,8 +602,10 @@ The following software have components provided under the terms of this license: - GAX (Google Api eXtensions) (from https://github.com/googleapis) - GAX (Google Api eXtensions) (from https://github.com/googleapis) - GAX (Google Api eXtensions) (from https://github.com/googleapis) +- GAX (Google Api eXtensions) (from https://github.com/googleapis) - Hamcrest Core (from http://hamcrest.org/) - Lucene Common Analyzers (from ) +- Lucene Common Analyzers (from ) - Lucene Core (from ) - Plexus :: Default Container (from ) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) @@ -577,6 +631,8 @@ The following software have components provided under the terms of this license: - GAX (Google Api eXtensions) (from https://github.com/googleapis) - GAX (Google Api eXtensions) (from https://github.com/googleapis) - GAX (Google Api eXtensions) (from https://github.com/googleapis) +- GAX (Google Api eXtensions) (from https://github.com/googleapis) +- Google APIs Client Library for Java (from ) - Google APIs Client Library for Java (from ) - Google Auth Library for Java - Credentials (from ) - Google Auth Library for Java - OAuth2 HTTP (from ) @@ -585,8 +641,11 @@ The following software have components provided under the terms of this license: - JSch (from http://www.jcraft.com/jsch/) - JavaBeans Activation Framework API jar (from ) - Lucene Common Analyzers (from ) +- Lucene Common Analyzers (from ) +- Lucene Core (from ) - Lucene Core (from ) - Lucene Suggest (from ) +- Lucene Suggest (from ) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) @@ -620,6 +679,7 @@ The following software have components provided under the terms of this license: - Checker Qual (from https://checkerframework.org) - FindBugs-jsr305 (from http://findbugs.sourceforge.net/) +- MongoDB Java Driver Core (from http://www.mongodb.org) ======================================================================== CC-BY-4.0 @@ -734,6 +794,7 @@ The following software have components provided under the terms of this license: - JavaMail API (from ) - Mojo's Maven plugin for Cobertura (from http://mojo.codehaus.org/cobertura-maven-plugin/) - OSGi resource locator (from ) +- RabbitMQ Java Client (from http://www.rabbitmq.com) - Run Level Service (from ) - ServiceLocator Default Implementation (from git://java.net/hk2~git/hk2-locator) - aopalliance-repackaged (from ) @@ -773,6 +834,7 @@ The following software have components provided under the terms of this license: - JavaBeans Activation Framework API jar (from ) - JavaMail API (from ) - OSGi resource locator (from ) +- RabbitMQ Java Client (from http://www.rabbitmq.com) - ServiceLocator Default Implementation (from git://java.net/hk2~git/hk2-locator) - aopalliance-repackaged (from ) - javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250) @@ -799,6 +861,13 @@ The following software have components provided under the terms of this license: - Project Lombok (from https://projectlombok.org) - javax.ws.rs-api (from http://jax-rs-spec.java.net) +======================================================================== +JSON +======================================================================== +The following software have components provided under the terms of this license: + +- JSON in Java (from https://github.com/douglascrockford/JSON-java) + ======================================================================== LGPL-2.1-only ======================================================================== @@ -807,6 +876,7 @@ The following software have components provided under the terms of this license: - Cobertura code coverage (from http://cobertura.sourceforge.net) - Commons Lang (from http://commons.apache.org/lang/) - Elastic JNA Distribution (from https://github.com/java-native-access/jna) +- Elastic JNA Distribution (from https://github.com/java-native-access/jna) - Java Native Access (from https://github.com/java-native-access/jna) - Java Native Access Platform (from https://github.com/java-native-access/jna) - Javassist (from http://www.javassist.org/) @@ -838,6 +908,7 @@ The following software have components provided under the terms of this license: - Apache Log4j API (from ) - Apache Log4j Core (from ) +- RabbitMQ Java Client (from http://www.rabbitmq.com) ======================================================================== MIT @@ -848,6 +919,7 @@ The following software have components provided under the terms of this license: - Animal Sniffer Annotations (from ) - Azure AD Spring Security Integration Spring Boot Starter (from https://github.com/Microsoft/azure-spring-boot) - Azure Java Client Authentication Library for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) +- Azure Java Client Runtime for ARM (from https://github.com/Azure/autorest-clientruntime-for-java) - Azure Java Client Runtime for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) - Azure Metrics Spring Boot Starter (from https://github.com/Microsoft/azure-spring-boot) - Azure Spring Boot AutoConfigure (from https://github.com/Microsoft/azure-spring-boot) @@ -855,12 +927,15 @@ The following software have components provided under the terms of this license: - Bouncy Castle Provider (from http://www.bouncycastle.org/java.html) - Checker Qual (from https://checkerframework.org) - Checker Qual (from https://checkerframework.org) +- Elasticsearch: 5.0.0-alpha5 (from https://github.com/elastic/elasticsearch) - Extensions on Apache Proton-J library (from https://github.com/Azure/qpid-proton-j-extensions) - JOpt Simple (from http://pholser.github.io/jopt-simple) - JUL to SLF4J bridge (from http://www.slf4j.org) - Java Client Runtime for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) - Java JWT (from http://www.jwt.io) - Lucene Core (from ) +- Lucene Core (from ) +- Lucene Sandbox (from ) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) @@ -868,17 +943,20 @@ The following software have components provided under the terms of this license: - Microsoft Azure Java Core Library (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure Netty HTTP Client Library (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure SDK annotations (from https://github.com/Microsoft/java-api-annotations) +- Microsoft Azure SDK for EventGrid Management (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure SDK for SQL API of Azure Cosmos DB Service (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure SDK for Service Bus (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure SDK for eventgrid (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure client library for Blob Storage (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure client library for Identity (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure client library for KeyVault Keys (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure client library for KeyVault Secrets (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure common module for Storage (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure internal Avro module for Storage (from https://github.com/Azure/azure-sdk-for-java) -- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) - Mockito (from http://mockito.org) - Mockito (from http://mockito.org) +- Mockito (from http://www.mockito.org) - Netty/Codec/HTTP (from ) - Netty/Common (from ) - Plexus :: Default Container (from ) @@ -888,6 +966,8 @@ The following software have components provided under the terms of this license: - Spongy Castle (from http://rtyley.github.io/spongycastle/) - Spring Data for Azure Cosmos DB SQL API (from https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos) - adal4j (from https://github.com/AzureAD/azure-activedirectory-library-for-java) +- azure-documentdb (from https://azure.microsoft.com/en-us/services/cosmos-db/) +- documentdb-bulkexecutor (from http://azure.microsoft.com/en-us/services/documentdb/) - micrometer-core (from https://github.com/micrometer-metrics/micrometer) - msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java) - msal4j-persistence-extension (from https://github.com/AzureAD/microsoft-authentication-extensions-for-java) @@ -901,6 +981,7 @@ The following software have components provided under the terms of this license: - Cobertura code coverage (from http://cobertura.sourceforge.net) - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) +- RabbitMQ Java Client (from http://www.rabbitmq.com) ======================================================================== MPL-2.0 @@ -909,6 +990,7 @@ The following software have components provided under the terms of this license: - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) +- RabbitMQ Java Client (from http://www.rabbitmq.com) ======================================================================== PHP-3.01 @@ -982,13 +1064,16 @@ The following software have components provided under the terms of this license: - Joda-Time (from http://www.joda.org/joda-time/) - LatencyUtils (from http://latencyutils.github.io/LatencyUtils/) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) +- Microsoft Azure SDK for EventGrid Management (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure SDK for SQL API of Azure Cosmos DB Service (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure client library for Blob Storage (from https://github.com/Azure/azure-sdk-for-java) - Project Lombok (from https://projectlombok.org) +- RabbitMQ Java Client (from http://www.rabbitmq.com) - Spring Security JWT Library (from http://github.com/spring-projects/spring-security-oauth) - Spring Security JWT Library (from http://github.com/spring-projects/spring-security-oauth) - Spring Web (from https://github.com/spring-projects/spring-framework) - StAX API (from http://stax.codehaus.org/) +- azure-documentdb (from https://azure.microsoft.com/en-us/services/cosmos-db/) - msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java) - reactive-streams (from http://www.reactive-streams.org/) - xml-apis (from ) @@ -1005,6 +1090,7 @@ The following software have components provided under the terms of this license: - Byte Buddy (without dependencies) (from ) - JUnit (from http://junit.org) - JavaBeans Activation Framework API jar (from ) +- RabbitMQ Java Client (from http://www.rabbitmq.com) - Servlet Specification 2.5 API (from ) - Spongy Castle (from http://rtyley.github.io/spongycastle/) - System Rules (from http://stefanbirkner.github.io/system-rules/) diff --git a/devops/azure/chart/templates/deployment.yaml b/devops/azure/chart/templates/deployment.yaml index 6ef26c036f8cb921e6ad534eef37cbc74127934a..20fac08cff7a776c18f4daacf8b23b4815b3ef90 100644 --- a/devops/azure/chart/templates/deployment.yaml +++ b/devops/azure/chart/templates/deployment.yaml @@ -87,6 +87,8 @@ spec: value: osdu-db - name: servicebus_topic_name value: indexing-progress + - name: reindex_topic_name + value: recordstopic - name: entitlements_service_endpoint value: http://entitlements/api/entitlements/v2 - name: entitlements_service_api_key diff --git a/docs/tutorial/IndexerService.md b/docs/tutorial/IndexerService.md index d11f167561fe101c5aa81affb1d7a0eae0b2496a..0873557d9b48c398bdb17e8aeae3b6a6426f1f38 100644 --- a/docs/tutorial/IndexerService.md +++ b/docs/tutorial/IndexerService.md @@ -8,6 +8,7 @@ - [Copy Index <a name="copy-index"></a>](#copy-index) - [Get task status <a name="get-task-status"></a>](#get-task-status) - [Schema Service adoption <a name="schema-service-adoption"></a>](#schema-service-adoption) + - [R3 Schema Support <a name="r3-schema-support"></a>](#r3-schema-support) ##Introduction <a name="introduction"></a> @@ -251,7 +252,7 @@ API will respond with status of task. [Back to table of contents](#TOC) -##Shema Service adoption <a name="schema-service-adoption"></a> +##Schema Service adoption <a name="schema-service-adoption"></a> Indexer service is in adaptation process to use schemas from the Schema service instead of Storage Service. The Indexer Service retrieves a schema from the Schema Service if the schema is not found on the Storage Service. @@ -260,3 +261,38 @@ Later call to the Storage Service will be deprecated and then removed (after the [Back to table of contents](#TOC) +###R3 Schema Support <a name="r3-schema-support"></a> + +Indexer service support r3 schema. These schemas are created via Schema service. + +Here is an example following end-to-end workflow can be exercised (please update the schema based on your environment): + +* Ingest r3 schema for `opendes:wks:master-data--Wellbore:1.0.0`. Schema service payload can be found [here](https://community.opengroup.org/osdu/platform/system/indexer-service/-/blob/master/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.schema.json). + +* Ingest r3 master-data Wellbore record. Storage service payload can be found [here](https://community.opengroup.org/osdu/platform/system/indexer-service/-/blob/master/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.json) + +* Records can be searched via Search service. Here is sample payload: + +``` +POST /api/search/v2/query HTTP/1.1 +Content-Type: application/json +data-partition-id: opendes +{ + "kind": "opendes:wks:master-data--Wellbore:1.0.0", + "spatialFilter": { + "field": "data.SpatialLocation.Wgs84Coordinates", + "byBoundingBox": { + "topLeft": { + "longitude": -100.0, + "latitude": 52.0 + }, + "bottomRight": { + "longitude": 100.0, + "latitude": 0.0 + } + } + } +} +``` +[Back to table of contents](#TOC) + diff --git a/indexer-core/pom.xml b/indexer-core/pom.xml index 3e01109f8b02130cedfbcb1d197b557fa2f9e7e9..49ce44c6ad55653079bcfe146f6561f7b9f5f5f7 100644 --- a/indexer-core/pom.xml +++ b/indexer-core/pom.xml @@ -16,7 +16,7 @@ <properties> <commons-beanutils.version>1.9.4</commons-beanutils.version> - <osdu.oscorecommon.version>0.6.5</osdu.oscorecommon.version> + <osdu.oscorecommon.version>0.6.9</osdu.oscorecommon.version> </properties> <dependencies> diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Feature.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Feature.java new file mode 100644 index 0000000000000000000000000000000000000000..4d03bbe093b622e8fb08fd4659623fcb194feb0a --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Feature.java @@ -0,0 +1,40 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.util.HashMap; +import java.util.Map; + +@Data +public class Feature extends GeoJsonObject { + + @JsonInclude() + private Map<String, Object> properties = new HashMap<>(); + @JsonInclude() + private GeoJsonObject geometry; + private String id; + + public void setProperty(String key, Object value) { + properties.put(key, value); + } + + @SuppressWarnings("unchecked") + public <T> T getProperty(String key) { + return (T) properties.get(key); + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/FeatureCollection.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/FeatureCollection.java new file mode 100644 index 0000000000000000000000000000000000000000..2040e646469ad32cd0dd036f732657f85da7a092 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/FeatureCollection.java @@ -0,0 +1,45 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import lombok.Data; +import org.opengroup.osdu.indexer.model.geojson.jackson.FeatureCollectionSerializer; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +@Data +@JsonSerialize(using = FeatureCollectionSerializer.class) +public class FeatureCollection extends GeoJsonObject implements Iterable<Feature> { + + private List<Feature> features = new ArrayList<Feature>(); + + public FeatureCollection add(Feature feature) { + features.add(feature); + return this; + } + + public void addAll(Collection<Feature> features) { + this.features.addAll(features); + } + + @Override + public Iterator<Feature> iterator() { + return features.iterator(); + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/GeoJsonObject.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/GeoJsonObject.java new file mode 100644 index 0000000000000000000000000000000000000000..2f137a5fbb232400f51bb55ef5de4e40d3fd4909 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/GeoJsonObject.java @@ -0,0 +1,36 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonSubTypes.Type; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; +import lombok.Data; + +@Data +@JsonTypeInfo(property = "type", use = Id.NAME) +@JsonSubTypes({ @Type(Feature.class), @Type(Polygon.class), @Type(MultiPolygon.class), @Type(FeatureCollection.class), + @Type(Point.class), @Type(MultiPoint.class), @Type(MultiLineString.class), @Type(LineString.class), + @Type(GeometryCollection.class) }) +@JsonInclude(Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public abstract class GeoJsonObject implements Serializable { +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Geometry.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Geometry.java new file mode 100644 index 0000000000000000000000000000000000000000..99b0841ac5e9d1319ef7cca9ecd79ceb6928988b --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Geometry.java @@ -0,0 +1,45 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import java.util.ArrayList; +import java.util.List; + +public abstract class Geometry<T> extends GeoJsonObject { + + protected List<T> coordinates = new ArrayList<T>(); + + public Geometry() { + } + + public Geometry(T... elements) { + for (T coordinate : elements) { + coordinates.add(coordinate); + } + } + + public Geometry<T> add(T elements) { + coordinates.add(elements); + return this; + } + + public List<T> getCoordinates() { + return coordinates; + } + + public void setCoordinates(List<T> coordinates) { + this.coordinates = coordinates; + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/GeometryCollection.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/GeometryCollection.java new file mode 100644 index 0000000000000000000000000000000000000000..903ac08186b4dc12eb02b0e4792e5f43c3a934df --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/GeometryCollection.java @@ -0,0 +1,37 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +@Data +public class GeometryCollection extends GeoJsonObject implements Iterable<GeoJsonObject> { + + private List<GeoJsonObject> geometries = new ArrayList<GeoJsonObject>(); + + @Override + public Iterator<GeoJsonObject> iterator() { + return geometries.iterator(); + } + + public GeometryCollection add(GeoJsonObject geometry) { + geometries.add(geometry); + return this; + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/LineString.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/LineString.java new file mode 100644 index 0000000000000000000000000000000000000000..8eee047745dd486fc91ac4287b491525e9572c5e --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/LineString.java @@ -0,0 +1,25 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import lombok.NoArgsConstructor; + +@NoArgsConstructor +public class LineString extends MultiPoint { + + public LineString(Position... points) { + super(points); + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiLineString.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiLineString.java new file mode 100644 index 0000000000000000000000000000000000000000..2e16db6e8ac5d06565cd9af8ccfa2e91da1faca6 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiLineString.java @@ -0,0 +1,27 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import lombok.NoArgsConstructor; + +import java.util.List; + +@NoArgsConstructor +public class MultiLineString extends Geometry<List<Position>> { + + public MultiLineString(List<Position> line) { + add(line); + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiPoint.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiPoint.java new file mode 100644 index 0000000000000000000000000000000000000000..aabbdda84f31e9c4b30c986e6c5b4ae805788c05 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiPoint.java @@ -0,0 +1,25 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import lombok.NoArgsConstructor; + +@NoArgsConstructor +public class MultiPoint extends Geometry<Position> { + + public MultiPoint(Position... points) { + super(points); + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiPolygon.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiPolygon.java new file mode 100644 index 0000000000000000000000000000000000000000..6c9d8af0cd6b7f43d7b0a1b0ff5b7a106856b210 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiPolygon.java @@ -0,0 +1,32 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import lombok.NoArgsConstructor; + +import java.util.List; + +@NoArgsConstructor +public class MultiPolygon extends Geometry<List<List<Position>>> { + + public MultiPolygon(Polygon polygon) { + add(polygon); + } + + public MultiPolygon add(Polygon polygon) { + coordinates.add(polygon.getCoordinates()); + return this; + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Point.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Point.java new file mode 100644 index 0000000000000000000000000000000000000000..9808209aa43e9eec7dd1c974dc5772aa9e7676a3 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Point.java @@ -0,0 +1,35 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class Point extends GeoJsonObject { + + private Position coordinates; + + public Point(double longitude, double latitude) { + coordinates = new Position(longitude, latitude); + } + + public Point(double longitude, double latitude, double altitude) { + coordinates = new Position(longitude, latitude, altitude); + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Polygon.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Polygon.java new file mode 100644 index 0000000000000000000000000000000000000000..31461b421204d45bb9c00dbabd42922a8e9f0c43 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Polygon.java @@ -0,0 +1,73 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.NoArgsConstructor; + +import java.util.Arrays; +import java.util.List; + +@NoArgsConstructor +public class Polygon extends Geometry<List<Position>> { + + public Polygon(List<Position> polygon) { + add(polygon); + } + + public Polygon(Position... polygon) { + add(Arrays.asList(polygon)); + } + + public void setExteriorRing(List<Position> points) { + if (coordinates.isEmpty()) { + coordinates.add(0, points); + } else { + coordinates.set(0, points); + } + } + + @JsonIgnore + public List<Position> getExteriorRing() { + assertExteriorRing(); + return coordinates.get(0); + } + + @JsonIgnore + public List<List<Position>> getInteriorRings() { + assertExteriorRing(); + return coordinates.subList(1, coordinates.size()); + } + + public List<Position> getInteriorRing(int index) { + assertExteriorRing(); + return coordinates.get(1 + index); + } + + public void addInteriorRing(List<Position> points) { + assertExteriorRing(); + coordinates.add(points); + } + + public void addInteriorRing(Position... points) { + assertExteriorRing(); + coordinates.add(Arrays.asList(points)); + } + + private void assertExteriorRing() { + if (coordinates.isEmpty()) + throw new RuntimeException("No exterior ring defined"); + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Position.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Position.java new file mode 100644 index 0000000000000000000000000000000000000000..fa124ee189a132ee0056dc05e8a2ce1bd970adfd --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Position.java @@ -0,0 +1,70 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import org.opengroup.osdu.indexer.model.geojson.jackson.PositionDeserializer; +import org.opengroup.osdu.indexer.model.geojson.jackson.PositionSerializer; + +import java.io.Serializable; + +@Getter +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +@AllArgsConstructor +@JsonDeserialize(using = PositionDeserializer.class) +@JsonSerialize(using = PositionSerializer.class) +public class Position implements Serializable { + + private double longitude; + private double latitude; + @JsonIgnore + private double altitude = Double.NaN; + + public Position(double longitude, double latitude) { + this.setLongitude(longitude); + this.setLatitude(latitude); + } + + public void setLongitude(double longitude) { + if (Double.isNaN(longitude)) + throw new IllegalArgumentException("latitude must be number"); + if (longitude > 180 || longitude < -180) + throw new IllegalArgumentException("'longitude' value is out of the range [-180, 180]"); + this.longitude = longitude; + } + + public void setLatitude(double latitude) { + if (Double.isNaN(latitude)) + throw new IllegalArgumentException("latitude must be number"); + if (latitude > 90 || latitude < -90) + throw new IllegalArgumentException("latitude value is out of the range [-90, 90]"); + this.latitude = latitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public boolean hasAltitude() { + return !Double.isNaN(altitude); + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/FeatureCollectionSerializer.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/FeatureCollectionSerializer.java new file mode 100644 index 0000000000000000000000000000000000000000..f5d412a042655bcabed7e0840c61e5f4d8785d7c --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/FeatureCollectionSerializer.java @@ -0,0 +1,81 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson.jackson; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.jsontype.TypeSerializer; +import lombok.Data; +import org.opengroup.osdu.indexer.model.geojson.*; + +import java.io.IOException; + +@Data +public class FeatureCollectionSerializer extends JsonSerializer<FeatureCollection> { + + @Override + public void serialize(FeatureCollection value, JsonGenerator jsonGenerator, SerializerProvider provider) throws IOException { + jsonGenerator.writeStartObject(); + jsonGenerator.writeStringField("type", "geometrycollection"); + + jsonGenerator.writeArrayFieldStart("geometries"); + for (Feature feature : value.getFeatures()) { + jsonGenerator.writeStartObject(); + if (feature.getGeometry() instanceof GeometryCollection) { + GeometryCollection geometryCollection = (GeometryCollection) feature.getGeometry(); + for (GeoJsonObject shape : geometryCollection.getGeometries()) { + serializeGeoShape(shape, jsonGenerator); + } + } else { + serializeGeoShape(feature.getGeometry(), jsonGenerator); + } + jsonGenerator.writeEndObject(); + } + jsonGenerator.writeEndArray(); + + jsonGenerator.writeEndObject(); + } + + @Override + public void serializeWithType(FeatureCollection value, JsonGenerator jsonGenerator, SerializerProvider provider, TypeSerializer typeSerializer) + throws IOException, JsonProcessingException { + + serialize(value, jsonGenerator, provider); + } + + private void serializeGeoShape(GeoJsonObject geoJsonObject, JsonGenerator jsonGenerator) throws IOException { + if (geoJsonObject instanceof Point) { + jsonGenerator.writeStringField("type", "point"); + jsonGenerator.writeObjectField("coordinates", ((Point) geoJsonObject).getCoordinates()); + } else if (geoJsonObject instanceof LineString) { + jsonGenerator.writeStringField("type", "linestring"); + jsonGenerator.writeObjectField("coordinates", ((LineString) geoJsonObject).getCoordinates()); + } else if (geoJsonObject instanceof Polygon) { + jsonGenerator.writeStringField("type", "polygon"); + jsonGenerator.writeObjectField("coordinates", ((Polygon) geoJsonObject).getCoordinates()); + } else if (geoJsonObject instanceof MultiPoint) { + jsonGenerator.writeStringField("type", "multipoint"); + jsonGenerator.writeObjectField("coordinates", ((MultiPoint) geoJsonObject).getCoordinates()); + } else if (geoJsonObject instanceof MultiLineString) { + jsonGenerator.writeStringField("type", "multilinestring"); + jsonGenerator.writeObjectField("coordinates", ((MultiLineString) geoJsonObject).getCoordinates()); + } else if (geoJsonObject instanceof MultiPolygon) { + jsonGenerator.writeStringField("type", "multipolygon"); + jsonGenerator.writeObjectField("coordinates", ((MultiPolygon) geoJsonObject).getCoordinates()); + } + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/PositionDeserializer.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/PositionDeserializer.java new file mode 100644 index 0000000000000000000000000000000000000000..5c721c2e3a3042956f4b46972e85a07620d3ba76 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/PositionDeserializer.java @@ -0,0 +1,67 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson.jackson; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import org.opengroup.osdu.indexer.model.geojson.Position; + +import java.io.IOException; + +public class PositionDeserializer extends JsonDeserializer<Position> { + + @Override + public Position deserialize(JsonParser jsonParser, DeserializationContext context) throws IOException { + if (jsonParser.isExpectedStartArrayToken()) { + return deserializeArray(jsonParser, context); + } + throw context.mappingException(Position.class); + } + + protected Position deserializeArray(JsonParser jsonParser, DeserializationContext context) throws IOException { + Position node = new Position(); + node.setLongitude(extractDouble(jsonParser, context, false)); + node.setLatitude(extractDouble(jsonParser, context, false)); + node.setAltitude(extractDouble(jsonParser, context, true)); + return node; + } + + private double extractDouble(JsonParser jsonParser, DeserializationContext context, boolean optional) throws IOException { + JsonToken token = jsonParser.nextToken(); + if (token == null) { + if (optional) + return Double.NaN; + else + throw context.mappingException("Unexpected end-of-input when binding data into Position"); + } else { + switch (token) { + case END_ARRAY: + if (optional) + return Double.NaN; + else + throw context.mappingException("Unexpected end-of-input when binding data into Position"); + case VALUE_NUMBER_FLOAT: + return jsonParser.getDoubleValue(); + case VALUE_NUMBER_INT: + return jsonParser.getLongValue(); + default: + throw context.mappingException( + "Unexpected token (" + token.name() + ") when binding data into Position"); + } + } + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/PositionSerializer.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/PositionSerializer.java new file mode 100644 index 0000000000000000000000000000000000000000..09275a25866265a802665217c2718f15967c6379 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/PositionSerializer.java @@ -0,0 +1,36 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.model.geojson.jackson; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import org.opengroup.osdu.indexer.model.geojson.Position; + +import java.io.IOException; + +public class PositionSerializer extends JsonSerializer<Position> { + + @Override + public void serialize(Position value, JsonGenerator jsonGenerator, SerializerProvider provider) throws IOException { + jsonGenerator.writeStartArray(); + jsonGenerator.writeNumber(value.getLongitude()); + jsonGenerator.writeNumber(value.getLatitude()); + if (value.hasAltitude()) { + jsonGenerator.writeNumber(value.getAltitude()); + } + jsonGenerator.writeEndArray(); + } +} diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessor.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessor.java index d98b1f77281138a9c3de3304350da461cda9ac08..f58605545479e2b686959a43033fcd146e20b2f0 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessor.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessor.java @@ -13,6 +13,7 @@ // limitations under the License. package org.opengroup.osdu.indexer.schema.converter; + import org.apache.http.HttpStatus; import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; import org.opengroup.osdu.core.common.model.http.AppException; @@ -78,12 +79,16 @@ public class PropertiesProcessor { String definitionSubRef = ref.substring(DEF_PREFIX.length()); - if (schemaConverterConfig.getSkippedDefinitions().contains(definitionSubRef)) { + String definitionIdentity = getDefinitionIdentity(definitionSubRef); + + if (schemaConverterConfig.getSkippedDefinitions().contains(definitionIdentity)) { return Stream.empty(); } - if (Objects.nonNull(schemaConverterConfig.getSpecialDefinitionsMap().get(definitionSubRef))) { - return storageSchemaEntry(schemaConverterConfig.getSpecialDefinitionsMap().get(definitionSubRef), pathPrefix); + if (Objects.nonNull(schemaConverterConfig.getSpecialDefinitionsMap().get(definitionIdentity))) { + return storageSchemaEntry( + schemaConverterConfig.getSpecialDefinitionsMap().get(definitionIdentity) + getDefinitionColonVersion(definitionSubRef), + pathPrefix); } Definition definition = definitions.getDefinition(definitionSubRef); @@ -101,6 +106,30 @@ public class PropertiesProcessor { return processProperties(definition.getProperties()); } + private String getDefinitionIdentity(String definitionSubRef) { + String[] components = definitionSubRef.split(":"); + switch (components.length) { + case 1: + return components[0]; + case 4: + return components[2]; + } + throw new AppException(HttpStatus.SC_CONFLICT, "Wrong definition format:" + definitionSubRef, + "Wrong definition format:" + definitionSubRef); + } + + private String getDefinitionColonVersion(String definitionSubRef) { + String[] components = definitionSubRef.split(":"); + switch (components.length) { + case 1: + return ":1.0.0"; + case 4: + return ":" + components[3]; + } + throw new AppException(HttpStatus.SC_CONFLICT, "Wrong definition format:" + definitionSubRef, + "Wrong definition format:" + definitionSubRef); + } + private Stream<Map<String, Object>> processOfItems(List<AllOfItem> allOf, List<AllOfItem> anyOf, List<AllOfItem> oneOf) { Stream<Map<String, Object>> ofItems = null; @@ -119,7 +148,7 @@ public class PropertiesProcessor { return ofItems; } - public Stream<Map<String, Object>> processProperties(Map<String, TypeProperty> properties){ + public Stream<Map<String, Object>> processProperties(Map<String, TypeProperty> properties) { return properties.entrySet().stream().flatMap(this::processPropertyEntry); } @@ -175,7 +204,7 @@ public class PropertiesProcessor { PropertiesProcessor propertiesProcessor = new PropertiesProcessor(definitions, pathPrefixWithDot + entry.getKey() , log, new SchemaConverterPropertiesConfig()); - ofItems = Stream.concat(Optional.ofNullable(ofItems).orElseGet(Stream::empty), + ofItems = Stream.concat(Optional.ofNullable(ofItems).orElseGet(Stream::empty), entry.getValue().getAnyOf().stream().flatMap(propertiesProcessor::processItem)); } @@ -207,7 +236,7 @@ public class PropertiesProcessor { getFromPattern(definitionProperty.getPattern()), getFromItemsPattern(() -> definitionProperty.getItems() != null ? definitionProperty.getItems().getPattern() : null), getFromFormat(definitionProperty::getFormat), - getFromItemsType (() -> definitionProperty.getItems() != null ? definitionProperty.getItems().getType() : null)) + getFromItemsType(() -> definitionProperty.getItems() != null ? definitionProperty.getItems().getType() : null)) .filter(x -> x.get() != null) .findFirst() .orElse(getFromType(definitionProperty::getType)).get(); @@ -219,20 +248,20 @@ public class PropertiesProcessor { private Supplier<String> getFromItemsPattern(Supplier<String> itemsPatternSupplier) { return () -> { - String itemsPattern = itemsPatternSupplier.get(); - return Objects.nonNull(itemsPattern) && itemsPattern.startsWith(LINK_PREFIX) ? LINK_TYPE : null; - }; + String itemsPattern = itemsPatternSupplier.get(); + return Objects.nonNull(itemsPattern) && itemsPattern.startsWith(LINK_PREFIX) ? LINK_TYPE : null; + }; } private Supplier<String> getFromType(Supplier<String> typeSupplier) { - return () -> { + return () -> { String type = typeSupplier.get(); return schemaConverterConfig.getPrimitiveTypesMap().getOrDefault(type, type); }; } - private Supplier<String> getFromFormat(Supplier<String> formatSupplier){ - return () -> { + private Supplier<String> getFromFormat(Supplier<String> formatSupplier) { + return () -> { String format = formatSupplier.get(); return Objects.nonNull(format) ? schemaConverterConfig.getPrimitiveTypesMap().getOrDefault(format, format) : null; }; diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/config/SchemaConverterPropertiesConfig.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/config/SchemaConverterPropertiesConfig.java index 163664f5f04b0c7ee0b03f4fb4113eddee038235..9e5eaff440b905d9bce2db41eff1f69f555e4469 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/config/SchemaConverterPropertiesConfig.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/config/SchemaConverterPropertiesConfig.java @@ -19,7 +19,7 @@ public class SchemaConverterPropertiesConfig implements SchemaConverterConfig { private Map<String, String> primitiveTypesMap = getDefaultPrimitiveTypesMap(); private Set<String> getDefaultSkippedDefinitions() { - return new HashSet<>(Arrays.asList("AbstractAnyCrsFeatureCollection.1.0.0", + return new HashSet<>(Arrays.asList("AbstractAnyCrsFeatureCollection", "anyCrsGeoJsonFeatureCollection")); } @@ -30,9 +30,9 @@ public class SchemaConverterPropertiesConfig implements SchemaConverterConfig { private Map<String, String> getDefaultSpecialDefinitionsMap() { Map<String, String> defaultSpecialDefinitions = new HashMap<>(); - defaultSpecialDefinitions.put("AbstractFeatureCollection.1.0.0", "core:dl:geoshape:1.0.0"); - defaultSpecialDefinitions.put("core_dl_geopoint", "core:dl:geopoint:1.0.0"); - defaultSpecialDefinitions.put("geoJsonFeatureCollection", "core:dl:geoshape:1.0.0"); + defaultSpecialDefinitions.put("AbstractFeatureCollection", "core:dl:geoshape"); + defaultSpecialDefinitions.put("core_dl_geopoint", "core:dl:geopoint"); + defaultSpecialDefinitions.put("geoJsonFeatureCollection", "core:dl:geoshape"); return defaultSpecialDefinitions; } diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/readme.md b/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/readme.md index 3b5e146c5760cd3084651a612fae228d5a80c035..4c39a276469a7a3b43d7c4caf2d78d940fb70a42 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/readme.md +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/readme.md @@ -5,7 +5,7 @@ Purpose ------- The purpose of this document is to describe schema conversion from the -Schema Service format to the Storage Service format. +Schema Service formats to the Storage Service format. Storage Service schema has the following JSON format ---------------------------------------------------- @@ -81,7 +81,7 @@ included "data": { "allOf": [ { - "$ref": "#/definitions/AbstractFacility.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractFacility.1.0.0" }, { "type": "object", @@ -109,7 +109,7 @@ For instance, ```json "elevationReference": { - "$ref": "#/definitions/simpleElevationReference", + "$ref": "#/definitions/opendes:wks:simpleElevationReference:1.0.0", "description": "…", "title": "Elevation Reference", "type": "object" @@ -119,7 +119,7 @@ For instance, "description": "...", "properties": { "elevationFromMsl": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "…", "example": 123.45, "title": "Elevation from MSL", @@ -157,10 +157,18 @@ Not all data are converted to the storage service schema format: 1. Definitions -Ignored definition(-s) are not included into Storage Service schema: +Definitions must follow the pattern a:b:name:version, where a,b,name are required and version is optional. +For instance + +```json +opendes:wks:AbstractAnyCrsFeatureCollection:1.0.0 +opendes:wks:anyJsonFeatureCollection:1.0.0 +``` + +Ignored definition(-s) name(-s) are not included into Storage Service schema: ```json -AbstractAnyCrsFeatureCollection.1.0.0 +AbstractAnyCrsFeatureCollection anyCrsGeoJsonFeatureCollection ``` @@ -168,7 +176,7 @@ Following definitions are not unwrapped and kind is determined according to the following types conversions: ```json -AbstractFeatureCollection.1.0.0 -> core:dl:geoshape:1.0.0 +AbstractFeatureCollection:version -> core:dl:geoshape:version geoJsonFeatureCollection -> core:dl:geoshape:1.0.0 core_dl_geopoint -> core:dl:geopoint:1.0.0 ``` @@ -179,7 +187,7 @@ for instance "Wgs84Coordinates": { "title": "WGS 84 Coordinates", "description": "…", - "$ref": "#/definitions/AbstractFeatureCollection.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractFeatureCollection.1.0.0" } ``` @@ -261,7 +269,7 @@ Examples "description": "The history of operator organizations of the facility.", "type": "array", "items": { - "$ref": "#/definitions/AbstractFacilityOperator.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractFacilityOperator.1.0.0" } } diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/AttributeParsingServiceImpl.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/AttributeParsingServiceImpl.java index fae0b4e6f31cd18ad960b841b6d9723e0162cf29..733408ab3257219f75899e1e57b6a491abad08d2 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/AttributeParsingServiceImpl.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/AttributeParsingServiceImpl.java @@ -25,6 +25,7 @@ import org.opengroup.osdu.core.common.model.indexer.IndexSchema; import org.opengroup.osdu.core.common.model.indexer.IndexingStatus; import org.opengroup.osdu.core.common.model.indexer.JobStatus; import org.opengroup.osdu.core.common.Constants; +import org.opengroup.osdu.indexer.model.geojson.FeatureCollection; import org.opengroup.osdu.indexer.util.parser.BooleanParser; import org.opengroup.osdu.indexer.util.parser.DateTimeParser; import org.opengroup.osdu.indexer.util.parser.GeoShapeParser; @@ -185,7 +186,7 @@ public class AttributeParsingServiceImpl implements IAttributeParsingService { dataMap.put(DATA_GEOJSON_TAG, geometry); } } catch (JsonSyntaxException | IllegalArgumentException e) { - String parsingError = String.format("geopoint parsing error: %s attribute: %s | value: %s", e.getMessage(), attributeName, attributeVal); + String parsingError = String.format("geo-point parsing error: %s attribute: %s | value: %s", e.getMessage(), attributeName, attributeVal); jobStatus.addOrUpdateRecordStatus(recordId, IndexingStatus.WARN, HttpStatus.SC_BAD_REQUEST, parsingError, String.format("record-id: %s | %s", recordId, parsingError)); } } @@ -199,9 +200,9 @@ public class AttributeParsingServiceImpl implements IAttributeParsingService { if (geoJsonMap == null || geoJsonMap.isEmpty()) return; - this.geoShapeParser.parseGeoJson(geoJsonMap); + Map<String, Object> parsedShape = this.geoShapeParser.parseGeoJson(geoJsonMap); - dataMap.put(attributeName, geoJsonMap); + dataMap.put(attributeName, parsedShape); } catch (JsonSyntaxException | IllegalArgumentException e) { String parsingError = String.format("geo-json shape parsing error: %s attribute: %s", e.getMessage(), attributeName); jobStatus.addOrUpdateRecordStatus(recordId, IndexingStatus.WARN, HttpStatus.SC_BAD_REQUEST, parsingError, String.format("record-id: %s | %s", recordId, parsingError)); diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/util/parser/GeoShapeParser.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/util/parser/GeoShapeParser.java index 9532e498b0e1fee048c163f34baa953d702e6ace..8bd6ec834dd72dc399c9ea7b65a4772a771d959c 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/util/parser/GeoShapeParser.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/util/parser/GeoShapeParser.java @@ -14,55 +14,36 @@ package org.opengroup.osdu.indexer.util.parser; -import org.elasticsearch.ElasticsearchParseException; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.geo.builders.ShapeBuilder; -import org.elasticsearch.common.geo.parsers.ShapeParser; -import org.elasticsearch.common.xcontent.DeprecationHandler; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.locationtech.spatial4j.exception.InvalidShapeException; -import org.locationtech.spatial4j.shape.Shape; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.exc.InvalidTypeIdException; import org.opengroup.osdu.core.common.search.Preconditions; +import org.opengroup.osdu.indexer.model.geojson.FeatureCollection; import org.springframework.stereotype.Component; import org.springframework.web.context.annotation.RequestScope; -import java.io.IOException; import java.util.Map; @Component @RequestScope public class GeoShapeParser { - public String parseGeoJson(Map<String, Object> geoShapeObject) { + private ObjectMapper mapper = new ObjectMapper(); - Preconditions.checkNotNull(geoShapeObject, "geoShapeObject cannot be null"); + public Map<String, Object> parseGeoJson(Map<String, Object> objectMap) { - try { - // use elasticsearch's ShapeParser to validate shape - ShapeBuilder shapeBuilder = getShapeBuilderFromObject(geoShapeObject); - Shape shape = shapeBuilder.buildS4J(); - if (shape == null) { - throw new IllegalArgumentException("unable to parse shape"); - } + Preconditions.checkNotNull(objectMap, "geoShapeObject cannot be null"); + if (objectMap.isEmpty()) throw new IllegalArgumentException("shape not included"); - return shapeBuilder.toString().replaceAll("\\r", "").replaceAll("\\n", ""); - } catch (ElasticsearchParseException | InvalidShapeException | IOException e) { - throw new IllegalArgumentException(e.getMessage(), e); + try { + FeatureCollection collection = mapper.readValue(mapper.writeValueAsString(objectMap), FeatureCollection.class); + return mapper.readValue(mapper.writeValueAsString(collection), new TypeReference<Map<String, Object>>() { + }); + } catch (InvalidTypeIdException e) { + throw new IllegalArgumentException("must be a valid FeatureCollection"); + } catch (JsonProcessingException e) { + throw new IllegalArgumentException("unable to parse FeatureCollection"); } } - - private ShapeBuilder getShapeBuilderFromObject(Map<String, Object> object) throws IOException { - XContentBuilder contentBuilder = JsonXContent.contentBuilder().value(object); - - XContentParser parser = JsonXContent.jsonXContent.createParser( - NamedXContentRegistry.EMPTY, DeprecationHandler.THROW_UNSUPPORTED_OPERATION, - BytesReference.bytes(contentBuilder).streamInput() - ); - - parser.nextToken(); - return ShapeParser.parse(parser); - } } \ No newline at end of file diff --git a/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessorTest.java b/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessorTest.java index 600af3b43e448a1ac1c9603cf4007a546e333e4c..182bc58d33e4a1f1c491b805c6d1c1fe1dca9eed 100644 --- a/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessorTest.java +++ b/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessorTest.java @@ -48,7 +48,7 @@ public class PropertiesProcessorTest { JaxRsDpsLog log = Mockito.mock(JaxRsDpsLog.class); assertFalse(new PropertiesProcessor(null, log, new SchemaConverterPropertiesConfig()) - .processRef(DEFINITIONS_PREFIX + "anyCrsGeoJsonFeatureCollection").findAny().isPresent()); + .processRef(DEFINITIONS_PREFIX + "a:b:anyCrsGeoJsonFeatureCollection:1.0.0").findAny().isPresent()); } @Test @@ -56,7 +56,7 @@ public class PropertiesProcessorTest { JaxRsDpsLog log = Mockito.mock(JaxRsDpsLog.class); String res = new PropertiesProcessor(null, PATH, log, new SchemaConverterPropertiesConfig()) - .processRef(DEFINITIONS_PREFIX + "core_dl_geopoint").map(Object::toString).reduce("", String::concat); + .processRef(DEFINITIONS_PREFIX + "a:b:core_dl_geopoint:1.0.0").map(Object::toString).reduce("", String::concat); assertEquals("{path=" + PATH + ", kind=core:dl:geopoint:1.0.0}", res); } @@ -76,7 +76,7 @@ public class PropertiesProcessorTest { definition.setProperties(properties); - String defName = "defName"; + String defName = "a:b:defName:1.0.0"; definitions.add(defName, definition); String res = new PropertiesProcessor(definitions, PATH, log, new SchemaConverterPropertiesConfig()) diff --git a/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/SchemaToStorageFormatImplTest.java b/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/SchemaToStorageFormatImplTest.java index 07642442dc178ce37cf934fdfbdbf7a0d044171e..e9ad441db9e9dd44c18ec2b5b99b5c3791db5461 100644 --- a/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/SchemaToStorageFormatImplTest.java +++ b/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/SchemaToStorageFormatImplTest.java @@ -49,6 +49,11 @@ public class SchemaToStorageFormatImplTest { = new SchemaToStorageFormatImpl(objectMapper, jaxRsDpsLog , new SchemaConverterPropertiesConfig()); + @Test + public void dotsDefinitionFormat() { + testSingleFile("/converter/new-definitions-format/colons-sample.json", "osdu:osdu:Wellbore:1.0.0"); + } + @Test public void firstSchemaPassed() { testSingleFile("/converter/basic/schema.json", "osdu:osdu:Wellbore:1.0.0"); diff --git a/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/AttributeParsingServiceImplTest.java b/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/AttributeParsingServiceImplTest.java index 5db76eb05d6eaffa535320fe4603b83191e40d26..67362f02c6c74f2768e825a0f8063d4d9409ee4d 100644 --- a/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/AttributeParsingServiceImplTest.java +++ b/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/AttributeParsingServiceImplTest.java @@ -321,7 +321,7 @@ public class AttributeParsingServiceImplTest { Map<String, Object> storageData = new HashMap<>(); storageData.put("location", parseJson(shapeJson)); - when(this.geoShapeParser.parseGeoJson(storageData)).thenReturn(""); + when(this.geoShapeParser.parseGeoJson(storageData)).thenReturn(new HashMap<>()); Map<String, Object> dataMap = new HashMap<>(); diff --git a/indexer-core/src/test/java/org/opengroup/osdu/indexer/util/parser/GeoShapeParserTest.java b/indexer-core/src/test/java/org/opengroup/osdu/indexer/util/parser/GeoShapeParserTest.java index 8c1d36fe9b88461af9c8c16e4b2b83d2246c47b4..2e34f70c96326430f91e867ef4894cf9d9e90bfb 100644 --- a/indexer-core/src/test/java/org/opengroup/osdu/indexer/util/parser/GeoShapeParserTest.java +++ b/indexer-core/src/test/java/org/opengroup/osdu/indexer/util/parser/GeoShapeParserTest.java @@ -29,8 +29,7 @@ import java.util.Map; import java.util.function.Function; import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.junit.Assert.*; @RunWith(SpringRunner.class) public class GeoShapeParserTest { @@ -45,124 +44,129 @@ public class GeoShapeParserTest { public void should_throwException_provided_emptyGeoJson() { String shapeJson = "{}"; - this.validateInput(this.sut::parseGeoJson, shapeJson, "shape type not included"); + this.validateInput(this.sut::parseGeoJson, shapeJson, "shape not included"); } @Test public void should_throwException_parseInvalidPoint() { - String shapeJson = "{\"type\":\"Point\",\"coordinates\":[-205.01621,39.57422]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[-205.01621,39.57422]}}]}"; - this.validateInput(this.sut::parseGeoJson, shapeJson, "Bad X value -205.01621 is not in boundary Rect(minX=-180.0,maxX=180.0,minY=-90.0,maxY=90.0)"); + this.validateInput(this.sut::parseGeoJson, shapeJson, "unable to parse FeatureCollection"); } @Test public void should_throwException_parseInvalidPoint_NaN() { - String shapeJson = "{\"type\":\"Point\",\"coordinates\":[-205.01621,NaN]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[-205.01621,NaN]}}]}"; - this.validateInput(this.sut::parseGeoJson, shapeJson, "geo coordinates must be numbers"); + this.validateInput(this.sut::parseGeoJson, shapeJson, "unable to parse FeatureCollection"); } @Test public void should_throwException_parseInvalidPoint_missingLatitude() { - String shapeJson = "{\"type\":\"Point\",\"coordinates\":[-205.01621,\"\"]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[-105.01621]}}]}"; - this.validateInput(this.sut::parseGeoJson, shapeJson, "geo coordinates must be numbers"); + this.validateInput(this.sut::parseGeoJson, shapeJson, "unable to parse FeatureCollection"); } @Test public void should_throwException_missingMandatoryAttribute() { - String shapeJson = "{\"mistype\":\"Point\",\"coordinates\":[-205.01621,39.57422]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"mistype\":\"Point\",\"coordinates\":[-205.01621,39.57422]}}]}"; - this.validateInput(this.sut::parseGeoJson, shapeJson, "shape type not included"); + this.validateInput(this.sut::parseGeoJson, shapeJson, "must be a valid FeatureCollection"); } @Test public void should_throwException_parseInvalidShape() { - String shapeJson = "{\"type\":\"InvalidShape\",\"coordinates\":[-105.01621,39.57422]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"InvalidShape\",\"coordinates\":[-105.01621,39.57422]}}]}"; - this.validateInput(this.sut::parseGeoJson, shapeJson, "unknown geo_shape [InvalidShape]"); + this.validateInput(this.sut::parseGeoJson, shapeJson, "must be a valid FeatureCollection"); } @Test public void should_parseValidPoint() { - String shapeJson = "{\"type\":\"Point\",\"coordinates\":[-105.01621,39.57422]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[-105.01621,39.57422]}}]}"; this.validateInput(this.sut::parseGeoJson, shapeJson, Strings.EMPTY); } @Test public void should_parseValidMultiPoint() { - String shapeJson = "{\"type\":\"MultiPoint\",\"coordinates\":[[-105.01621,39.57422],[-80.666513,35.053994]]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPoint\",\"coordinates\":[[-105.01621,39.57422],[-80.666513,35.053994]]}}]}"; this.validateInput(this.sut::parseGeoJson, shapeJson, Strings.EMPTY); } @Test public void should_parseValidLineString() { - String shapeJson = "{\"type\":\"LineString\",\"coordinates\":[[-101.744384,39.32155],[-101.552124,39.330048],[-101.403808,39.330048],[-101.332397,39.364032],[-101.041259,39.368279],[-100.975341,39.304549],[-100.914916,39.245016],[-100.843505,39.164141],[-100.805053,39.104488],[-100.491943,39.100226],[-100.437011,39.095962],[-100.338134,39.095962],[-100.195312,39.027718],[-100.008544,39.010647],[-99.865722,39.00211],[-99.684448,38.972221],[-99.51416,38.929502],[-99.382324,38.920955],[-99.321899,38.895308],[-99.113159,38.869651],[-99.0802,38.85682],[-98.822021,38.85682],[-98.448486,38.848264],[-98.206787,38.848264],[-98.020019,38.878204],[-97.635498,38.873928]]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[-101.744384,39.32155],[-101.552124,39.330048],[-101.403808,39.330048],[-101.332397,39.364032],[-101.041259,39.368279],[-100.975341,39.304549],[-100.914916,39.245016],[-100.843505,39.164141],[-100.805053,39.104488],[-100.491943,39.100226],[-100.437011,39.095962],[-100.338134,39.095962],[-100.195312,39.027718],[-100.008544,39.010647],[-99.865722,39.00211],[-99.684448,38.972221],[-99.51416,38.929502],[-99.382324,38.920955],[-99.321899,38.895308],[-99.113159,38.869651],[-99.0802,38.85682],[-98.822021,38.85682],[-98.448486,38.848264],[-98.206787,38.848264],[-98.020019,38.878204],[-97.635498,38.873928]]}}]}"; this.validateInput(this.sut::parseGeoJson, shapeJson, Strings.EMPTY); } @Test public void should_parseValidMultiLineString() { - String shapeJson = "{\"type\":\"MultiLineString\",\"coordinates\":[[[-105.021443,39.578057],[-105.021507,39.577809],[-105.021572,39.577495],[-105.021572,39.577164],[-105.021572,39.577032],[-105.021529,39.576784]],[[-105.019898,39.574997],[-105.019598,39.574898],[-105.019061,39.574782]],[[-105.017173,39.574402],[-105.01698,39.574385],[-105.016636,39.574385],[-105.016508,39.574402],[-105.01595,39.57427]],[[-105.014276,39.573972],[-105.014126,39.574038],[-105.013825,39.57417],[-105.01331,39.574452]]]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiLineString\",\"coordinates\":[[[-105.021443,39.578057],[-105.021507,39.577809],[-105.021572,39.577495],[-105.021572,39.577164],[-105.021572,39.577032],[-105.021529,39.576784]],[[-105.019898,39.574997],[-105.019598,39.574898],[-105.019061,39.574782]],[[-105.017173,39.574402],[-105.01698,39.574385],[-105.016636,39.574385],[-105.016508,39.574402],[-105.01595,39.57427]],[[-105.014276,39.573972],[-105.014126,39.574038],[-105.013825,39.57417],[-105.01331,39.574452]]]}}]}"; this.validateInput(this.sut::parseGeoJson, shapeJson, Strings.EMPTY); } @Test public void should_parseValidPolygon() { - String shapeJson = "{\"type\":\"Polygon\",\"coordinates\":[[[100,0],[101,0],[101,1],[100,1],[100,0]]]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[100,0],[101,0],[101,1],[100,1],[100,0]]]}}]}"; this.validateInput(this.sut::parseGeoJson, shapeJson, Strings.EMPTY); } @Test public void should_throwException_parseInvalidPolygon_malformedLatitude() { - String shapeJson = "{\"type\":\"Polygon\",\"coordinates\":[[[100,\"afgg\"],[101,0],[101,1],[100,1],[100,0]]]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[100,\"afgg\"],[101,0],[101,1],[100,1],[100,0]]]}}]}"; - this.validateInput(this.sut::parseGeoJson, shapeJson, "geo coordinates must be numbers"); + this.validateInput(this.sut::parseGeoJson, shapeJson, "unable to parse FeatureCollection"); } @Test public void should_parseValidMultiPolygon() { - String shapeJson = "{\"type\":\"MultiPolygon\",\"coordinates\":[[[[107,7],[108,7],[108,8],[107,8],[107,7]]],[[[100,0],[101,0],[101,1],[100,1],[100,0]]]]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPolygon\",\"coordinates\":[[[[107,7],[108,7],[108,8],[107,8],[107,7]]],[[[100,0],[101,0],[101,1],[100,1],[100,0]]]]}}]}"; this.validateInput(this.sut::parseGeoJson, shapeJson, Strings.EMPTY); } @Test public void should_parseValidGeometryCollection() { - String shapeJson = "{\"type\":\"GeometryCollection\",\"geometries\":[{\"type\":\"Point\",\"coordinates\":[-80.660805,35.049392]},{\"type\":\"Polygon\",\"coordinates\":[[[-80.664582,35.044965],[-80.663874,35.04428],[-80.662586,35.04558],[-80.663444,35.046036],[-80.664582,35.044965]]]},{\"type\":\"LineString\",\"coordinates\":[[-80.662372,35.059509],[-80.662693,35.059263],[-80.662844,35.05893],[-80.66308,35.058332],[-80.663595,35.057753],[-80.663874,35.057401],[-80.66441,35.057033],[-80.664861,35.056787],[-80.665419,35.056506],[-80.665633,35.056312],[-80.666019,35.055891],[-80.666191,35.055452],[-80.666191,35.055171],[-80.666255,35.05489],[-80.666213,35.054222],[-80.666213,35.053924],[-80.665955,35.052905],[-80.665698,35.052044],[-80.665504,35.051482],[-80.665762,35.050481],[-80.66617,35.049725],[-80.666513,35.049286],[-80.666921,35.048531],[-80.667006,35.048215],[-80.667071,35.047775],[-80.667049,35.047389],[-80.666964,35.046985],[-80.666813,35.046353],[-80.666599,35.045966],[-80.666406,35.045615],[-80.665998,35.045193],[-80.665526,35.044877],[-80.664989,35.044543],[-80.664496,35.044174],[-80.663852,35.043876],[-80.663037,35.043717]]}]}"; + String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"GeometryCollection\",\"geometries\":[{\"type\":\"Point\",\"coordinates\":[-80.660805,35.049392]},{\"type\":\"Polygon\",\"coordinates\":[[[-80.664582,35.044965],[-80.663874,35.04428],[-80.662586,35.04558],[-80.663444,35.046036],[-80.664582,35.044965]]]},{\"type\":\"LineString\",\"coordinates\":[[-80.662372,35.059509],[-80.662693,35.059263],[-80.662844,35.05893],[-80.66308,35.058332],[-80.663595,35.057753],[-80.663874,35.057401],[-80.66441,35.057033],[-80.664861,35.056787],[-80.665419,35.056506],[-80.665633,35.056312],[-80.666019,35.055891],[-80.666191,35.055452],[-80.666191,35.055171],[-80.666255,35.05489],[-80.666213,35.054222],[-80.666213,35.053924],[-80.665955,35.052905],[-80.665698,35.052044],[-80.665504,35.051482],[-80.665762,35.050481],[-80.66617,35.049725],[-80.666513,35.049286],[-80.666921,35.048531],[-80.667006,35.048215],[-80.667071,35.047775],[-80.667049,35.047389],[-80.666964,35.046985],[-80.666813,35.046353],[-80.666599,35.045966],[-80.666406,35.045615],[-80.665998,35.045193],[-80.665526,35.044877],[-80.664989,35.044543],[-80.664496,35.044174],[-80.663852,35.043876],[-80.663037,35.043717]]}]}}]}"; this.validateInput(this.sut::parseGeoJson, shapeJson, Strings.EMPTY); } @Test - public void should_throwException_parseUnsupportedType_featureCollection() { + public void should_parseValidFeatureCollection() { String shapeJson = "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[1.9496737127045984,58.41415669686543],[1.8237672363511042,58.42946998193435],[1.8422735102001124,58.471472136376455],[1.9683241046247606,58.45614207250076],[1.9496737127045984,58.41415669686543]]]}}]}"; - this.validateInput(this.sut::parseGeoJson, shapeJson, "unknown geo_shape [FeatureCollection]"); + this.validateInput(this.sut::parseGeoJson, shapeJson, Strings.EMPTY); } @Test public void should_throwException_parseUnsupportedType_feature() { String shapeJson = "{\"type\":\"Feature\",\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-80.724878,35.265454],[-80.722646,35.260338],[-80.720329,35.260618],[-80.718698,35.260267],[-80.715093,35.260548],[-80.71681,35.255361],[-80.710887,35.255361],[-80.703248,35.265033],[-80.704793,35.268397],[-80.70857,35.268257],[-80.712518,35.270359],[-80.715179,35.267696],[-80.721359,35.267276],[-80.724878,35.265454]]]},\"properties\":{\"name\":\"Plaza Road Park\"}}"; - this.validateInput(this.sut::parseGeoJson, shapeJson, "unknown geo_shape [Feature]"); + this.validateInput(this.sut::parseGeoJson, shapeJson, "must be a valid FeatureCollection"); } - private void validateInput(Function<Map<String, Object>, String> parser, String shapeJson, String errorMessage) { + private void validateInput(Function<Map<String, Object>, Map<String, Object>> parser, String shapeJson, String errorMessage) { try { Type type = new TypeToken<Map<String, Object>>() {}.getType(); Map<String, Object> shapeObj = new Gson().fromJson(shapeJson, type); - String parsedShape = parser.apply(shapeObj); + Map<String, Object> parsedShape = parser.apply(shapeObj); assertNotNull(parsedShape); + assertTrue(Strings.isNullOrEmpty(errorMessage)); } catch (IllegalArgumentException e) { - assertThat(String.format("Incorrect error message for geo-json parsing [ %s ]", shapeJson), - e.getMessage(), containsString(errorMessage)); + if (Strings.isNullOrEmpty(errorMessage)) { + fail(String.format("error parsing valid geo-json %s", shapeJson)); + } else { + assertThat(String.format("Incorrect error message for geo-json parsing [ %s ]", shapeJson), + e.getMessage(), containsString(errorMessage)); + } } } } diff --git a/indexer-core/src/test/resources/converter/basic/schema.json b/indexer-core/src/test/resources/converter/basic/schema.json index 1c406a9e329acc9dca6c6e7f08088c52ab0f2195..67f2aae7b4c712c16d53b656eff0984ad822410e 100644 --- a/indexer-core/src/test/resources/converter/basic/schema.json +++ b/indexer-core/src/test/resources/converter/basic/schema.json @@ -39,14 +39,14 @@ "ancestry": { "description": "The links to data, which constitute the inputs.", "title": "Ancestry", - "$ref": "#/definitions/AbstractLegalParentList.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractLegalParentList:1.0.0" }, "meta": { "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", "title": "Frame of Reference Meta Data", "type": "array", "items": { - "$ref": "#/definitions/AbstractMetaItem.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractMetaItem:1.0.0" } }, "source": { @@ -63,7 +63,7 @@ "data": { "allOf": [ { - "$ref": "#/definitions/AbstractFacility.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractFacility:1.0.0" }, { "type": "object", @@ -80,14 +80,14 @@ "description": "List of all depths and elevations pertaining to the wellbore, like, plug back measured depth, total measured depth, KB elevation", "type": "array", "items": { - "$ref": "#/definitions/AbstractFacilityVerticalMeasurement.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractFacilityVerticalMeasurement:1.0.0" } }, "DrillingReason": { "description": "The history of drilling reasons of the wellbore.", "type": "array", "items": { - "$ref": "#/definitions/AbstractWellboreDrillingReason.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractWellboreDrillingReason:1.0.0" } }, "KickOffWellbore": { @@ -121,11 +121,11 @@ }, "ProjectedBottomHoleLocation": { "description": "Projected location at total depth.", - "$ref": "#/definitions/AbstractSpatialLocation.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractSpatialLocation:1.0.0" }, "GeographicBottomHoleLocation": { "description": "Geographic location at total depth.", - "$ref": "#/definitions/AbstractSpatialLocation.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractSpatialLocation:1.0.0" } } }, @@ -149,7 +149,7 @@ ], "additionalProperties": false, "definitions": { - "AbstractAccessControlList.1.0.0": { + "opendes:wks:AbstractAccessControlList:1.0.0": { "title": "Access Control List", "description": "The access control tags associated with this entity. This structure is included by the SystemProperties \"acl\", which is part of all OSDU records. Not extensible.", "type": "object", @@ -179,7 +179,7 @@ ], "additionalProperties": false }, - "AbstractLegalTags.1.0.0": { + "opendes:wks:AbstractLegalTags:1.0.0": { "title": "Legal Meta Data", "description": "Legal meta data like legal tags, relevant other countries, legal status. This structure is included by the SystemProperties \"legal\", which is part of all OSDU records. Not extensible.", "type": "object", @@ -214,7 +214,7 @@ ], "additionalProperties": false }, - "AbstractLegalParentList.1.0.0": { + "opendes:wks:AbstractLegalParentList:1.0.0": { "title": "Parent List", "description": "A list of entity IDs in the data ecosystem, which act as legal parents to the current entity. This structure is included by the SystemProperties \"ancestry\", which is part of all OSDU records. Not extensible.", "type": "object", @@ -231,7 +231,7 @@ }, "additionalProperties": false }, - "AbstractMetaItem.1.0.0": { + "opendes:wks:AbstractMetaItem:1.0.0": { "title": "Frame of Reference Meta Data Item", "description": "A meta data item, which allows the association of named properties or property values to a Unit/Measurement/CRS/Azimuth/Time context.", "oneOf": [ @@ -404,7 +404,7 @@ } ] }, - "AbstractFacilityOperator.1.0.0": { + "opendes:wks:AbstractFacilityOperator:1.0.0": { "title": "AbstractFacilityOperator", "description": "The organisation that was responsible for a facility at some point in time.", "type": "object", @@ -426,7 +426,7 @@ } } }, - "AbstractAnyCrsFeatureCollection.1.0.0": { + "opendes:wks:AbstractAnyCrsFeatureCollection:1.0.0": { "title": "AbstractAnyCrsFeatureCollection", "description": "A schema like GeoJSON FeatureCollection with a non-WGS 84 CRS context; based on https://geojson.org/schema/FeatureCollection.json. Attention: the coordinate order is fixed: Longitude/Easting/Westing/X first, followed by Latitude/Northing/Southing/Y, optionally height as third coordinate.", "type": "object", @@ -979,7 +979,7 @@ } } }, - "AbstractFeatureCollection.1.0.0": { + "opendes:wks:AbstractFeatureCollection:1.0.0": { "description": "GeoJSON feature collection as originally published in https://geojson.org/schema/FeatureCollection.json. Attention: the coordinate order is fixed: Longitude first, followed by Latitude, optionally height above MSL (EPSG:5714) as third coordinate.", "title": "GeoJSON FeatureCollection", "type": "object", @@ -1499,7 +1499,7 @@ } } }, - "AbstractSpatialLocation.1.0.0": { + "opendes:wks:AbstractSpatialLocation:1.0.0": { "title": "AbstractSpatialLocation", "description": "A geographic object which can be described by a set of points.", "type": "object", @@ -1538,13 +1538,13 @@ "AsIngestedCoordinates": { "title": "As Ingested Coordinates", "description": "The original or 'as ingested' coordinates (Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon). The name 'AsIngestedCoordinates' was chosen to contrast it to 'OriginalCoordinates', which carries the uncertainty whether any coordinate operations took place before ingestion. In cases where the original CRS is different from the as-ingested CRS, the OperationsApplied can also contain the list of operations applied to the coordinate prior to ingestion. The data structure is similar to GeoJSON FeatureCollection, however in a CRS context explicitly defined within the AbstractAnyCrsFeatureCollection. The coordinate sequence follows GeoJSON standard, i.e. 'eastward/longitude', 'northward/latitude' {, 'upward/height' unless overridden by an explicit direction in the AsIngestedCoordinates.VerticalCoordinateReferenceSystemID}.", - "$ref": "#/definitions/AbstractAnyCrsFeatureCollection.1.0.0", + "$ref": "#/definitions/opendes:wks:AbstractAnyCrsFeatureCollection:1.0.0", "x-osdu-frame-of-reference": "CRS:" }, "Wgs84Coordinates": { "title": "WGS 84 Coordinates", "description": "The normalized coordinates (Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon) based on WGS 84 (EPSG:4326 for 2-dimensional coordinates, EPSG:4326 + EPSG:5714 (MSL) for 3-dimensional coordinates). This derived coordinate representation is intended for global discoverability only. The schema of this substructure is identical to the GeoJSON FeatureCollection https://geojson.org/schema/FeatureCollection.json. The coordinate sequence follows GeoJSON standard, i.e. longitude, latitude {, height}", - "$ref": "#/definitions/AbstractFeatureCollection.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractFeatureCollection:1.0.0" }, "OperationsApplied": { "title": "Operations Applied", @@ -1570,7 +1570,7 @@ } } }, - "AbstractGeoPoliticalContext.1.0.0": { + "opendes:wks:AbstractGeoPoliticalContext:1.0.0": { "title": "AbstractGeoPoliticalContext", "description": "A single, typed geo-political entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", "type": "object", @@ -1587,7 +1587,7 @@ } } }, - "AbstractGeoBasinContext.1.0.0": { + "opendes:wks:AbstractGeoBasinContext:1.0.0": { "title": "AbstractGeoBasinContext", "description": "A single, typed basin entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", "type": "object", @@ -1604,7 +1604,7 @@ } } }, - "AbstractGeoFieldContext.1.0.0": { + "opendes:wks:AbstractGeoFieldContext:1.0.0": { "title": "AbstractGeoFieldContext", "description": "A single, typed field entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", "type": "object", @@ -1620,7 +1620,7 @@ } } }, - "AbstractGeoPlayContext.1.0.0": { + "opendes:wks:AbstractGeoPlayContext:1.0.0": { "title": "AbstractGeoPlayContext", "description": "A single, typed Play entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", "type": "object", @@ -1637,7 +1637,7 @@ } } }, - "AbstractGeoProspectContext.1.0.0": { + "opendes:wks:AbstractGeoProspectContext:1.0.0": { "title": "AbstractGeoProspectContext", "description": "A single, typed Prospect entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", "type": "object", @@ -1654,28 +1654,28 @@ } } }, - "AbstractGeoContext.1.0.0": { + "opendes:wks:AbstractGeoContext:1.0.0": { "title": "AbstractGeoContext", "description": "A geographic context to an entity. It can be either a reference to a GeoPoliticalEntity, Basin, Field, Play or Prospect.", "oneOf": [ { - "$ref": "#/definitions/AbstractGeoPoliticalContext.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractGeoPoliticalContext:1.0.0" }, { - "$ref": "#/definitions/AbstractGeoBasinContext.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractGeoBasinContext:1.0.0" }, { - "$ref": "#/definitions/AbstractGeoFieldContext.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractGeoFieldContext:1.0.0" }, { - "$ref": "#/definitions/AbstractGeoPlayContext.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractGeoPlayContext:1.0.0" }, { - "$ref": "#/definitions/AbstractGeoProspectContext.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractGeoProspectContext:1.0.0" } ] }, - "AbstractAliasNames.1.0.0": { + "opendes:wks:AbstractAliasNames:1.0.0": { "title": "AbstractAliasNames", "description": "A list of alternative names for an object. The preferred name is in a separate, scalar property. It may or may not be repeated in the alias list, though a best practice is to include it if the list is present, but to omit the list if there are no other names. Note that the abstract entity is an array so the $ref to it is a simple property reference.", "type": "object", @@ -1706,7 +1706,7 @@ } } }, - "AbstractFacilityState.1.0.0": { + "opendes:wks:AbstractFacilityState:1.0.0": { "title": "AbstractFacilityState", "description": "The life cycle status of a facility at some point in time.", "type": "object", @@ -1728,7 +1728,7 @@ } } }, - "AbstractFacilityEvent.1.0.0": { + "opendes:wks:AbstractFacilityEvent:1.0.0": { "title": "AbstractFacilityEvent", "description": "A significant occurrence in the life of a facility, which often changes its state, or the state of one of its components.", "type": "object", @@ -1750,7 +1750,7 @@ } } }, - "AbstractFacilitySpecification.1.0.0": { + "opendes:wks:AbstractFacilitySpecification:1.0.0": { "title": "AbstractFacilitySpecification", "description": "A property, characteristic, or attribute about a facility that is not described explicitly elsewhere.", "type": "object", @@ -1795,7 +1795,7 @@ } } }, - "AbstractFacility.1.0.0": { + "opendes:wks:AbstractFacility:1.0.0": { "title": "AbstractFacility", "description": "", "type": "object", @@ -1813,7 +1813,7 @@ "description": "The history of operator organizations of the facility.", "type": "array", "items": { - "$ref": "#/definitions/AbstractFacilityOperator.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractFacilityOperator:1.0.0" } }, "DataSourceOrganisationID": { @@ -1825,14 +1825,14 @@ "description": "The spatial location information such as coordinates,CRS information.", "type": "array", "items": { - "$ref": "#/definitions/AbstractSpatialLocation.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractSpatialLocation:1.0.0" } }, "GeoContexts": { "description": "List of geographic entities which provide context to the facility. This may include multiple types or multiple values of the same type.", "type": "array", "items": { - "$ref": "#/definitions/AbstractGeoContext.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractGeoContext:1.0.0" } }, "OperatingEnvironmentID": { @@ -1848,33 +1848,33 @@ "description": "Alternative names, including historical, by which this facility is/has been known.", "type": "array", "items": { - "$ref": "#/definitions/AbstractAliasNames.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractAliasNames:1.0.0" } }, "FacilityState": { "description": "The history of life cycle states the facility has been through.", "type": "array", "items": { - "$ref": "#/definitions/AbstractFacilityState.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractFacilityState:1.0.0" } }, "FacilityEvent": { "description": "A list of key facility events.", "type": "array", "items": { - "$ref": "#/definitions/AbstractFacilityEvent.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractFacilityEvent:1.0.0" } }, "FacilitySpecification": { "description": "facilitySpecification maintains the specification like slot name, wellbore drilling permit number, rig name etc.", "type": "array", "items": { - "$ref": "#/definitions/AbstractFacilitySpecification.1.0.0" + "$ref": "#/definitions/opendes:wks:AbstractFacilitySpecification:1.0.0" } } } }, - "AbstractFacilityVerticalMeasurement.1.0.0": { + "opendes:wks:AbstractFacilityVerticalMeasurement:1.0.0": { "title": "AbstractFacilityVerticalMeasurement", "description": "A location along a wellbore, _usually_ associated with some aspect of the drilling of the wellbore, but not with any intersecting _subsurface_ natural surfaces.", "type": "object", @@ -1938,7 +1938,7 @@ } } }, - "AbstractWellboreDrillingReason.1.0.0": { + "opendes:wks:AbstractWellboreDrillingReason:1.0.0": { "title": "AbstractWellboreDrillingReason", "description": "Purpose for drilling a wellbore, which often is an indication of the level of risk.", "type": "object", diff --git a/indexer-core/src/test/resources/converter/integration-tests/index_records_1.schema b/indexer-core/src/test/resources/converter/integration-tests/index_records_1.schema index 779d2d20921f97aa86bed06943358d76c3d5f71f..59cdd5a655bd522173f94e016cee9af421942fb5 100644 --- a/indexer-core/src/test/resources/converter/integration-tests/index_records_1.schema +++ b/indexer-core/src/test/resources/converter/integration-tests/index_records_1.schema @@ -9,7 +9,7 @@ "type": "string" }, "Location": { - "$ref": "#/definitions/core_dl_geopoint", + "$ref": "#/definitions/opendes:wks:core_dl_geopoint:1.0.0", "description": "The wellbore's position .", "format": "core:dl:geopoint:1.0.0", "title": "WGS 84 Position", diff --git a/indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema b/indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema index cf5f858c3e9b8b04b9bca08c1b834de2b784bf6a..6e923af9614be3b8ee991f161d934db68b8fe31a 100644 --- a/indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema +++ b/indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema @@ -9,7 +9,7 @@ "type": "string" }, "Location": { - "$ref": "#/definitions/core_dl_geopoint", + "$ref": "#/definitions/opendes:wks:core_dl_geopoint:1.0.0", "description": "The wellbore's position .", "format": "core:dl:geopoint:1.0.0", "title": "WGS 84 Position", diff --git a/indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema b/indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema index 802d4493804948ecd9b896af700cbfaa8f00939d..07c410a27fb31190ea48d35fe2086ca4988bc553 100644 --- a/indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema +++ b/indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema @@ -6,7 +6,7 @@ "type": "object", "properties": { "GeoShape": { - "$ref": "#/definitions/geoJsonFeatureCollection", + "$ref": "#/definitions/opendes:wks:geoJsonFeatureCollection:1.0.0", "description": "The wellbore's position .", "format": "core:dl:geopoint:1.0.0", "title": "WGS 84 Position", diff --git a/indexer-core/src/test/resources/converter/new-definitions-format/colons-sample.json b/indexer-core/src/test/resources/converter/new-definitions-format/colons-sample.json new file mode 100644 index 0000000000000000000000000000000000000000..b35fc4d30b923bcd373c78c1214b48bf7b21898f --- /dev/null +++ b/indexer-core/src/test/resources/converter/new-definitions-format/colons-sample.json @@ -0,0 +1,1999 @@ +{ + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:master-data--Test:1.0.0", + "description": "Enter a meaningful description for Test.", + "title": "Test", + "type": "object", + "x-osdu-review-status": "Pending", + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "definitions": { + "opendes:wks:AbstractGeoPoliticalContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoPoliticalContext:1.0.0", + "description": "A single, typed geo-political entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "x-osdu-review-status": "Accepted", + "title": "AbstractGeoPoliticalContext", + "type": "object", + "properties": { + "GeoPoliticalEntityID": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-GeoPoliticalEntity:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Reference to GeoPoliticalEntity.", + "x-osdu-relationship": [ + { + "EntityType": "GeoPoliticalEntity", + "GroupType": "master-data" + } + ], + "type": "string" + }, + "GeoTypeID": { + "x-osdu-is-derived": { + "RelationshipPropertyName": "GeoPoliticalEntityID", + "TargetPropertyName": "GeoPoliticalEntityTypeID" + }, + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-GeoPoliticalEntityType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The GeoPoliticalEntityType reference of the GeoPoliticalEntity (via GeoPoliticalEntityID) for application convenience.", + "x-osdu-relationship": [ + { + "EntityType": "GeoPoliticalEntityType", + "GroupType": "reference-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoPoliticalContext.1.0.0.json" + }, + "opendes:wks:AbstractCommonResources:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractCommonResources:1.0.0", + "description": "Common resources to be injected at root 'data' level for every entity, which is persistable in Storage. The insertion is performed by the OsduSchemaComposer script.", + "title": "OSDU Common Resources", + "type": "object", + "properties": { + "ResourceHomeRegionID": { + "x-osdu-relationship": [ + { + "EntityType": "OSDURegion", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-OSDURegion:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The name of the home [cloud environment] region for this OSDU resource object.", + "title": "Resource Home Region ID", + "type": "string" + }, + "ResourceHostRegionIDs": { + "description": "The name of the host [cloud environment] region(s) for this OSDU resource object.", + "title": "Resource Host Region ID", + "type": "array", + "items": { + "x-osdu-relationship": [ + { + "EntityType": "OSDURegion", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-OSDURegion:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "type": "string" + } + }, + "ResourceLifecycleStatus": { + "x-osdu-relationship": [ + { + "EntityType": "ResourceLifecycleStatus", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ResourceLifecycleStatus:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Describes the current Resource Lifecycle status.", + "title": "Resource Lifecycle Status", + "type": "string" + }, + "ResourceSecurityClassification": { + "x-osdu-relationship": [ + { + "EntityType": "ResourceSecurityClassification", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ResourceSecurityClassification:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Classifies the security level of the resource.", + "title": "Resource Security Classification", + "type": "string" + }, + "ResourceCurationStatus": { + "x-osdu-relationship": [ + { + "EntityType": "ResourceCurationStatus", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ResourceCurationStatus:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Describes the current Curation status.", + "title": "Resource Curation Status", + "type": "string" + }, + "ExistenceKind": { + "x-osdu-relationship": [ + { + "EntityType": "ExistenceKind", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ExistenceKind:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Where does this data resource sit in the cradle-to-grave span of its existence?", + "title": "Existence Kind", + "type": "string" + }, + "Source": { + "description": "The entity that produced the record, or from which it is received; could be an organization, agency, system, internal team, or individual. For informational purposes only, the list of sources is not governed.", + "title": "Data Source", + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractCommonResources.1.0.0.json" + }, + "opendes:wks:AbstractAliasNames:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractAliasNames:1.0.0", + "description": "A list of alternative names for an object. The preferred name is in a separate, scalar property. It may or may not be repeated in the alias list, though a best practice is to include it if the list is present, but to omit the list if there are no other names. Note that the abstract entity is an array so the $ref to it is a simple property reference.", + "x-osdu-review-status": "Accepted", + "title": "AbstractAliasNames", + "type": "object", + "properties": { + "AliasNameTypeID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-AliasNameType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "A classification of alias names such as by role played or type of source, such as regulatory name, regulatory code, company code, international standard name, etc.", + "x-osdu-relationship": [ + { + "EntityType": "AliasNameType", + "GroupType": "reference-data" + } + ], + "type": "string" + }, + "EffectiveDateTime": { + "format": "date-time", + "type": "string", + "description": "The date and time when an alias name becomes effective." + }, + "AliasName": { + "type": "string", + "description": "Alternative Name value of defined name type for an object." + }, + "TerminationDateTime": { + "format": "date-time", + "type": "string", + "description": "The data and time when an alias name is no longer in effect." + }, + "DefinitionOrganisationID": { + "pattern": "^[\\w\\-\\.]+:(reference-data\\-\\-StandardsOrganisation|master-data\\-\\-Organisation):[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The StandardsOrganisation (reference-data) or Organisation (master-data) that provided the name (the source).", + "x-osdu-relationship": [ + { + "EntityType": "StandardsOrganisation", + "GroupType": "reference-data" + }, + { + "EntityType": "Organisation", + "GroupType": "master-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractAliasNames.1.0.0.json" + }, + "opendes:wks:AbstractAnyCrsFeatureCollection:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractAnyCrsFeatureCollection:1.0.0", + "description": "A schema like GeoJSON FeatureCollection with a non-WGS 84 CRS context; based on https://geojson.org/schema/FeatureCollection.json. Attention: the coordinate order is fixed: Longitude/Easting/Westing/X first, followed by Latitude/Northing/Southing/Y, optionally height as third coordinate.", + "title": "AbstractAnyCrsFeatureCollection", + "type": "object", + "required": [ + "type", + "persistableReferenceCrs", + "features" + ], + "properties": { + "CoordinateReferenceSystemID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The CRS reference into the CoordinateReferenceSystem catalog.", + "x-osdu-relationship": [ + { + "EntityType": "CoordinateReferenceSystem", + "GroupType": "reference-data" + } + ], + "title": "Coordinate Reference System ID", + "type": "string", + "example": "namespace:reference-data--CoordinateReferenceSystem:BoundCRS.SLB.32021.15851:" + }, + "persistableReferenceCrs": { + "description": "The CRS reference as persistableReference string. If populated, the CoordinateReferenceSystemID takes precedence.", + "type": "string", + "title": "CRS Reference", + "example": "{\"lateBoundCRS\":{\"wkt\":\"PROJCS[\\\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Lambert_Conformal_Conic\\\"],PARAMETER[\\\"False_Easting\\\",2000000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-100.5],PARAMETER[\\\"Standard_Parallel_1\\\",46.1833333333333],PARAMETER[\\\"Standard_Parallel_2\\\",47.4833333333333],PARAMETER[\\\"Latitude_Of_Origin\\\",45.6666666666667],UNIT[\\\"Foot_US\\\",0.304800609601219],AUTHORITY[\\\"EPSG\\\",32021]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32021\"},\"type\":\"LBC\"},\"singleCT\":{\"wkt\":\"GEOGTRAN[\\\"NAD_1927_To_WGS_1984_79_CONUS\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"NADCON\\\"],PARAMETER[\\\"Dataset_conus\\\",0.0],AUTHORITY[\\\"EPSG\\\",15851]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_To_WGS_1984_79_CONUS\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"15851\"},\"type\":\"ST\"},\"ver\":\"PE_10_3_1\",\"name\":\"NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]\",\"authCode\":{\"auth\":\"SLB\",\"code\":\"32021079\"},\"type\":\"EBC\"}" + }, + "features": { + "type": "array", + "items": { + "title": "AnyCrsGeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "AnyCrsGeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "AnyCrsGeometryCollection" + ] + }, + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "AnyCrsGeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsFeature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "persistableReferenceUnitZ": { + "description": "The unit of measure for the Z-axis (only for 3-dimensional coordinates, where the CRS does not describe the vertical unit). Note that the direction is upwards positive, i.e. Z means height.", + "type": "string", + "title": "Z-Unit Reference", + "example": "{\"scaleOffset\":{\"scale\":1.0,\"offset\":0.0},\"symbol\":\"m\",\"baseMeasurement\":{\"ancestry\":\"Length\",\"type\":\"UM\"},\"type\":\"USO\"}" + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "persistableReferenceVerticalCrs": { + "description": "The VerticalCRS reference as persistableReference string. If populated, the VerticalCoordinateReferenceSystemID takes precedence. The property is null or empty for 2D geometries. For 3D geometries and absent or null persistableReferenceVerticalCrs the vertical CRS is either provided via persistableReferenceCrs's CompoundCRS or it is implicitly defined as EPSG:5714 MSL height.", + "type": "string", + "title": "Vertical CRS Reference", + "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"5773\"},\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"name\":\"EGM96_Geoid\",\"wkt\":\"VERTCS[\\\"EGM96_Geoid\\\",VDATUM[\\\"EGM96_Geoid\\\"],PARAMETER[\\\"Vertical_Shift\\\",0.0],PARAMETER[\\\"Direction\\\",1.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",5773]]\"}" + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsFeatureCollection" + ] + }, + "VerticalCoordinateReferenceSystemID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The explicit VerticalCRS reference into the CoordinateReferenceSystem catalog. This property stays empty for 2D geometries. Absent or empty values for 3D geometries mean the context may be provided by a CompoundCRS in 'CoordinateReferenceSystemID' or implicitly EPSG:5714 MSL height", + "x-osdu-relationship": [ + { + "EntityType": "CoordinateReferenceSystem", + "GroupType": "reference-data" + } + ], + "title": "Vertical Coordinate Reference System ID", + "type": "string", + "example": "namespace:reference-data--CoordinateReferenceSystem:VerticalCRS.EPSG.5773:" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractAnyCrsFeatureCollection:1.0.0.json" + }, + "opendes:wks:AbstractMetaItem:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "oneOf": [ + { + "title": "FrameOfReferenceUOM", + "type": "object", + "properties": { + "persistableReference": { + "description": "The self-contained, persistable reference string uniquely identifying the Unit.", + "title": "UOM Persistable Reference", + "type": "string", + "example": "{\"abcd\":{\"a\":0.0,\"b\":1200.0,\"c\":3937.0,\"d\":0.0},\"symbol\":\"ft[US]\",\"baseMeasurement\":{\"ancestry\":\"L\",\"type\":\"UM\"},\"type\":\"UAD\"}" + }, + "kind": { + "const": "Unit", + "description": "The kind of reference, 'Unit' for FrameOfReferenceUOM.", + "title": "UOM Reference Kind" + }, + "propertyNames": { + "description": "The list of property names, to which this meta data item provides Unit context to. Data structures, which come in a single frame of reference, can register the property name, others require a full path like \"Data.StructureA.PropertyB\" to define a unique context.", + "title": "UOM Property Names", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "HorizontalDeflection.EastWest", + "HorizontalDeflection.NorthSouth" + ] + }, + "name": { + "description": "The unit symbol or name of the unit.", + "title": "UOM Unit Symbol", + "type": "string", + "example": "ft[US]" + }, + "unitOfMeasureID": { + "x-osdu-relationship": [ + { + "EntityType": "UnitOfMeasure", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "SRN to unit of measure reference.", + "type": "string", + "example": "namespace:reference-data--UnitOfMeasure:ftUS:" + } + }, + "required": [ + "kind", + "persistableReference" + ] + }, + { + "title": "FrameOfReferenceCRS", + "type": "object", + "properties": { + "coordinateReferenceSystemID": { + "x-osdu-relationship": [ + { + "EntityType": "CoordinateReferenceSystem", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "SRN to CRS reference.", + "type": "string", + "example": "namespace:reference-data--CoordinateReferenceSystem:EPSG.32615:" + }, + "persistableReference": { + "description": "The self-contained, persistable reference string uniquely identifying the CRS.", + "title": "CRS Persistable Reference", + "type": "string", + "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32615\"},\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"name\":\"WGS_1984_UTM_Zone_15N\",\"wkt\":\"PROJCS[\\\"WGS_1984_UTM_Zone_15N\\\",GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Transverse_Mercator\\\"],PARAMETER[\\\"False_Easting\\\",500000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-93.0],PARAMETER[\\\"Scale_Factor\\\",0.9996],PARAMETER[\\\"Latitude_Of_Origin\\\",0.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",32615]]\"}" + }, + "kind": { + "const": "CRS", + "description": "The kind of reference, constant 'CRS' for FrameOfReferenceCRS.", + "title": "CRS Reference Kind" + }, + "propertyNames": { + "description": "The list of property names, to which this meta data item provides CRS context to. Data structures, which come in a single frame of reference, can register the property name, others require a full path like \"Data.StructureA.PropertyB\" to define a unique context.", + "title": "CRS Property Names", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "KickOffPosition.X", + "KickOffPosition.Y" + ] + }, + "name": { + "description": "The name of the CRS.", + "title": "CRS Name", + "type": "string", + "example": "NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]" + } + }, + "required": [ + "kind", + "persistableReference" + ] + }, + { + "title": "FrameOfReferenceDateTime", + "type": "object", + "properties": { + "persistableReference": { + "description": "The self-contained, persistable reference string uniquely identifying DateTime reference.", + "title": "DateTime Persistable Reference", + "type": "string", + "example": "{\"format\":\"yyyy-MM-ddTHH:mm:ssZ\",\"timeZone\":\"UTC\",\"type\":\"DTM\"}" + }, + "kind": { + "const": "DateTime", + "description": "The kind of reference, constant 'DateTime', for FrameOfReferenceDateTime.", + "title": "DateTime Reference Kind" + }, + "propertyNames": { + "description": "The list of property names, to which this meta data item provides DateTime context to. Data structures, which come in a single frame of reference, can register the property name, others require a full path like \"Data.StructureA.PropertyB\" to define a unique context.", + "title": "DateTime Property Names", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Acquisition.StartTime", + "Acquisition.EndTime" + ] + }, + "name": { + "description": "The name of the DateTime format and reference.", + "title": "DateTime Name", + "type": "string", + "example": "UTC" + } + }, + "required": [ + "kind", + "persistableReference" + ] + }, + { + "title": "FrameOfReferenceAzimuthReference", + "type": "object", + "properties": { + "persistableReference": { + "description": "The self-contained, persistable reference string uniquely identifying AzimuthReference.", + "title": "AzimuthReference Persistable Reference", + "type": "string", + "example": "{\"code\":\"TrueNorth\",\"type\":\"AZR\"}" + }, + "kind": { + "const": "AzimuthReference", + "description": "The kind of reference, constant 'AzimuthReference', for FrameOfReferenceAzimuthReference.", + "title": "AzimuthReference Reference Kind" + }, + "propertyNames": { + "description": "The list of property names, to which this meta data item provides AzimuthReference context to. Data structures, which come in a single frame of reference, can register the property name, others require a full path like \"Data.StructureA.PropertyB\" to define a unique context.", + "title": "AzimuthReference Property Names", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Bearing" + ] + }, + "name": { + "description": "The name of the CRS or the symbol/name of the unit.", + "title": "AzimuthReference Name", + "type": "string", + "example": "TrueNorth" + } + }, + "required": [ + "kind", + "persistableReference" + ] + } + ], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractMetaItem:1.0.0", + "description": "A meta data item, which allows the association of named properties or property values to a Unit/Measurement/CRS/Azimuth/Time context.", + "title": "Frame of Reference Meta Data Item", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractMetaItem.1.0.0.json" + }, + "opendes:wks:AbstractGeoContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "oneOf": [ + { + "$ref": "#/definitions/opendes:wks:AbstractGeoPoliticalContext:1.0.0" + }, + { + "$ref": "#/definitions/opendes:wks:AbstractGeoBasinContext:1.0.0" + }, + { + "$ref": "#/definitions/opendes:wks:AbstractGeoFieldContext:1.0.0" + }, + { + "$ref": "#/definitions/opendes:wks:AbstractGeoPlayContext:1.0.0" + }, + { + "$ref": "#/definitions/opendes:wks:AbstractGeoProspectContext:1.0.0" + } + ], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoContext:1.0.0", + "description": "A geographic context to an entity. It can be either a reference to a GeoPoliticalEntity, Basin, Field, Play or Prospect.", + "title": "AbstractGeoContext", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoContext.1.0.0.json" + }, + "opendes:wks:AbstractLegalTags:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractLegalTags:1.0.0", + "description": "Legal meta data like legal tags, relevant other countries, legal status. This structure is included by the SystemProperties \"legal\", which is part of all OSDU records. Not extensible.", + "additionalProperties": false, + "title": "Legal Meta Data", + "type": "object", + "properties": { + "legaltags": { + "description": "The list of legal tags, which resolve to legal properties (like country of origin, export classification code, etc.) and rules with the help of the Compliance Service.", + "title": "Legal Tags", + "type": "array", + "items": { + "type": "string" + } + }, + "otherRelevantDataCountries": { + "description": "The list of other relevant data countries as an array of two-letter country codes, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2.", + "title": "Other Relevant Data Countries", + "type": "array", + "items": { + "pattern": "^[A-Z]{2}$", + "type": "string" + } + }, + "status": { + "pattern": "^(compliant|uncompliant)$", + "description": "The legal status. Set by the system after evaluation against the compliance rules associated with the \"legaltags\" using the Compliance Service.", + "title": "Legal Status", + "type": "string" + } + }, + "required": [ + "legaltags", + "otherRelevantDataCountries" + ], + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractLegalTags.1.0.0.json" + }, + "opendes:wks:AbstractGeoBasinContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoBasinContext:1.0.0", + "description": "A single, typed basin entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "x-osdu-review-status": "Accepted", + "title": "AbstractGeoBasinContext", + "type": "object", + "properties": { + "BasinID": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Basin:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Reference to Basin.", + "x-osdu-relationship": [ + { + "EntityType": "Basin", + "GroupType": "master-data" + } + ], + "type": "string" + }, + "GeoTypeID": { + "x-osdu-is-derived": { + "RelationshipPropertyName": "BasinID", + "TargetPropertyName": "BasinTypeID" + }, + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-BasinType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The BasinType reference of the Basin (via BasinID) for application convenience.", + "x-osdu-relationship": [ + { + "EntityType": "BasinType", + "GroupType": "reference-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoBasinContext.1.0.0.json" + }, + "opendes:wks:AbstractMaster:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractMaster:1.0.0", + "description": "Properties shared with all master-data schema instances.", + "x-osdu-review-status": "Accepted", + "title": "Abstract Master", + "type": "object", + "properties": { + "NameAliases": { + "description": "Alternative names, including historical, by which this master data is/has been known (it should include all the identifiers).", + "type": "array", + "items": { + "$ref": "#/definitions/opendes:wks:AbstractAliasNames:1.0.0" + } + }, + "SpatialLocation": { + "description": "The spatial location information such as coordinates, CRS information (left empty when not appropriate).", + "$ref": "#/definitions/opendes:wks:AbstractSpatialLocation:1.0.0" + }, + "VersionCreationReason": { + "description": "This describes the reason that caused the creation of a new version of this master data.", + "type": "string" + }, + "GeoContexts": { + "description": "List of geographic entities which provide context to the master data. This may include multiple types or multiple values of the same type.", + "type": "array", + "items": { + "$ref": "#/definitions/opendes:wks:AbstractGeoContext:1.0.0" + } + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractMaster.1.0.0.json" + }, + "opendes:wks:AbstractGeoProspectContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoProspectContext:1.0.0", + "description": "A single, typed Prospect entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "x-osdu-review-status": "Accepted", + "title": "AbstractGeoProspectContext", + "type": "object", + "properties": { + "ProspectID": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Prospect:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Reference to the prospect.", + "x-osdu-relationship": [ + { + "EntityType": "Prospect", + "GroupType": "master-data" + } + ], + "type": "string" + }, + "GeoTypeID": { + "x-osdu-is-derived": { + "RelationshipPropertyName": "ProspectID", + "TargetPropertyName": "ProspectTypeID" + }, + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ProspectType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The ProspectType reference of the Prospect (via ProspectID) for application convenience.", + "x-osdu-relationship": [ + { + "EntityType": "ProspectType", + "GroupType": "reference-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoProspectContext.1.0.0.json" + }, + "opendes:wks:AbstractSpatialLocation:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractSpatialLocation:1.0.0", + "description": "A geographic object which can be described by a set of points.", + "title": "AbstractSpatialLocation", + "type": "object", + "properties": { + "AsIngestedCoordinates": { + "description": "The original or 'as ingested' coordinates (Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon). The name 'AsIngestedCoordinates' was chosen to contrast it to 'OriginalCoordinates', which carries the uncertainty whether any coordinate operations took place before ingestion. In cases where the original CRS is different from the as-ingested CRS, the OperationsApplied can also contain the list of operations applied to the coordinate prior to ingestion. The data structure is similar to GeoJSON FeatureCollection, however in a CRS context explicitly defined within the AbstractAnyCrsFeatureCollection. The coordinate sequence follows GeoJSON standard, i.e. 'eastward/longitude', 'northward/latitude' {, 'upward/height' unless overridden by an explicit direction in the AsIngestedCoordinates.VerticalCoordinateReferenceSystemID}.", + "x-osdu-frame-of-reference": "CRS:", + "title": "As Ingested Coordinates", + "$ref": "#/definitions/opendes:wks:AbstractAnyCrsFeatureCollection:1.0.0" + }, + "SpatialParameterTypeID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SpatialParameterType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "A type of spatial representation of an object, often general (e.g. an Outline, which could be applied to Field, Reservoir, Facility, etc.) or sometimes specific (e.g. Onshore Outline, State Offshore Outline, Federal Offshore Outline, 3 spatial representations that may be used by Countries).", + "x-osdu-relationship": [ + { + "EntityType": "SpatialParameterType", + "GroupType": "reference-data" + } + ], + "type": "string" + }, + "QuantitativeAccuracyBandID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-QuantitativeAccuracyBand:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "An approximate quantitative assessment of the quality of a location (accurate to > 500 m (i.e. not very accurate)), to < 1 m, etc.", + "x-osdu-relationship": [ + { + "EntityType": "QuantitativeAccuracyBand", + "GroupType": "reference-data" + } + ], + "type": "string" + }, + "CoordinateQualityCheckRemarks": { + "type": "array", + "description": "Freetext remarks on Quality Check.", + "items": { + "type": "string" + } + }, + "AppliedOperations": { + "description": "The audit trail of operations applied to the coordinates from the original state to the current state. The list may contain operations applied prior to ingestion as well as the operations applied to produce the Wgs84Coordinates. The text elements refer to ESRI style CRS and Transformation names, which may have to be translated to EPSG standard names.", + "title": "Operations Applied", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "conversion from ED_1950_UTM_Zone_31N to GCS_European_1950; 1 points converted", + "transformation GCS_European_1950 to GCS_WGS_1984 using ED_1950_To_WGS_1984_24; 1 points successfully transformed" + ] + }, + "QualitativeSpatialAccuracyTypeID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-QualitativeSpatialAccuracyType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "A qualitative description of the quality of a spatial location, e.g. unverifiable, not verified, basic validation.", + "x-osdu-relationship": [ + { + "EntityType": "QualitativeSpatialAccuracyType", + "GroupType": "reference-data" + } + ], + "type": "string" + }, + "CoordinateQualityCheckPerformedBy": { + "type": "string", + "description": "The user who performed the Quality Check." + }, + "SpatialLocationCoordinatesDate": { + "format": "date-time", + "description": "Date when coordinates were measured or retrieved.", + "x-osdu-frame-of-reference": "DateTime", + "type": "string" + }, + "CoordinateQualityCheckDateTime": { + "format": "date-time", + "description": "The date of the Quality Check.", + "x-osdu-frame-of-reference": "DateTime", + "type": "string" + }, + "Wgs84Coordinates": { + "title": "WGS 84 Coordinates", + "description": "The normalized coordinates (Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon) based on WGS 84 (EPSG:4326 for 2-dimensional coordinates, EPSG:4326 + EPSG:5714 (MSL) for 3-dimensional coordinates). This derived coordinate representation is intended for global discoverability only. The schema of this substructure is identical to the GeoJSON FeatureCollection https://geojson.org/schema/FeatureCollection.json. The coordinate sequence follows GeoJSON standard, i.e. longitude, latitude {, height}", + "$ref": "#/definitions/opendes:wks:AbstractFeatureCollection:1.0.0" + }, + "SpatialGeometryTypeID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SpatialGeometryType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Indicates the expected look of the SpatialParameterType, e.g. Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon. The value constrains the type of geometries in the GeoJSON Wgs84Coordinates and AsIngestedCoordinates.", + "x-osdu-relationship": [ + { + "EntityType": "SpatialGeometryType", + "GroupType": "reference-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractSpatialLocation.1.0.0.json" + }, + "opendes:wks:AbstractGeoFieldContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoFieldContext:1.0.0", + "description": "A single, typed field entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "title": "AbstractGeoFieldContext", + "type": "object", + "properties": { + "FieldID": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Field:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Reference to Field.", + "x-osdu-relationship": [ + { + "EntityType": "Field", + "GroupType": "master-data" + } + ], + "type": "string" + }, + "GeoTypeID": { + "const": "Field", + "description": "The fixed type 'Field' for this AbstractGeoFieldContext." + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoFieldContext.1.0.0.json" + }, + "opendes:wks:AbstractFeatureCollection:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractFeatureCollection:1.0.0", + "description": "GeoJSON feature collection as originally published in https://geojson.org/schema/FeatureCollection.json. Attention: the coordinate order is fixed: Longitude first, followed by Latitude, optionally height above MSL (EPSG:5714) as third coordinate.", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + }, + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractFeatureCollection:1.0.0.json" + }, + "opendes:wks:AbstractAccessControlList:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractAccessControlList:1.0.0", + "description": "The access control tags associated with this entity. This structure is included by the SystemProperties \"acl\", which is part of all OSDU records. Not extensible.", + "additionalProperties": false, + "title": "Access Control List", + "type": "object", + "properties": { + "viewers": { + "description": "The list of viewers to which this data record is accessible/visible/discoverable formatted as an email (core.common.model.storage.validation.ValidationDoc.EMAIL_REGEX).", + "title": "List of Viewers", + "type": "array", + "items": { + "pattern": "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$", + "type": "string" + } + }, + "owners": { + "description": "The list of owners of this data record formatted as an email (core.common.model.storage.validation.ValidationDoc.EMAIL_REGEX).", + "title": "List of Owners", + "type": "array", + "items": { + "pattern": "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$", + "type": "string" + } + } + }, + "required": [ + "owners", + "viewers" + ], + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractAccessControlList.1.0.0.json" + }, + "opendes:wks:AbstractGeoPlayContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoPlayContext:1.0.0", + "description": "A single, typed Play entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "x-osdu-review-status": "Accepted", + "title": "AbstractGeoPlayContext", + "type": "object", + "properties": { + "PlayID": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Play:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Reference to the play.", + "x-osdu-relationship": [ + { + "EntityType": "Play", + "GroupType": "master-data" + } + ], + "type": "string" + }, + "GeoTypeID": { + "x-osdu-is-derived": { + "RelationshipPropertyName": "PlayID", + "TargetPropertyName": "PlayTypeID" + }, + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-PlayType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The PlayType reference of the Play (via PlayID) for application convenience.", + "x-osdu-relationship": [ + { + "EntityType": "PlayType", + "GroupType": "reference-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoPlayContext.1.0.0.json" + }, + "opendes:wks:AbstractLegalParentList:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractLegalParentList:1.0.0", + "description": "A list of entity IDs in the data ecosystem, which act as legal parents to the current entity. This structure is included by the SystemProperties \"ancestry\", which is part of all OSDU records. Not extensible.", + "additionalProperties": false, + "title": "Parent List", + "type": "object", + "properties": { + "parents": { + "description": "An array of none, one or many entity references in the data ecosystem, which identify the source of data in the legal sense. In contract to other relationships, the source record version is required. Example: the 'parents' will be queried when e.g. the subscription of source data services is terminated; access to the derivatives is also terminated.", + "title": "Parents", + "type": "array", + "items": { + "x-osdu-relationship": [], + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.\\:\\%]+:[0-9]+$", + "type": "string" + }, + "example": [] + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractLegalParentList.1.0.0.json" + } + }, + "properties": { + "ancestry": { + "description": "The links to data, which constitute the inputs.", + "title": "Ancestry", + "$ref": "#/definitions/opendes:wks:AbstractLegalParentList:1.0.0" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/opendes:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "#/definitions/opendes:wks:AbstractMaster:1.0.0" + }, + { + "type": "object", + "properties": {} + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + } + } + ] + }, + "kind": { + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "example": "osdu:wks:master-data--Test:1.0.0" + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "#/definitions/opendes:wks:AbstractAccessControlList:1.0.0" + }, + "version": { + "format": "int64", + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "example": 1562066009929332 + }, + "tags": { + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "additionalProperties": { + "type": "string" + }, + "title": "Tag Dictionary", + "type": "object", + "example": { + "NameOfKey": "String value" + } + }, + "modifyUser": { + "description": "The user reference, which created this version of this resource object. Set by the System.", + "title": "Resource Object Version Creation User Reference", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "format": "date-time", + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "example": "2020-12-16T11:52:24.477Z" + }, + "createTime": { + "format": "date-time", + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "example": "2020-12-16T11:46:20.163Z" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "#/definitions/opendes:wks:AbstractMetaItem:1.0.0" + } + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "#/definitions/opendes:wks:AbstractLegalTags:1.0.0" + }, + "createUser": { + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "title": "Resource Object Creation User Reference", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "id": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Test:[\\w\\-\\.\\:\\%]+$", + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "example": "namespace:master-data--Test:ded98862-efe4-5517-a509-d99f4b941b20" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/master-data/Test.1.0.0.json" +} \ No newline at end of file diff --git a/indexer-core/src/test/resources/converter/new-definitions-format/colons-sample.json.res b/indexer-core/src/test/resources/converter/new-definitions-format/colons-sample.json.res new file mode 100644 index 0000000000000000000000000000000000000000..8f3ca4d7266d4f92177459314efe2445f6a25949 --- /dev/null +++ b/indexer-core/src/test/resources/converter/new-definitions-format/colons-sample.json.res @@ -0,0 +1,77 @@ +{ + "kind": "osdu:osdu:Wellbore:1.0.0", + "schema": [ + { + "path": "ResourceHomeRegionID", + "kind": "string" + }, + { + "path": "ResourceHostRegionIDs", + "kind": "[]string" + }, + { + "path": "ResourceLifecycleStatus", + "kind": "string" + }, + { + "path": "ResourceSecurityClassification", + "kind": "string" + }, + { + "path": "ResourceCurationStatus", + "kind": "string" + }, + { + "path": "ExistenceKind", + "kind": "string" + }, + { + "path": "Source", + "kind": "string" + }, + { + "path": "SpatialLocation.SpatialParameterTypeID", + "kind": "string" + }, + { + "path": "SpatialLocation.QuantitativeAccuracyBandID", + "kind": "string" + }, + { + "path": "SpatialLocation.CoordinateQualityCheckRemarks", + "kind": "[]string" + }, + { + "path": "SpatialLocation.AppliedOperations", + "kind": "[]string" + }, + { + "path": "SpatialLocation.QualitativeSpatialAccuracyTypeID", + "kind": "string" + }, + { + "path": "SpatialLocation.CoordinateQualityCheckPerformedBy", + "kind": "string" + }, + { + "path": "SpatialLocation.SpatialLocationCoordinatesDate", + "kind": "datetime" + }, + { + "path": "SpatialLocation.CoordinateQualityCheckDateTime", + "kind": "datetime" + }, + { + "path": "SpatialLocation.Wgs84Coordinates", + "kind": "core:dl:geoshape:1.0.0" + }, + { + "path": "SpatialLocation.SpatialGeometryTypeID", + "kind": "string" + }, + { + "path": "VersionCreationReason", + "kind": "string" + } + ] +} \ No newline at end of file diff --git a/indexer-core/src/test/resources/converter/tags/allOf/allOf-inside-property.json b/indexer-core/src/test/resources/converter/tags/allOf/allOf-inside-property.json index 1f2d761d21a1501dbf05d3ac59c20f511238f16a..66df67afc03fad6e76a526399253a2d610afb8a4 100644 --- a/indexer-core/src/test/resources/converter/tags/allOf/allOf-inside-property.json +++ b/indexer-core/src/test/resources/converter/tags/allOf/allOf-inside-property.json @@ -19,7 +19,7 @@ { "properties": { "val" : { - "type": "string" } + "type": "string" } } } ] diff --git a/indexer-core/src/test/resources/converter/tags/anyOf/indefinitions.json b/indexer-core/src/test/resources/converter/tags/anyOf/indefinitions.json index 4733286c10bd2d081ae85fa44ee22d499a86908d..ab87712afe11ccbd52120cbc0abb89b1a26210e1 100644 --- a/indexer-core/src/test/resources/converter/tags/anyOf/indefinitions.json +++ b/indexer-core/src/test/resources/converter/tags/anyOf/indefinitions.json @@ -1,16 +1,16 @@ { "definitions": { - "wellboreData1": { + "opendes:wks:wellboreData1:1.0.0": { "properties": { "prop1": { "type": "string" } } }, - "wellboreData2": { + "opendes:wks:wellboreData2:1.0.0": { "anyOf": [ { - "$ref": "#/definitions/wellboreData1" + "$ref": "#/definitions/opendes:wks:wellboreData1:1.0.0" } ] } @@ -20,7 +20,7 @@ "type": "object", "properties": { "Field": { - "$ref": "#/definitions/wellboreData2" + "$ref": "#/definitions/opendes:wks:wellboreData2:1.0.0" } } } diff --git a/pom.xml b/pom.xml index 711526c64b74bffea49d64878eac270a9ab8d569..51f7584b12ad62b290706011cc4e8eb3c4e3a7c0 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ <java.version>1.8</java.version> <springfox-version>2.7.0</springfox-version> <spring-cloud.version>Greenwich.SR2</spring-cloud.version> - <os-core-common.version>0.6.5</os-core-common.version> + <os-core-common.version>0.6.9</os-core-common.version> <snakeyaml.version>1.26</snakeyaml.version> <hibernate-validator.version>6.1.5.Final</hibernate-validator.version> <jackson.version>2.11.2</jackson.version> diff --git a/provider/indexer-azure/pom.xml b/provider/indexer-azure/pom.xml index c88af5429b37a4671ce3ec3e5ccd451c908f2dc7..88c81b927e5cce9085b9dd747731fc3d93630845 100644 --- a/provider/indexer-azure/pom.xml +++ b/provider/indexer-azure/pom.xml @@ -41,8 +41,7 @@ <nimbus-jose-jwt.version>8.2</nimbus-jose-jwt.version> <indexer-core.version>0.8.0-SNAPSHOT</indexer-core.version> <spring-security-jwt.version>1.1.1.RELEASE</spring-security-jwt.version> - <osdu.corelibazure.version>0.0.42</osdu.corelibazure.version> - <osdu.oscorecommon.version>0.6.5</osdu.oscorecommon.version> + <osdu.corelibazure.version>0.6.2</osdu.corelibazure.version> <reactor-netty.version>0.9.12.RELEASE</reactor-netty.version> <java-jwt.version>3.8.1</java-jwt.version> <powermock.version>2.0.2</powermock.version> @@ -169,11 +168,6 @@ <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> - <dependency> - <groupId>org.opengroup.osdu</groupId> - <artifactId>os-core-common</artifactId> - <version>${osdu.oscorecommon.version}</version> - </dependency> <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>core-lib-azure</artifactId> diff --git a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/IndexerAzureApplication.java b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/IndexerAzureApplication.java index 51886b1357c66e14699d82955c757203da00eba0..f0ed79107e68a6d71bb98296734c237de5a62c4a 100644 --- a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/IndexerAzureApplication.java +++ b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/IndexerAzureApplication.java @@ -18,12 +18,14 @@ import org.opengroup.osdu.indexer.IndexerApplication; import org.opengroup.osdu.indexer.ServerletInitializer; import org.opengroup.osdu.indexer.service.ElasticSettingServiceImpl; import org.springframework.boot.SpringApplication; +import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.FilterType; -@SpringBootApplication +@SpringBootApplication(exclude = { SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class }) @ComponentScan( basePackages = {"org.opengroup.osdu"}, excludeFilters = { diff --git a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/config/AzureBootstrapConfig.java b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/config/AzureBootstrapConfig.java index 7be75c3be0c99a9f076f36f422b303e948aa035a..50184634c1f45e4990658b1a8ad0499e43f1ef6e 100644 --- a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/config/AzureBootstrapConfig.java +++ b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/config/AzureBootstrapConfig.java @@ -36,18 +36,15 @@ public class AzureBootstrapConfig { @Value("${azure.servicebus.topic-name}") private String serviceBusTopicName; + @Value("${azure.servicebus.reindex.topic-name}") + private String serviceBusReindexTopicName; + @Value("${ELASTIC_CACHE_EXPIRATION}") private Integer elasticCacheExpiration; @Value("${MAX_CACHE_VALUE_SIZE}") private Integer maxCacheValueSize; - @Value("${AUTHORIZE_API_KEY}") - private String entitlementsAPIKey; - - @Value("${AUTHORIZE_API}") - private String entitlementsAPIEndpoint; - @Bean @Named("KEY_VAULT_URL") public String getKeyVaultURL() { @@ -60,6 +57,12 @@ public class AzureBootstrapConfig { return serviceBusTopicName; } + @Bean + @Named("SERVICE_BUS_REINDEX_TOPIC") + public String serviceBusReindexTopicName() { + return serviceBusReindexTopicName; + } + @Bean @Named("ELASTIC_CACHE_EXPIRATION") public Integer getElasticCacheExpiration() { @@ -92,15 +95,4 @@ public class AzureBootstrapConfig { return String.format(urlFormat, tenant); } - @Autowired - private HttpResponseBodyMapper httpResponseBodyMapper; - - @Bean - public IEntitlementsFactory entitlementsFactory() { - EntitlementsAPIConfig apiConfig = EntitlementsAPIConfig.builder() - .apiKey(entitlementsAPIKey) - .rootUrl(entitlementsAPIEndpoint) - .build(); - return new EntitlementsFactory(apiConfig, httpResponseBodyMapper); - } } diff --git a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/di/EntitlementsClientFactory.java b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/di/EntitlementsClientFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..e83c404f2e9a3327e232281cc3800c71e45216cb --- /dev/null +++ b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/di/EntitlementsClientFactory.java @@ -0,0 +1,57 @@ +// Copyright 2017-2019, Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.indexer.azure.di; + +import org.opengroup.osdu.core.common.entitlements.EntitlementsAPIConfig; +import org.opengroup.osdu.core.common.entitlements.EntitlementsFactory; +import org.opengroup.osdu.core.common.entitlements.IEntitlementsFactory; +import org.opengroup.osdu.core.common.http.json.HttpResponseBodyMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.factory.config.AbstractFactoryBean; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; +import org.springframework.web.context.annotation.RequestScope; + +@Component +@RequestScope +@Lazy +public class EntitlementsClientFactory extends AbstractFactoryBean<IEntitlementsFactory> { + + @Value("${AUTHORIZE_API}") + private String authorizeApi; + + @Value("${AUTHORIZE_API_KEY:}") + private String authorizeApiKey; + + @Autowired + private HttpResponseBodyMapper mapper; + + @Override + protected IEntitlementsFactory createInstance() throws Exception { + + return new EntitlementsFactory(EntitlementsAPIConfig + .builder() + .rootUrl(authorizeApi) + .apiKey(authorizeApiKey) + .build(), + mapper); + } + + @Override + public Class<?> getObjectType() { + return IEntitlementsFactory.class; + } +} diff --git a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/DpsHeadersAzureQueue.java b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/DpsHeadersAzureQueue.java index 2335abb334b8a1960f1028bea2d250285dde97d0..241451e83016a059d60aea5a96fadaa00ae0315b 100644 --- a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/DpsHeadersAzureQueue.java +++ b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/DpsHeadersAzureQueue.java @@ -33,9 +33,6 @@ import org.springframework.web.context.annotation.RequestScope; @Primary public class DpsHeadersAzureQueue extends DpsHeaders { - @Value("${indexer.queue.key}") - private String queueKey; - //ToDo this should be moved to Azure client-lib public static final String INDEXER_QUEUE_KEY = "x-functions-key"; @@ -47,7 +44,8 @@ public class DpsHeadersAzureQueue extends DpsHeaders { .stream() .collect(Collectors.toMap(h -> h, request::getHeader)); - headers.put(INDEXER_QUEUE_KEY,queueKey); + // TODO: Figure out if this header is actually required to be set for anything + headers.put(INDEXER_QUEUE_KEY, "NOT_USED"); this.addFromMap(headers); diff --git a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/IndexerQueueTaskBuilderAzure.java b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/IndexerQueueTaskBuilderAzure.java index 7210b4aaa06bb72b607ae31353835ca4353a19d1..4428beb160c4d352ebc24b5cf6fff74d9db5d799 100644 --- a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/IndexerQueueTaskBuilderAzure.java +++ b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/IndexerQueueTaskBuilderAzure.java @@ -42,7 +42,6 @@ import javax.inject.Named; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; import java.util.stream.Collectors; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -64,8 +63,8 @@ public class IndexerQueueTaskBuilderAzure extends IndexerQueueTaskBuilder { private JaxRsDpsLog logger; @Inject - @Named("SERVICE_BUS_TOPIC") - private String serviceBusTopic; + @Named("SERVICE_BUS_REINDEX_TOPIC") + private String serviceBusReindexTopicName; @Inject private StorageService storageService; @@ -153,7 +152,7 @@ public class IndexerQueueTaskBuilderAzure extends IndexerQueueTaskBuilder { try { logger.info("Indexer publishes message to Service Bus " + headers.getCorrelationId()); - topicClientFactory.getClient(headers.getPartitionId(), serviceBusTopic).send(message); + topicClientFactory.getClient(headers.getPartitionId(), serviceBusReindexTopicName).send(message); } catch (Exception e) { logger.error(e.getMessage(), e); } diff --git a/provider/indexer-azure/src/main/resources/application.properties b/provider/indexer-azure/src/main/resources/application.properties index 619120f5eeab512b3e0f3316e27156e70b6b9aef..897271df395ef070a6f4971f6cfa824d36436e28 100644 --- a/provider/indexer-azure/src/main/resources/application.properties +++ b/provider/indexer-azure/src/main/resources/application.properties @@ -63,6 +63,7 @@ azure.cosmosdb.database=${cosmosdb_database} #AzureServiceBusconfiguration azure.servicebus.topic-name=${servicebus_topic_name} +azure.servicebus.reindex.topic-name=${reindex_topic_name} #Indexer-Queue-header indexer.queue.key=abcd diff --git a/provider/indexer-gcp/pom.xml b/provider/indexer-gcp/pom.xml index 0eacfa3a8748be9143ceccd97d3cbe4018b31e3a..ff16763679abd9096948923f2ac504cd6e92ae57 100644 --- a/provider/indexer-gcp/pom.xml +++ b/provider/indexer-gcp/pom.xml @@ -25,7 +25,7 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>core-lib-gcp</artifactId> - <version>0.6.1-SNAPSHOT</version> + <version>0.7.0</version> </dependency> <dependency> diff --git a/provider/indexer-ibm/pom.xml b/provider/indexer-ibm/pom.xml index c12c9b00448e33b2330a60ae20a9e9fc9782b7ad..abe6a5ad4769c95e854a1cc58e3c8702b8db3968 100644 --- a/provider/indexer-ibm/pom.xml +++ b/provider/indexer-ibm/pom.xml @@ -31,7 +31,7 @@ <packaging>jar</packaging> <properties> - <os-core-lib-ibm.version>0.3.8-SNAPSHOT</os-core-lib-ibm.version> + <os-core-lib-ibm.version>0.7.0</os-core-lib-ibm.version> </properties> <profiles> diff --git a/testing/indexer-test-aws/pom.xml b/testing/indexer-test-aws/pom.xml index 2472c74b077f71aa6adfbdb750c091d8f86615bd..39bb3942553c46295342e73a07fb12c31a300b24 100644 --- a/testing/indexer-test-aws/pom.xml +++ b/testing/indexer-test-aws/pom.xml @@ -42,7 +42,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.8.0-SNAPSHOT</version> + <version>0.8.1-SNAPSHOT</version> </dependency> <!-- AWS specific packages --> diff --git a/testing/indexer-test-aws/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java b/testing/indexer-test-aws/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java index 7539fe6bf4ecb5818479952dd92cf5b2aea54a17..03912e841850bb4b0eb985ff9ea5f52bc1bed098 100644 --- a/testing/indexer-test-aws/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java +++ b/testing/indexer-test-aws/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java @@ -95,4 +95,14 @@ public class Steps extends SchemaServiceRecordSteps { super.iShouldGetTheNumberDocumentsForTheIndexInTheElasticSearchWithOutSkippedAttribute(expectedCount, index, skippedAttributes); } + @Then("^I should be able to search (\\d+) record with index \"([^\"]*)\" by tag \"([^\"]*)\" and value \"([^\"]*)\"$") + public void iShouldBeAbleToSearchRecordByTagKeyAndTagValue(int expectedNumber, String index, String tagKey, String tagValue) throws Throwable { + super.iShouldBeAbleToSearchRecordByTagKeyAndTagValue(index, tagKey, tagValue, expectedNumber); + } + + @Then("^I should be able search (\\d+) documents for the \"([^\"]*)\" by bounding box query with points \\((-?\\d+), (-?\\d+)\\) and \\((-?\\d+), (-?\\d+)\\) on field \"(.*?)\"$") + public void i_should_get_the_documents_for_the_in_the_Elastic_Search_by_geoQuery ( + int expectedCount, String index, Double topLatitude, Double topLongitude, Double bottomLatitude, Double bottomLongitude, String field) throws Throwable { + super.i_should_get_the_documents_for_the_in_the_Elastic_Search_by_geoQuery(expectedCount, index, topLatitude, topLongitude, bottomLatitude, bottomLongitude, field); + } } \ No newline at end of file diff --git a/testing/indexer-test-azure/pom.xml b/testing/indexer-test-azure/pom.xml index 074e1cab971f0843dd57cf891727dba3873a821c..baa5cd8b14b926f98b4a979e5efbe23d9309b4cd 100644 --- a/testing/indexer-test-azure/pom.xml +++ b/testing/indexer-test-azure/pom.xml @@ -45,7 +45,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.8.0-SNAPSHOT</version> + <version>0.8.1-SNAPSHOT</version> </dependency> <!-- Azure dependencies --> diff --git a/testing/indexer-test-azure/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java b/testing/indexer-test-azure/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java index 8721cee890fb340474355453f55b71b266b74215..97779ee8b1f9f0cea9d6c23e0a88229225deb9fb 100644 --- a/testing/indexer-test-azure/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java +++ b/testing/indexer-test-azure/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java @@ -14,14 +14,13 @@ package org.opengroup.osdu.step_definitions.index.record; +import cucumber.api.DataTable; import cucumber.api.Scenario; import cucumber.api.java.Before; -import lombok.extern.java.Log; - -import cucumber.api.DataTable; import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; +import lombok.extern.java.Log; import org.opengroup.osdu.common.SchemaServiceRecordSteps; import org.opengroup.osdu.util.AzureHTTPClient; import org.opengroup.osdu.util.ElasticUtils; @@ -68,4 +67,10 @@ public class Steps extends SchemaServiceRecordSteps { public void iShouldBeAbleToSearchRecordByTagKeyAndTagValue(int expectedNumber, String index, String tagKey, String tagValue) throws Throwable { super.iShouldBeAbleToSearchRecordByTagKeyAndTagValue(index, tagKey, tagValue, expectedNumber); } + + @Then("^I should be able search (\\d+) documents for the \"([^\"]*)\" by bounding box query with points \\((-?\\d+), (-?\\d+)\\) and \\((-?\\d+), (-?\\d+)\\) on field \"([^\"]*)\"$") + public void i_should_get_the_documents_for_the_in_the_Elastic_Search_by_geoQuery( + int expectedCount, String index, Double topLatitude, Double topLongitude, Double bottomLatitude, Double bottomLongitude, String field) throws Throwable { + super.i_should_get_the_documents_for_the_in_the_Elastic_Search_by_geoQuery(expectedCount, index, topLatitude, topLongitude, bottomLatitude, bottomLongitude, field); + } } \ No newline at end of file diff --git a/testing/indexer-test-core/pom.xml b/testing/indexer-test-core/pom.xml index 0190d6b357070de949ae444d9b7d96aaba41ad9a..e9c63cd00626c17b308d31727da789878acf3e1a 100644 --- a/testing/indexer-test-core/pom.xml +++ b/testing/indexer-test-core/pom.xml @@ -11,7 +11,7 @@ <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.8.0-SNAPSHOT</version> + <version>0.8.1-SNAPSHOT</version> <properties> <maven.compiler.target>1.8</maven.compiler.target> @@ -109,7 +109,27 @@ <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>7.8.1</version> </dependency> - + <dependency> + <groupId>org.locationtech.jts.io</groupId> + <artifactId>jts-io-common</artifactId> + <version>1.15.0</version> + </dependency> + <dependency> + <groupId>org.locationtech.spatial4j</groupId> + <artifactId>spatial4j</artifactId> + <version>0.7</version> + </dependency> + <dependency> + <groupId>com.vividsolutions</groupId> + <artifactId>jts</artifactId> + <version>1.13</version> + <exclusions> + <exclusion> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + </exclusion> + </exclusions> + </dependency> <!--Logging--> <dependency> <groupId>org.apache.logging.log4j</groupId> diff --git a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/RecordSteps.java b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/RecordSteps.java index cb3dc70a9da5a688f90033627d507e9af631761a..4f3b563a3502abe88be51e3742c40c2bfe6a9f99 100644 --- a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/RecordSteps.java +++ b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/RecordSteps.java @@ -148,6 +148,14 @@ public class RecordSteps extends TestsBase { assertEquals(expectedNumber, actualNumberOfRecords); } + public void i_should_get_the_documents_for_the_in_the_Elastic_Search_by_geoQuery ( + int expectedNumber, String index, Double topLatitude, Double topLongitude, Double bottomLatitude, Double bottomLongitude, String field) throws Throwable { + index = generateActualName(index, timeStamp); + long numOfIndexedDocuments = createIndex(index); + long actualNumberOfRecords = elasticUtils.fetchRecordsByBoundingBoxQuery(index, field, topLatitude, topLongitude, bottomLatitude, bottomLongitude); + assertEquals(expectedNumber, actualNumberOfRecords); + } + private long createIndex(String index) throws InterruptedException, IOException { long numOfIndexedDocuments = 0; int iterator; diff --git a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java index df99970ee7ebf1ba09fb3c9ba7b7fdd97fb3bd25..30a6104ec6de56ad349000e509e8a307372c4231 100644 --- a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java +++ b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java @@ -18,10 +18,12 @@ package org.opengroup.osdu.util; import com.google.gson.Gson; + import java.security.KeyManagementException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import javax.net.ssl.SSLContext; + import lombok.extern.java.Log; import org.apache.http.Header; import org.apache.http.HttpHost; @@ -49,7 +51,8 @@ import org.elasticsearch.client.indices.GetIndexRequest; import org.elasticsearch.client.indices.GetMappingsRequest; import org.elasticsearch.client.indices.GetMappingsResponse; import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.common.collect.ImmutableOpenMap; +import org.locationtech.jts.geom.Coordinate; +import org.elasticsearch.common.geo.builders.EnvelopeBuilder; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; @@ -65,8 +68,7 @@ import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.logging.Level; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.termsQuery; +import static org.elasticsearch.index.query.QueryBuilders.*; /** @@ -255,6 +257,23 @@ public class ElasticUtils { } } + public long fetchRecordsByBoundingBoxQuery(String index, String field, Double topLatitude, Double topLongitude, Double bottomLatitude, Double bottomLongitude) throws Exception { + try (RestHighLevelClient client = this.createClient(username, password, host)) { + SearchRequest searchRequest = new SearchRequest(index); + SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); + Coordinate topLeft = new Coordinate(topLongitude, topLatitude); + Coordinate bottomRight = new Coordinate(bottomLongitude, bottomLatitude); + searchSourceBuilder.query(boolQuery().must(geoWithinQuery(field, new EnvelopeBuilder(topLeft, bottomRight)))); + searchRequest.source(searchSourceBuilder); + + SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT); + return searchResponse.getHits().getTotalHits().value; + } catch (ElasticsearchStatusException e) { + log.log(Level.INFO, String.format("Elastic search threw exception: %s", e.getMessage())); + return -1; + } + } + public Map<String, MappingMetadata> getMapping(String index) throws IOException { try (RestHighLevelClient client = this.createClient(username, password, host)) { GetMappingsRequest request = new GetMappingsRequest(); diff --git a/testing/indexer-test-core/src/main/resources/features/indexrecord/indexRecord-schema-service.feature b/testing/indexer-test-core/src/main/resources/features/indexrecord/indexRecord-schema-service.feature index 11d3ec6443448db6bd6723bed233212b91b89061..711ce2de1bcad49d6f46e7578c26526b28590cf9 100644 --- a/testing/indexer-test-core/src/main/resources/features/indexrecord/indexRecord-schema-service.feature +++ b/testing/indexer-test-core/src/main/resources/features/indexrecord/indexRecord-schema-service.feature @@ -3,10 +3,11 @@ Feature: Indexing of the documents Background: Given the schema is created with the following kind - | kind | index | schemaFile | - | tenant1:indexer-int-test:sample-schema-1:1.0.4 | tenant1-indexer-int-test:sample-schema-1-1.0.4 | index_records_1 | - | tenant1:indexer-int-test:sample-schema-2:1.0.4 | tenant1-indexer-int-test:sample-schema-2-1.0.4 | index_records_2 | - | tenant1:indexer-int-test:sample-schema-3:1.0.4 | tenant1-indexer-int-test:sample-schema-3-1.0.4 | index_records_3 | + | kind | index | schemaFile | + | tenant1:indexer:test-data--Integration:1.0.0 | tenant1-indexer-test-data--integration-1.0.0 | index_records_1 | + | tenant1:indexer:test-data--Integration:2.0.0 | tenant1-indexer-test-data--integration-2.0.0 | index_records_2 | + | tenant1:indexer:test-data--Integration:3.0.0 | tenant1-indexer-test-data--integration-3.0.0 | index_records_3 | + | tenant1:wks:master-data--Wellbore:2.0.3 | tenant1-wks-master-data--wellbore-2.0.3 | r3-index_record_wks_master | Scenario Outline: Ingest the record and Index in the Elastic Search When I ingest records with the <recordFile> with <acl> for a given <kind> @@ -14,23 +15,30 @@ Feature: Indexing of the documents Then I should get the elastic <mapping> for the <type> and <index> in the Elastic Search Examples: - | kind | recordFile | number | index | type | acl | mapping | - | "tenant1:indexer-int-test:sample-schema-1:1.0.4" | "index_records_schema_1" | 5 | "tenant1-indexer-int-test-sample-schema-1-1.0.4" | "sample-schema-1" | "data.default.viewers@tenant1" | "{"mappings":{"well":{"dynamic":"false","properties":{"acl":{"properties":{"owners":{"type":"keyword"},"viewers":{"type":"keyword"}}},"ancestry":{"properties":{"parents":{"type":"keyword"}}},"data":{"properties":{"Basin":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Country":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"County":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"EmptyAttribute":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Established":{"type":"date"},"Field":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Location":{"type":"geo_point"},"OriginalOperator":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Rank":{"type":"integer"},"Score":{"type":"integer"},"State":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellName":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellStatus":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellType":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"DblArray":{"type":"double"}}},"id":{"type":"keyword"},"index":{"properties":{"lastUpdateTime":{"type":"date"},"statusCode":{"type":"integer"},"trace":{"type":"text"}}},"kind":{"type":"keyword"},"legal":{"properties":{"legaltags":{"type":"keyword"},"otherRelevantDataCountries":{"type":"keyword"},"status":{"type":"keyword"}}},"namespace":{"type":"keyword"},"type":{"type":"keyword"},"version":{"type":"long"},"x-acl":{"type":"keyword"}}}}}" | - | "tenant1:indexer-int-test:sample-schema-3:1.0.4" | "index_records_schema_1" | 5 | "tenant1-indexer-int-test-sample-schema-3-1.0.4" | "sample-schema-3" | "data.default.viewers@tenant1" | "{"mappings":{"well":{"dynamic":"false","properties":{"acl":{"properties":{"owners":{"type":"keyword"},"viewers":{"type":"keyword"}}},"ancestry":{"properties":{"parents":{"type":"keyword"}}},"data":{"properties":{"Basin":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Country":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"County":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"EmptyAttribute":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Established":{"type":"date"},"Field":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Location":{"type":"geo_point"},"OriginalOperator":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Rank":{"type":"integer"},"Score":{"type":"integer"},"State":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellName":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellStatus":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellType":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"DblArray":{"type":"double"}}},"id":{"type":"keyword"},"index":{"properties":{"lastUpdateTime":{"type":"date"},"statusCode":{"type":"integer"},"trace":{"type":"text"}}},"kind":{"type":"keyword"},"legal":{"properties":{"legaltags":{"type":"keyword"},"otherRelevantDataCountries":{"type":"keyword"},"status":{"type":"keyword"}}},"namespace":{"type":"keyword"},"type":{"type":"keyword"},"version":{"type":"long"},"x-acl":{"type":"keyword"}}}}}" | + | kind | recordFile | number | index | type | acl | mapping | + | "tenant1:indexer:test-data--Integration:1.0.0" | "index_records_schema_1" | 5 | "tenant1-indexer-test-data--integration-1.0.0" | "test-data--Integration" | "data.default.viewers@tenant1" | "{"mappings":{"well":{"dynamic":"false","properties":{"acl":{"properties":{"owners":{"type":"keyword"},"viewers":{"type":"keyword"}}},"ancestry":{"properties":{"parents":{"type":"keyword"}}},"data":{"properties":{"Basin":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Country":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"County":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"EmptyAttribute":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Established":{"type":"date"},"Field":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Location":{"type":"geo_point"},"OriginalOperator":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Rank":{"type":"integer"},"Score":{"type":"integer"},"State":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellName":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellStatus":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellType":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"DblArray":{"type":"double"}}},"id":{"type":"keyword"},"index":{"properties":{"lastUpdateTime":{"type":"date"},"statusCode":{"type":"integer"},"trace":{"type":"text"}}},"kind":{"type":"keyword"},"legal":{"properties":{"legaltags":{"type":"keyword"},"otherRelevantDataCountries":{"type":"keyword"},"status":{"type":"keyword"}}},"namespace":{"type":"keyword"},"type":{"type":"keyword"},"version":{"type":"long"},"x-acl":{"type":"keyword"}}}}}" | + | "tenant1:indexer:test-data--Integration:3.0.0" | "index_records_schema_3" | 7 | "tenant1-indexer-test-data--integration-3.0.0" | "test-data--Integration" | "data.default.viewers@tenant1" | "{"mappings":{"well":{"dynamic":"false","properties":{"acl":{"properties":{"owners":{"type":"keyword"},"viewers":{"type":"keyword"}}},"ancestry":{"properties":{"parents":{"type":"keyword"}}},"data":{"properties":{"Basin":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Country":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"County":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"EmptyAttribute":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Established":{"type":"date"},"Field":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Location":{"type":"geo_point"},"OriginalOperator":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Rank":{"type":"integer"},"Score":{"type":"integer"},"State":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellName":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellStatus":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellType":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"DblArray":{"type":"double"}}},"id":{"type":"keyword"},"index":{"properties":{"lastUpdateTime":{"type":"date"},"statusCode":{"type":"integer"},"trace":{"type":"text"}}},"kind":{"type":"keyword"},"legal":{"properties":{"legaltags":{"type":"keyword"},"otherRelevantDataCountries":{"type":"keyword"},"status":{"type":"keyword"}}},"namespace":{"type":"keyword"},"type":{"type":"keyword"},"version":{"type":"long"},"x-acl":{"type":"keyword"}}}}}" | Scenario Outline: Ingest the record and Index in the Elastic Search with bad attribute When I ingest records with the <recordFile> with <acl> for a given <kind> Then I should get the <number> documents for the <index> in the Elastic Search with out <skippedAttribute> Examples: - | kind | recordFile | number | index | skippedAttribute | acl | - | "tenant1:indexer-int-test:sample-schema-2:1.0.4" | "index_records_2" | 4 | "tenant1-indexer-int-test-sample-schema-2-1.0.4" | "data.Location" | "data.default.viewers@tenant1" | - | "tenant1:indexer-int-test:sample-schema-3:1.0.4" | "index_records_3" | 7 | "tenant1-indexer-int-test-sample-schema-3-1.0.4" | "data.GeoShape" | "data.default.viewers@tenant1" | + | kind | recordFile | number | index | skippedAttribute | acl | + | "tenant1:indexer:test-data--Integration:2.0.0" | "index_records_2" | 4 | "tenant1-indexer-test-data--integration-2.0.0" | "data.Location" | "data.default.viewers@tenant1" | Scenario Outline: Ingest the record and Index in the Elastic Search with tags When I ingest records with the <recordFile> with <acl> for a given <kind> Then I should be able to search <number> record with index <index> by tag <tagKey> and value <tagValue> Examples: - | kind | recordFile | index | acl | tagKey | tagValue | number | - | "tenant1:indexer-int-test:sample-schema-1:1.0.4" | "index_records_1" | "tenant1-indexer-int-test-sample-schema-1-1.0.4" | "data.default.viewers@tenant1" | "testtag" | "testvalue" | 5 | + | kind | recordFile | index | acl | tagKey | tagValue | number | + | "tenant1:indexer:test-data--Integration:1.0.0" | "index_records_schema_1" | "tenant1-indexer-test-data--integration-1.0.0" | "data.default.viewers@tenant1" | "testtag" | "testvalue" | 5 | + + Scenario Outline: Ingest the r3-record with geo-shape and Index in the Elastic Search + When I ingest records with the <recordFile> with <acl> for a given <kind> + Then I should be able search <number> documents for the <index> by bounding box query with points (<top_left_latitude>, <top_left_longitude>) and (<bottom_right_latitude>, <bottom_right_longitude>) on field <field> + + Examples: + | kind | recordFile | number | index | acl | field | top_left_latitude | top_left_longitude | bottom_right_latitude | bottom_right_longitude | + | "tenant1:wks:master-data--Wellbore:2.0.3" | "r3-index_record_wks_master" | 1 | "tenant1-wks-master-data--wellbore-2.0.3" | "data.default.viewers@tenant1" | "data.SpatialLocation.Wgs84Coordinates" | 52 | -100 | 0 | 100 | diff --git a/testing/indexer-test-core/src/main/resources/testData/index_records_1.schema.json b/testing/indexer-test-core/src/main/resources/testData/index_records_1.schema.json index 9e54b33862a2f0b8d81277f79e2959b3b141e7bf..b7ecdbc656441b9db8a04ec27484493d0b40a73a 100644 --- a/testing/indexer-test-core/src/main/resources/testData/index_records_1.schema.json +++ b/testing/indexer-test-core/src/main/resources/testData/index_records_1.schema.json @@ -2,11 +2,11 @@ "schemaInfo": { "schemaIdentity": { "authority": "tenant1", - "source": "indexer-int-test", - "entityType": "sample-schema-1", - "schemaVersionMajor": "2", + "source": "indexer", + "entityType": "test-data--Integration", + "schemaVersionMajor": "1", "schemaVersionMinor": "0", - "schemaVersionPatch": "4" + "schemaVersionPatch": "0" }, "status": "DEVELOPMENT" }, @@ -21,7 +21,7 @@ "type": "string" }, "Location": { - "$ref": "#/definitions/core_dl_geopoint", + "$ref": "#/definitions/opendes:wks:core_dl_geopoint:1.0.0", "description": "The wellbore's position .", "format": "core:dl:geopoint:1.0.0", "title": "WGS 84 Position", @@ -89,6 +89,33 @@ } ] } + }, + "definitions": { + "opendes:wks:core_dl_geopoint:1.0.0": { + "description": "A 2D point location in latitude and longitude referenced to WGS 84 if not specified otherwise.", + "properties": { + "latitude": { + "description": "The latitude value in degrees of arc (dega). Value range [-90, 90].", + "maximum": 90, + "minimum": -90, + "title": "Latitude", + "type": "number" + }, + "longitude": { + "description": "The longitude value in degrees of arc (dega). Value range [-180, 180]", + "maximum": 180, + "minimum": -180, + "title": "Longitude", + "type": "number" + } + }, + "required": [ + "latitude", + "longitude" + ], + "title": "2D Map Location", + "type": "object" + } } } } \ No newline at end of file diff --git a/testing/indexer-test-core/src/main/resources/testData/index_records_2.schema.json b/testing/indexer-test-core/src/main/resources/testData/index_records_2.schema.json index 869df29b7a4c99aa8ffb38adfe18d1e6faa707ff..e67e19502e0283bdf977b03ff5a59dd27883cfa0 100644 --- a/testing/indexer-test-core/src/main/resources/testData/index_records_2.schema.json +++ b/testing/indexer-test-core/src/main/resources/testData/index_records_2.schema.json @@ -2,11 +2,11 @@ "schemaInfo": { "schemaIdentity": { "authority": "tenant1", - "source": "indexer-int-test", - "entityType": "sample-schema-2", - "schemaVersionMajor": "1", + "source": "indexer", + "entityType": "test-data--Integration", + "schemaVersionMajor": "2", "schemaVersionMinor": "0", - "schemaVersionPatch": "4" + "schemaVersionPatch": "0" }, "status": "DEVELOPMENT" }, @@ -21,7 +21,7 @@ "type": "string" }, "Location": { - "$ref": "#/definitions/core_dl_geopoint", + "$ref": "#/definitions/opendes:wks:core_dl_geopoint:1.0.0", "description": "The wellbore's position .", "format": "core:dl:geopoint:1.0.0", "title": "WGS 84 Position", @@ -70,6 +70,33 @@ } ] } + }, + "definitions": { + "opendes:wks:core_dl_geopoint:1.0.0": { + "description": "A 2D point location in latitude and longitude referenced to WGS 84 if not specified otherwise.", + "properties": { + "latitude": { + "description": "The latitude value in degrees of arc (dega). Value range [-90, 90].", + "maximum": 90, + "minimum": -90, + "title": "Latitude", + "type": "number" + }, + "longitude": { + "description": "The longitude value in degrees of arc (dega). Value range [-180, 180]", + "maximum": 180, + "minimum": -180, + "title": "Longitude", + "type": "number" + } + }, + "required": [ + "latitude", + "longitude" + ], + "title": "2D Map Location", + "type": "object" + } } } } \ No newline at end of file diff --git a/testing/indexer-test-core/src/main/resources/testData/index_records_3.json b/testing/indexer-test-core/src/main/resources/testData/index_records_3.json index 983e7bdb99dbe39246cc4ece07a9b3d434bddb5d..58a7e0deefb054eee8fcf7c6ad1719ecd7ff879f 100644 --- a/testing/indexer-test-core/src/main/resources/testData/index_records_3.json +++ b/testing/indexer-test-core/src/main/resources/testData/index_records_3.json @@ -4,10 +4,19 @@ "data": { "WellName": "Data Platform Services - 51", "GeoShape": { - "type": "Point", - "coordinates": [ - -105.01621, - 39.57422 + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + -105.01621, + 39.57422 + ] + } + } ] } } @@ -17,16 +26,25 @@ "data": { "WellName": "Data Platform Services - 52", "GeoShape": { - "type": "MultiPoint", - "coordinates": [ - [ - -105.01621, - 39.57422 - ], - [ - -80.666513, - 35.053994 - ] + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "MultiPoint", + "coordinates": [ + [ + -105.01621, + 39.57422 + ], + [ + -80.666513, + 35.053994 + ] + ] + } + } ] } } @@ -36,112 +54,121 @@ "data": { "WellName": "Data Platform Services - 53", "GeoShape": { - "type": "LineString", - "coordinates": [ - [ - -101.744384, - 39.32155 - ], - [ - -101.552124, - 39.330048 - ], - [ - -101.403808, - 39.330048 - ], - [ - -101.332397, - 39.364032 - ], - [ - -101.041259, - 39.368279 - ], - [ - -100.975341, - 39.304549 - ], - [ - -100.914916, - 39.245016 - ], - [ - -100.843505, - 39.164141 - ], - [ - -100.805053, - 39.104488 - ], - [ - -100.491943, - 39.100226 - ], - [ - -100.437011, - 39.095962 - ], - [ - -100.338134, - 39.095962 - ], - [ - -100.195312, - 39.027718 - ], - [ - -100.008544, - 39.010647 - ], - [ - -99.865722, - 39.00211 - ], - [ - -99.684448, - 38.972221 - ], - [ - -99.51416, - 38.929502 - ], - [ - -99.382324, - 38.920955 - ], - [ - -99.321899, - 38.895308 - ], - [ - -99.113159, - 38.869651 - ], - [ - -99.0802, - 38.85682 - ], - [ - -98.822021, - 38.85682 - ], - [ - -98.448486, - 38.848264 - ], - [ - -98.206787, - 38.848264 - ], - [ - -98.020019, - 38.878204 - ], - [ - -97.635498, - 38.873928 - ] + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -101.744384, + 39.32155 + ], + [ + -101.552124, + 39.330048 + ], + [ + -101.403808, + 39.330048 + ], + [ + -101.332397, + 39.364032 + ], + [ + -101.041259, + 39.368279 + ], + [ + -100.975341, + 39.304549 + ], + [ + -100.914916, + 39.245016 + ], + [ + -100.843505, + 39.164141 + ], + [ + -100.805053, + 39.104488 + ], + [ + -100.491943, + 39.100226 + ], + [ + -100.437011, + 39.095962 + ], + [ + -100.338134, + 39.095962 + ], + [ + -100.195312, + 39.027718 + ], + [ + -100.008544, + 39.010647 + ], + [ + -99.865722, + 39.00211 + ], + [ + -99.684448, + 38.972221 + ], + [ + -99.51416, + 38.929502 + ], + [ + -99.382324, + 38.920955 + ], + [ + -99.321899, + 38.895308 + ], + [ + -99.113159, + 38.869651 + ], + [ + -99.0802, + 38.85682 + ], + [ + -98.822021, + 38.85682 + ], + [ + -98.448486, + 38.848264 + ], + [ + -98.206787, + 38.848264 + ], + [ + -98.020019, + 38.878204 + ], + [ + -97.635498, + 38.873928 + ] + ] + } + } ] } } @@ -151,88 +178,97 @@ "data": { "WellName": "Data Platform Services - 54", "GeoShape": { - "type": "MultiLineString", - "coordinates": [ - [ - [ - -105.021443, - 39.578057 - ], - [ - -105.021507, - 39.577809 - ], - [ - -105.021572, - 39.577495 - ], - [ - -105.021572, - 39.577164 - ], - [ - -105.021572, - 39.577032 - ], - [ - -105.021529, - 39.576784 - ] - ], - [ - [ - -105.019898, - 39.574997 - ], - [ - -105.019598, - 39.574898 - ], - [ - -105.019061, - 39.574782 - ] - ], - [ - [ - -105.017173, - 39.574402 - ], - [ - -105.01698, - 39.574385 - ], - [ - -105.016636, - 39.574385 - ], - [ - -105.016508, - 39.574402 - ], - [ - -105.01595, - 39.57427 - ] - ], - [ - [ - -105.014276, - 39.573972 - ], - [ - -105.014126, - 39.574038 - ], - [ - -105.013825, - 39.57417 - ], - [ - -105.01331, - 39.574452 - ] - ] + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -105.021443, + 39.578057 + ], + [ + -105.021507, + 39.577809 + ], + [ + -105.021572, + 39.577495 + ], + [ + -105.021572, + 39.577164 + ], + [ + -105.021572, + 39.577032 + ], + [ + -105.021529, + 39.576784 + ] + ], + [ + [ + -105.019898, + 39.574997 + ], + [ + -105.019598, + 39.574898 + ], + [ + -105.019061, + 39.574782 + ] + ], + [ + [ + -105.017173, + 39.574402 + ], + [ + -105.01698, + 39.574385 + ], + [ + -105.016636, + 39.574385 + ], + [ + -105.016508, + 39.574402 + ], + [ + -105.01595, + 39.57427 + ] + ], + [ + [ + -105.014276, + 39.573972 + ], + [ + -105.014126, + 39.574038 + ], + [ + -105.013825, + 39.57417 + ], + [ + -105.01331, + 39.574452 + ] + ] + ] + } + } ] } } @@ -242,30 +278,39 @@ "data": { "WellName": "Data Platform Services - 55", "GeoShape": { - "type": "Polygon", - "coordinates": [ - [ - [ - 100, - 0 - ], - [ - 101, - 0 - ], - [ - 101, - 1 - ], - [ - 100, - 1 - ], - [ - 100, - 0 - ] - ] + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 100, + 0 + ], + [ + 101, + 0 + ], + [ + 101, + 1 + ], + [ + 100, + 1 + ], + [ + 100, + 0 + ] + ] + ] + } + } ] } } @@ -275,56 +320,65 @@ "data": { "WellName": "Data Platform Services - 56", "GeoShape": { - "type": "MultiPolygon", - "coordinates": [ - [ - [ - [ - 107, - 7 - ], - [ - 108, - 7 - ], - [ - 108, - 8 - ], - [ - 107, - 8 - ], - [ - 107, - 7 - ] - ] - ], - [ - [ - [ - 100, - 0 - ], - [ - 101, - 0 - ], - [ - 101, - 1 - ], - [ - 100, - 1 - ], - [ - 100, - 0 + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + 107, + 7 + ], + [ + 108, + 7 + ], + [ + 108, + 8 + ], + [ + 107, + 8 + ], + [ + 107, + 7 + ] + ] + ], + [ + [ + [ + 100, + 0 + ], + [ + 101, + 0 + ], + [ + 101, + 1 + ], + [ + 100, + 1 + ], + [ + 100, + 0 + ] + ] + ] ] - ] - ] + } + } ] } } @@ -334,190 +388,199 @@ "data": { "WellName": "Data Platform Services - 57", "GeoShape": { - "type": "GeometryCollection", - "geometries": [ - { - "type": "Point", - "coordinates": [ - -80.660805, - 35.049392 - ] - }, - { - "type": "Polygon", - "coordinates": [ - [ - [ - -80.664582, - 35.044965 - ], - [ - -80.663874, - 35.04428 - ], - [ - -80.662586, - 35.04558 - ], - [ - -80.663444, - 35.046036 - ], - [ - -80.664582, - 35.044965 - ] - ] - ] - }, + "type": "FeatureCollection", + "features": [ { - "type": "LineString", - "coordinates": [ - [ - -80.662372, - 35.059509 - ], - [ - -80.662693, - 35.059263 - ], - [ - -80.662844, - 35.05893 - ], - [ - -80.66308, - 35.058332 - ], - [ - -80.663595, - 35.057753 - ], - [ - -80.663874, - 35.057401 - ], - [ - -80.66441, - 35.057033 - ], - [ - -80.664861, - 35.056787 - ], - [ - -80.665419, - 35.056506 - ], - [ - -80.665633, - 35.056312 - ], - [ - -80.666019, - 35.055891 - ], - [ - -80.666191, - 35.055452 - ], - [ - -80.666191, - 35.055171 - ], - [ - -80.666255, - 35.05489 - ], - [ - -80.666213, - 35.054222 - ], - [ - -80.666213, - 35.053924 - ], - [ - -80.665955, - 35.052905 - ], - [ - -80.665698, - 35.052044 - ], - [ - -80.665504, - 35.051482 - ], - [ - -80.665762, - 35.050481 - ], - [ - -80.66617, - 35.049725 - ], - [ - -80.666513, - 35.049286 - ], - [ - -80.666921, - 35.048531 - ], - [ - -80.667006, - 35.048215 - ], - [ - -80.667071, - 35.047775 - ], - [ - -80.667049, - 35.047389 - ], - [ - -80.666964, - 35.046985 - ], - [ - -80.666813, - 35.046353 - ], - [ - -80.666599, - 35.045966 - ], - [ - -80.666406, - 35.045615 - ], - [ - -80.665998, - 35.045193 - ], - [ - -80.665526, - 35.044877 - ], - [ - -80.664989, - 35.044543 - ], - [ - -80.664496, - 35.044174 - ], - [ - -80.663852, - 35.043876 - ], - [ - -80.663037, - 35.043717 + "type": "Feature", + "properties": {}, + "geometry": { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [ + -80.660805, + 35.049392 + ] + }, + { + "type": "Polygon", + "coordinates": [ + [ + [ + -80.664582, + 35.044965 + ], + [ + -80.663874, + 35.04428 + ], + [ + -80.662586, + 35.04558 + ], + [ + -80.663444, + 35.046036 + ], + [ + -80.664582, + 35.044965 + ] + ] + ] + }, + { + "type": "LineString", + "coordinates": [ + [ + -80.662372, + 35.059509 + ], + [ + -80.662693, + 35.059263 + ], + [ + -80.662844, + 35.05893 + ], + [ + -80.66308, + 35.058332 + ], + [ + -80.663595, + 35.057753 + ], + [ + -80.663874, + 35.057401 + ], + [ + -80.66441, + 35.057033 + ], + [ + -80.664861, + 35.056787 + ], + [ + -80.665419, + 35.056506 + ], + [ + -80.665633, + 35.056312 + ], + [ + -80.666019, + 35.055891 + ], + [ + -80.666191, + 35.055452 + ], + [ + -80.666191, + 35.055171 + ], + [ + -80.666255, + 35.05489 + ], + [ + -80.666213, + 35.054222 + ], + [ + -80.666213, + 35.053924 + ], + [ + -80.665955, + 35.052905 + ], + [ + -80.665698, + 35.052044 + ], + [ + -80.665504, + 35.051482 + ], + [ + -80.665762, + 35.050481 + ], + [ + -80.66617, + 35.049725 + ], + [ + -80.666513, + 35.049286 + ], + [ + -80.666921, + 35.048531 + ], + [ + -80.667006, + 35.048215 + ], + [ + -80.667071, + 35.047775 + ], + [ + -80.667049, + 35.047389 + ], + [ + -80.666964, + 35.046985 + ], + [ + -80.666813, + 35.046353 + ], + [ + -80.666599, + 35.045966 + ], + [ + -80.666406, + 35.045615 + ], + [ + -80.665998, + 35.045193 + ], + [ + -80.665526, + 35.044877 + ], + [ + -80.664989, + 35.044543 + ], + [ + -80.664496, + 35.044174 + ], + [ + -80.663852, + 35.043876 + ], + [ + -80.663037, + 35.043717 + ] + ] + } ] - ] + } } ] } diff --git a/testing/indexer-test-core/src/main/resources/testData/index_records_3.schema.json b/testing/indexer-test-core/src/main/resources/testData/index_records_3.schema.json index bb5d2e9c5ce9fd0a376f6849028007b6d912da60..87bc4b647523c6ac0ab810853a94c3f0dba54976 100644 --- a/testing/indexer-test-core/src/main/resources/testData/index_records_3.schema.json +++ b/testing/indexer-test-core/src/main/resources/testData/index_records_3.schema.json @@ -2,11 +2,11 @@ "schemaInfo": { "schemaIdentity": { "authority": "tenant1", - "source": "indexer-int-test", - "entityType": "sample-schema-3", - "schemaVersionMajor": "1", + "source": "indexer", + "entityType": "test-data--Integration", + "schemaVersionMajor": "3", "schemaVersionMinor": "0", - "schemaVersionPatch": "4" + "schemaVersionPatch": "0" }, "status": "DEVELOPMENT" }, @@ -18,7 +18,7 @@ "type": "object", "properties": { "GeoShape": { - "$ref": "#/definitions/geoJsonFeatureCollection", + "$ref": "#/definitions/opendes:wks:AbstractFeatureCollection:1.0.0", "description": "The wellbore's position .", "format": "core:dl:geopoint:1.0.0", "title": "WGS 84 Position", @@ -31,6 +31,533 @@ } ] } + }, + "definitions": { + "opendes:wks:AbstractFeatureCollection:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractFeatureCollection:1.0.0", + "description": "GeoJSON feature collection as originally published in https://geojson.org/schema/FeatureCollection.json. Attention: the coordinate order is fixed: Longitude first, followed by Latitude, optionally height above MSL (EPSG:5714) as third coordinate.", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + }, + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractFeatureCollection.1.0.0.json" + } } } } \ No newline at end of file diff --git a/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.json b/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.json new file mode 100644 index 0000000000000000000000000000000000000000..de6e08dab7f12b7dc2fdc4a8108b87692694a9cb --- /dev/null +++ b/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.json @@ -0,0 +1,143 @@ +[ + { + "id": "tenant1:<kindSubType>:testIngest61<timestamp>", + "data": { + "NameAliases": [ + { + "AliasName": "1001", + "AliasNameTypeID": "osdu:reference-data--AliasNameType:UWI:" + }, + { + "AliasName": "AHM-01", + "AliasNameTypeID": "osdu:reference-data--AliasNameType:Borehole%20Code:" + }, + { + "AliasName": "ARNHEM-01", + "AliasNameTypeID": "osdu:reference-data--AliasNameType:Borehole:" + } + ], + "GeoContexts": [ + { + "GeoPoliticalEntityID": "osdu:master-data--GeoPoliticalEntity:Gelderland:", + "GeoTypeID": "osdu:reference-data--GeoPoliticalEntityType:Province:" + }, + { + "GeoPoliticalEntityID": "osdu:master-data--GeoPoliticalEntity:Lingewaard:", + "GeoTypeID": "osdu:reference-data--GeoPoliticalEntityType:Municipality:" + } + ], + "SpatialLocation": { + "AsIngestedCoordinates": { + "type": "AnyCrsFeatureCollection", + "CoordinateReferenceSystemID": "osdu:reference-data--CoordinateReferenceSystem:ED_1950_UTM_Zone_31N:", + "features": [ + { + "type": "AnyCrsFeature", + "geometry": { + "type": "AnyCrsPoint", + "coordinates": [ + 700113.0, + 5757315.0 + ] + }, + "properties": {} + } + ], + "persistableReferenceCrs": "" + }, + "Wgs84Coordinates": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 5.90929597, + 51.92868061 + ] + }, + "properties": {} + } + ] + } + }, + "InitialOperatorID": "osdu:master-data--Organisation:Bataafse%20Petroleum%20Maatschappij:", + "CurrentOperatorID": "osdu:master-data--Organisation:Nederlandse%20Aardolie%20Maatschappij%20B.V.:", + "OperatingEnvironmentID": "osdu:reference-data--OperatingEnvironment:ON:", + "FacilityStates": [ + { + "FacilityStateTypeID": "osdu:reference-data--FacilityStateType:Abandoned:" + } + ], + "FacilityEvents": [ + { + "FacilityEventTypeID": "osdu:reference-data--FacilityEventType:Drilling%20Start:", + "EffectiveDateTime": "1944-03-01T00:00:00" + }, + { + "FacilityEventTypeID": "osdu:reference-data--FacilityEventType:Drilling%20Finish:", + "EffectiveDateTime": "1944-10-02T00:00:00" + } + ], + "WellID": "osdu:master-data--Well:1001:", + "SequenceNumber": 1, + "VerticalMeasurements": [ + { + "VerticalMeasurementID": "TD-Original", + "VerticalMeasurement": 662.0, + "VerticalMeasurementTypeID": "osdu:reference-data--VerticalMeasurementType:Total%20Depth:", + "VerticalMeasurementPathID": "osdu:reference-data--VerticalMeasurementPath:Measured%20Depth:", + "VerticalMeasurementUnitOfMeasureID": "osdu:reference-data--UnitOfMeasure:M:", + "VerticalReferenceID": "Measured_From" + }, + { + "VerticalMeasurementID": "TVD", + "VerticalMeasurement": 662.0, + "VerticalMeasurementTypeID": "osdu:reference-data--VerticalMeasurementType:TD:", + "VerticalMeasurementPathID": "osdu:reference-data--VerticalMeasurementPath:True%20Vertical%20Depth:", + "VerticalMeasurementUnitOfMeasureID": "osdu:reference-data--UnitOfMeasure:M:", + "VerticalReferenceID": "Measured_From" + }, + { + "VerticalMeasurementID": "Measured_From", + "VerticalMeasurement": 11.01, + "VerticalMeasurementTypeID": "osdu:reference-data--VerticalMeasurementType:Rotary%20Table:", + "VerticalMeasurementPathID": "osdu:reference-data--VerticalMeasurementPath:Elevation:", + "VerticalMeasurementUnitOfMeasureID": "osdu:reference-data--UnitOfMeasure:M:", + "VerticalCRSID": "osdu:reference-data--CoordinateReferenceSystem:NAP:" + } + ], + "DrillingReasons": [ + { + "DrillingReasonTypeID": "osdu:reference-data--DrillingReasonType:EXP-HC:" + }, + { + "DrillingReasonTypeID": "osdu:reference-data--DrillingReasonType:Exploratie%20koolwaterstof:" + } + ], + "TrajectoryTypeID": "osdu:reference-data--WellboreTrajectoryType:Vertikaal:", + "PrimaryMaterialID": "osdu:reference-data--MaterialType:OIL:", + "ProjectedBottomHoleLocation": { + "AsIngestedCoordinates": { + "type": "AnyCrsFeatureCollection", + "CoordinateReferenceSystemID": "osdu:reference-data--CoordinateReferenceSystem:ED_1950_UTM_Zone_31N:", + "features": [ + { + "type": "AnyCrsFeature", + "geometry": { + "type": "AnyCrsPoint", + "coordinates": [ + 700113.0, + 5757315.0 + ] + }, + "properties": {} + } + ], + "persistableReferenceCrs": "" + } + } + } + } +] \ No newline at end of file diff --git a/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.schema.json b/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..0d69ae534698474cac255148334f09da4c08551e --- /dev/null +++ b/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.schema.json @@ -0,0 +1,2012 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "tenant1", + "source": "wks", + "entityType": "master-data--Wellbore", + "schemaVersionMajor": "2", + "schemaVersionMinor": "0", + "schemaVersionPatch": "3" + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:master-data--Test:1.0.0", + "description": "Enter a meaningful description for Test.", + "title": "Test", + "type": "object", + "x-osdu-review-status": "Pending", + "required": [ + "kind", + "acl", + "legal" + ], + "additionalProperties": false, + "definitions": { + "opendes:wks:AbstractGeoPoliticalContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoPoliticalContext:1.0.0", + "description": "A single, typed geo-political entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "x-osdu-review-status": "Accepted", + "title": "AbstractGeoPoliticalContext", + "type": "object", + "properties": { + "GeoPoliticalEntityID": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-GeoPoliticalEntity:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Reference to GeoPoliticalEntity.", + "x-osdu-relationship": [ + { + "EntityType": "GeoPoliticalEntity", + "GroupType": "master-data" + } + ], + "type": "string" + }, + "GeoTypeID": { + "x-osdu-is-derived": { + "RelationshipPropertyName": "GeoPoliticalEntityID", + "TargetPropertyName": "GeoPoliticalEntityTypeID" + }, + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-GeoPoliticalEntityType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The GeoPoliticalEntityType reference of the GeoPoliticalEntity (via GeoPoliticalEntityID) for application convenience.", + "x-osdu-relationship": [ + { + "EntityType": "GeoPoliticalEntityType", + "GroupType": "reference-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoPoliticalContext.1.0.0.json" + }, + "opendes:wks:AbstractCommonResources:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractCommonResources:1.0.0", + "description": "Common resources to be injected at root 'data' level for every entity, which is persistable in Storage. The insertion is performed by the OsduSchemaComposer script.", + "title": "OSDU Common Resources", + "type": "object", + "properties": { + "ResourceHomeRegionID": { + "x-osdu-relationship": [ + { + "EntityType": "OSDURegion", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-OSDURegion:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The name of the home [cloud environment] region for this OSDU resource object.", + "title": "Resource Home Region ID", + "type": "string" + }, + "ResourceHostRegionIDs": { + "description": "The name of the host [cloud environment] region(s) for this OSDU resource object.", + "title": "Resource Host Region ID", + "type": "array", + "items": { + "x-osdu-relationship": [ + { + "EntityType": "OSDURegion", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-OSDURegion:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "type": "string" + } + }, + "ResourceLifecycleStatus": { + "x-osdu-relationship": [ + { + "EntityType": "ResourceLifecycleStatus", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ResourceLifecycleStatus:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Describes the current Resource Lifecycle status.", + "title": "Resource Lifecycle Status", + "type": "string" + }, + "ResourceSecurityClassification": { + "x-osdu-relationship": [ + { + "EntityType": "ResourceSecurityClassification", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ResourceSecurityClassification:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Classifies the security level of the resource.", + "title": "Resource Security Classification", + "type": "string" + }, + "ResourceCurationStatus": { + "x-osdu-relationship": [ + { + "EntityType": "ResourceCurationStatus", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ResourceCurationStatus:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Describes the current Curation status.", + "title": "Resource Curation Status", + "type": "string" + }, + "ExistenceKind": { + "x-osdu-relationship": [ + { + "EntityType": "ExistenceKind", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ExistenceKind:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Where does this data resource sit in the cradle-to-grave span of its existence?", + "title": "Existence Kind", + "type": "string" + }, + "Source": { + "description": "The entity that produced the record, or from which it is received; could be an organization, agency, system, internal team, or individual. For informational purposes only, the list of sources is not governed.", + "title": "Data Source", + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractCommonResources.1.0.0.json" + }, + "opendes:wks:AbstractAliasNames:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractAliasNames:1.0.0", + "description": "A list of alternative names for an object. The preferred name is in a separate, scalar property. It may or may not be repeated in the alias list, though a best practice is to include it if the list is present, but to omit the list if there are no other names. Note that the abstract entity is an array so the $ref to it is a simple property reference.", + "x-osdu-review-status": "Accepted", + "title": "AbstractAliasNames", + "type": "object", + "properties": { + "AliasNameTypeID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-AliasNameType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "A classification of alias names such as by role played or type of source, such as regulatory name, regulatory code, company code, international standard name, etc.", + "x-osdu-relationship": [ + { + "EntityType": "AliasNameType", + "GroupType": "reference-data" + } + ], + "type": "string" + }, + "EffectiveDateTime": { + "format": "date-time", + "type": "string", + "description": "The date and time when an alias name becomes effective." + }, + "AliasName": { + "type": "string", + "description": "Alternative Name value of defined name type for an object." + }, + "TerminationDateTime": { + "format": "date-time", + "type": "string", + "description": "The data and time when an alias name is no longer in effect." + }, + "DefinitionOrganisationID": { + "pattern": "^[\\w\\-\\.]+:(reference-data\\-\\-StandardsOrganisation|master-data\\-\\-Organisation):[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The StandardsOrganisation (reference-data) or Organisation (master-data) that provided the name (the source).", + "x-osdu-relationship": [ + { + "EntityType": "StandardsOrganisation", + "GroupType": "reference-data" + }, + { + "EntityType": "Organisation", + "GroupType": "master-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractAliasNames.1.0.0.json" + }, + "opendes:wks:AbstractAnyCrsFeatureCollection:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractAnyCrsFeatureCollection:1.0.0", + "description": "A schema like GeoJSON FeatureCollection with a non-WGS 84 CRS context; based on https://geojson.org/schema/FeatureCollection.json. Attention: the coordinate order is fixed: Longitude/Easting/Westing/X first, followed by Latitude/Northing/Southing/Y, optionally height as third coordinate.", + "title": "AbstractAnyCrsFeatureCollection", + "type": "object", + "required": [ + "type", + "persistableReferenceCrs", + "features" + ], + "properties": { + "CoordinateReferenceSystemID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The CRS reference into the CoordinateReferenceSystem catalog.", + "x-osdu-relationship": [ + { + "EntityType": "CoordinateReferenceSystem", + "GroupType": "reference-data" + } + ], + "title": "Coordinate Reference System ID", + "type": "string", + "example": "namespace:reference-data--CoordinateReferenceSystem:BoundCRS.SLB.32021.15851:" + }, + "persistableReferenceCrs": { + "description": "The CRS reference as persistableReference string. If populated, the CoordinateReferenceSystemID takes precedence.", + "type": "string", + "title": "CRS Reference", + "example": "{\"lateBoundCRS\":{\"wkt\":\"PROJCS[\\\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Lambert_Conformal_Conic\\\"],PARAMETER[\\\"False_Easting\\\",2000000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-100.5],PARAMETER[\\\"Standard_Parallel_1\\\",46.1833333333333],PARAMETER[\\\"Standard_Parallel_2\\\",47.4833333333333],PARAMETER[\\\"Latitude_Of_Origin\\\",45.6666666666667],UNIT[\\\"Foot_US\\\",0.304800609601219],AUTHORITY[\\\"EPSG\\\",32021]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32021\"},\"type\":\"LBC\"},\"singleCT\":{\"wkt\":\"GEOGTRAN[\\\"NAD_1927_To_WGS_1984_79_CONUS\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"NADCON\\\"],PARAMETER[\\\"Dataset_conus\\\",0.0],AUTHORITY[\\\"EPSG\\\",15851]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_To_WGS_1984_79_CONUS\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"15851\"},\"type\":\"ST\"},\"ver\":\"PE_10_3_1\",\"name\":\"NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]\",\"authCode\":{\"auth\":\"SLB\",\"code\":\"32021079\"},\"type\":\"EBC\"}" + }, + "features": { + "type": "array", + "items": { + "title": "AnyCrsGeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "AnyCrsGeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "AnyCrsGeometryCollection" + ] + }, + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "AnyCrsGeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "AnyCrsGeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsMultiPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsFeature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "persistableReferenceUnitZ": { + "description": "The unit of measure for the Z-axis (only for 3-dimensional coordinates, where the CRS does not describe the vertical unit). Note that the direction is upwards positive, i.e. Z means height.", + "type": "string", + "title": "Z-Unit Reference", + "example": "{\"scaleOffset\":{\"scale\":1.0,\"offset\":0.0},\"symbol\":\"m\",\"baseMeasurement\":{\"ancestry\":\"Length\",\"type\":\"UM\"},\"type\":\"USO\"}" + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + }, + "persistableReferenceVerticalCrs": { + "description": "The VerticalCRS reference as persistableReference string. If populated, the VerticalCoordinateReferenceSystemID takes precedence. The property is null or empty for 2D geometries. For 3D geometries and absent or null persistableReferenceVerticalCrs the vertical CRS is either provided via persistableReferenceCrs's CompoundCRS or it is implicitly defined as EPSG:5714 MSL height.", + "type": "string", + "title": "Vertical CRS Reference", + "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"5773\"},\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"name\":\"EGM96_Geoid\",\"wkt\":\"VERTCS[\\\"EGM96_Geoid\\\",VDATUM[\\\"EGM96_Geoid\\\"],PARAMETER[\\\"Vertical_Shift\\\",0.0],PARAMETER[\\\"Direction\\\",1.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",5773]]\"}" + }, + "type": { + "type": "string", + "enum": [ + "AnyCrsFeatureCollection" + ] + }, + "VerticalCoordinateReferenceSystemID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The explicit VerticalCRS reference into the CoordinateReferenceSystem catalog. This property stays empty for 2D geometries. Absent or empty values for 3D geometries mean the context may be provided by a CompoundCRS in 'CoordinateReferenceSystemID' or implicitly EPSG:5714 MSL height", + "x-osdu-relationship": [ + { + "EntityType": "CoordinateReferenceSystem", + "GroupType": "reference-data" + } + ], + "title": "Vertical Coordinate Reference System ID", + "type": "string", + "example": "namespace:reference-data--CoordinateReferenceSystem:VerticalCRS.EPSG.5773:" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractAnyCrsFeatureCollection.1.0.0.json" + }, + "opendes:wks:AbstractMetaItem:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "oneOf": [ + { + "title": "FrameOfReferenceUOM", + "type": "object", + "properties": { + "persistableReference": { + "description": "The self-contained, persistable reference string uniquely identifying the Unit.", + "title": "UOM Persistable Reference", + "type": "string", + "example": "{\"abcd\":{\"a\":0.0,\"b\":1200.0,\"c\":3937.0,\"d\":0.0},\"symbol\":\"ft[US]\",\"baseMeasurement\":{\"ancestry\":\"L\",\"type\":\"UM\"},\"type\":\"UAD\"}" + }, + "kind": { + "const": "Unit", + "description": "The kind of reference, 'Unit' for FrameOfReferenceUOM.", + "title": "UOM Reference Kind" + }, + "propertyNames": { + "description": "The list of property names, to which this meta data item provides Unit context to. Data structures, which come in a single frame of reference, can register the property name, others require a full path like \"Data.StructureA.PropertyB\" to define a unique context.", + "title": "UOM Property Names", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "HorizontalDeflection.EastWest", + "HorizontalDeflection.NorthSouth" + ] + }, + "name": { + "description": "The unit symbol or name of the unit.", + "title": "UOM Unit Symbol", + "type": "string", + "example": "ft[US]" + }, + "unitOfMeasureID": { + "x-osdu-relationship": [ + { + "EntityType": "UnitOfMeasure", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "SRN to unit of measure reference.", + "type": "string", + "example": "namespace:reference-data--UnitOfMeasure:ftUS:" + } + }, + "required": [ + "kind", + "persistableReference" + ] + }, + { + "title": "FrameOfReferenceCRS", + "type": "object", + "properties": { + "coordinateReferenceSystemID": { + "x-osdu-relationship": [ + { + "EntityType": "CoordinateReferenceSystem", + "GroupType": "reference-data" + } + ], + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "SRN to CRS reference.", + "type": "string", + "example": "namespace:reference-data--CoordinateReferenceSystem:EPSG.32615:" + }, + "persistableReference": { + "description": "The self-contained, persistable reference string uniquely identifying the CRS.", + "title": "CRS Persistable Reference", + "type": "string", + "example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32615\"},\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"name\":\"WGS_1984_UTM_Zone_15N\",\"wkt\":\"PROJCS[\\\"WGS_1984_UTM_Zone_15N\\\",GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Transverse_Mercator\\\"],PARAMETER[\\\"False_Easting\\\",500000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-93.0],PARAMETER[\\\"Scale_Factor\\\",0.9996],PARAMETER[\\\"Latitude_Of_Origin\\\",0.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",32615]]\"}" + }, + "kind": { + "const": "CRS", + "description": "The kind of reference, constant 'CRS' for FrameOfReferenceCRS.", + "title": "CRS Reference Kind" + }, + "propertyNames": { + "description": "The list of property names, to which this meta data item provides CRS context to. Data structures, which come in a single frame of reference, can register the property name, others require a full path like \"Data.StructureA.PropertyB\" to define a unique context.", + "title": "CRS Property Names", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "KickOffPosition.X", + "KickOffPosition.Y" + ] + }, + "name": { + "description": "The name of the CRS.", + "title": "CRS Name", + "type": "string", + "example": "NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]" + } + }, + "required": [ + "kind", + "persistableReference" + ] + }, + { + "title": "FrameOfReferenceDateTime", + "type": "object", + "properties": { + "persistableReference": { + "description": "The self-contained, persistable reference string uniquely identifying DateTime reference.", + "title": "DateTime Persistable Reference", + "type": "string", + "example": "{\"format\":\"yyyy-MM-ddTHH:mm:ssZ\",\"timeZone\":\"UTC\",\"type\":\"DTM\"}" + }, + "kind": { + "const": "DateTime", + "description": "The kind of reference, constant 'DateTime', for FrameOfReferenceDateTime.", + "title": "DateTime Reference Kind" + }, + "propertyNames": { + "description": "The list of property names, to which this meta data item provides DateTime context to. Data structures, which come in a single frame of reference, can register the property name, others require a full path like \"Data.StructureA.PropertyB\" to define a unique context.", + "title": "DateTime Property Names", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Acquisition.StartTime", + "Acquisition.EndTime" + ] + }, + "name": { + "description": "The name of the DateTime format and reference.", + "title": "DateTime Name", + "type": "string", + "example": "UTC" + } + }, + "required": [ + "kind", + "persistableReference" + ] + }, + { + "title": "FrameOfReferenceAzimuthReference", + "type": "object", + "properties": { + "persistableReference": { + "description": "The self-contained, persistable reference string uniquely identifying AzimuthReference.", + "title": "AzimuthReference Persistable Reference", + "type": "string", + "example": "{\"code\":\"TrueNorth\",\"type\":\"AZR\"}" + }, + "kind": { + "const": "AzimuthReference", + "description": "The kind of reference, constant 'AzimuthReference', for FrameOfReferenceAzimuthReference.", + "title": "AzimuthReference Reference Kind" + }, + "propertyNames": { + "description": "The list of property names, to which this meta data item provides AzimuthReference context to. Data structures, which come in a single frame of reference, can register the property name, others require a full path like \"Data.StructureA.PropertyB\" to define a unique context.", + "title": "AzimuthReference Property Names", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Bearing" + ] + }, + "name": { + "description": "The name of the CRS or the symbol/name of the unit.", + "title": "AzimuthReference Name", + "type": "string", + "example": "TrueNorth" + } + }, + "required": [ + "kind", + "persistableReference" + ] + } + ], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractMetaItem:1.0.0", + "description": "A meta data item, which allows the association of named properties or property values to a Unit/Measurement/CRS/Azimuth/Time context.", + "title": "Frame of Reference Meta Data Item", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractMetaItem.1.0.0.json" + }, + "opendes:wks:AbstractGeoContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "oneOf": [ + { + "$ref": "#/definitions/opendes:wks:AbstractGeoPoliticalContext:1.0.0" + }, + { + "$ref": "#/definitions/opendes:wks:AbstractGeoBasinContext:1.0.0" + }, + { + "$ref": "#/definitions/opendes:wks:AbstractGeoFieldContext:1.0.0" + }, + { + "$ref": "#/definitions/opendes:wks:AbstractGeoPlayContext:1.0.0" + }, + { + "$ref": "#/definitions/opendes:wks:AbstractGeoProspectContext:1.0.0" + } + ], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoContext:1.0.0", + "description": "A geographic context to an entity. It can be either a reference to a GeoPoliticalEntity, Basin, Field, Play or Prospect.", + "title": "AbstractGeoContext", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoContext.1.0.0.json" + }, + "opendes:wks:AbstractLegalTags:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractLegalTags:1.0.0", + "description": "Legal meta data like legal tags, relevant other countries, legal status. This structure is included by the SystemProperties \"legal\", which is part of all OSDU records. Not extensible.", + "additionalProperties": false, + "title": "Legal Meta Data", + "type": "object", + "properties": { + "legaltags": { + "description": "The list of legal tags, which resolve to legal properties (like country of origin, export classification code, etc.) and rules with the help of the Compliance Service.", + "title": "Legal Tags", + "type": "array", + "items": { + "type": "string" + } + }, + "otherRelevantDataCountries": { + "description": "The list of other relevant data countries as an array of two-letter country codes, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2.", + "title": "Other Relevant Data Countries", + "type": "array", + "items": { + "pattern": "^[A-Z]{2}$", + "type": "string" + } + }, + "status": { + "pattern": "^(compliant|uncompliant)$", + "description": "The legal status. Set by the system after evaluation against the compliance rules associated with the \"legaltags\" using the Compliance Service.", + "title": "Legal Status", + "type": "string" + } + }, + "required": [ + "legaltags", + "otherRelevantDataCountries" + ], + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractLegalTags.1.0.0.json" + }, + "opendes:wks:AbstractGeoBasinContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoBasinContext:1.0.0", + "description": "A single, typed basin entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "x-osdu-review-status": "Accepted", + "title": "AbstractGeoBasinContext", + "type": "object", + "properties": { + "BasinID": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Basin:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Reference to Basin.", + "x-osdu-relationship": [ + { + "EntityType": "Basin", + "GroupType": "master-data" + } + ], + "type": "string" + }, + "GeoTypeID": { + "x-osdu-is-derived": { + "RelationshipPropertyName": "BasinID", + "TargetPropertyName": "BasinTypeID" + }, + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-BasinType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The BasinType reference of the Basin (via BasinID) for application convenience.", + "x-osdu-relationship": [ + { + "EntityType": "BasinType", + "GroupType": "reference-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoBasinContext.1.0.0.json" + }, + "opendes:wks:AbstractMaster:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractMaster:1.0.0", + "description": "Properties shared with all master-data schema instances.", + "x-osdu-review-status": "Accepted", + "title": "Abstract Master", + "type": "object", + "properties": { + "NameAliases": { + "description": "Alternative names, including historical, by which this master data is/has been known (it should include all the identifiers).", + "type": "array", + "items": { + "$ref": "#/definitions/opendes:wks:AbstractAliasNames:1.0.0" + } + }, + "SpatialLocation": { + "description": "The spatial location information such as coordinates, CRS information (left empty when not appropriate).", + "$ref": "#/definitions/opendes:wks:AbstractSpatialLocation:1.0.0" + }, + "VersionCreationReason": { + "description": "This describes the reason that caused the creation of a new version of this master data.", + "type": "string" + }, + "GeoContexts": { + "description": "List of geographic entities which provide context to the master data. This may include multiple types or multiple values of the same type.", + "type": "array", + "items": { + "$ref": "#/definitions/opendes:wks:AbstractGeoContext:1.0.0" + } + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractMaster.1.0.0.json" + }, + "opendes:wks:AbstractGeoProspectContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoProspectContext:1.0.0", + "description": "A single, typed Prospect entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "x-osdu-review-status": "Accepted", + "title": "AbstractGeoProspectContext", + "type": "object", + "properties": { + "ProspectID": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Prospect:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Reference to the prospect.", + "x-osdu-relationship": [ + { + "EntityType": "Prospect", + "GroupType": "master-data" + } + ], + "type": "string" + }, + "GeoTypeID": { + "x-osdu-is-derived": { + "RelationshipPropertyName": "ProspectID", + "TargetPropertyName": "ProspectTypeID" + }, + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-ProspectType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The ProspectType reference of the Prospect (via ProspectID) for application convenience.", + "x-osdu-relationship": [ + { + "EntityType": "ProspectType", + "GroupType": "reference-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoProspectContext.1.0.0.json" + }, + "opendes:wks:AbstractSpatialLocation:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractSpatialLocation:1.0.0", + "description": "A geographic object which can be described by a set of points.", + "title": "AbstractSpatialLocation", + "type": "object", + "properties": { + "AsIngestedCoordinates": { + "description": "The original or 'as ingested' coordinates (Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon). The name 'AsIngestedCoordinates' was chosen to contrast it to 'OriginalCoordinates', which carries the uncertainty whether any coordinate operations took place before ingestion. In cases where the original CRS is different from the as-ingested CRS, the OperationsApplied can also contain the list of operations applied to the coordinate prior to ingestion. The data structure is similar to GeoJSON FeatureCollection, however in a CRS context explicitly defined within the AbstractAnyCrsFeatureCollection. The coordinate sequence follows GeoJSON standard, i.e. 'eastward/longitude', 'northward/latitude' {, 'upward/height' unless overridden by an explicit direction in the AsIngestedCoordinates.VerticalCoordinateReferenceSystemID}.", + "x-osdu-frame-of-reference": "CRS:", + "title": "As Ingested Coordinates", + "$ref": "#/definitions/opendes:wks:AbstractAnyCrsFeatureCollection:1.0.0" + }, + "SpatialParameterTypeID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SpatialParameterType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "A type of spatial representation of an object, often general (e.g. an Outline, which could be applied to Field, Reservoir, Facility, etc.) or sometimes specific (e.g. Onshore Outline, State Offshore Outline, Federal Offshore Outline, 3 spatial representations that may be used by Countries).", + "x-osdu-relationship": [ + { + "EntityType": "SpatialParameterType", + "GroupType": "reference-data" + } + ], + "type": "string" + }, + "QuantitativeAccuracyBandID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-QuantitativeAccuracyBand:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "An approximate quantitative assessment of the quality of a location (accurate to > 500 m (i.e. not very accurate)), to < 1 m, etc.", + "x-osdu-relationship": [ + { + "EntityType": "QuantitativeAccuracyBand", + "GroupType": "reference-data" + } + ], + "type": "string" + }, + "CoordinateQualityCheckRemarks": { + "type": "array", + "description": "Freetext remarks on Quality Check.", + "items": { + "type": "string" + } + }, + "AppliedOperations": { + "description": "The audit trail of operations applied to the coordinates from the original state to the current state. The list may contain operations applied prior to ingestion as well as the operations applied to produce the Wgs84Coordinates. The text elements refer to ESRI style CRS and Transformation names, which may have to be translated to EPSG standard names.", + "title": "Operations Applied", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "conversion from ED_1950_UTM_Zone_31N to GCS_European_1950; 1 points converted", + "transformation GCS_European_1950 to GCS_WGS_1984 using ED_1950_To_WGS_1984_24; 1 points successfully transformed" + ] + }, + "QualitativeSpatialAccuracyTypeID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-QualitativeSpatialAccuracyType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "A qualitative description of the quality of a spatial location, e.g. unverifiable, not verified, basic validation.", + "x-osdu-relationship": [ + { + "EntityType": "QualitativeSpatialAccuracyType", + "GroupType": "reference-data" + } + ], + "type": "string" + }, + "CoordinateQualityCheckPerformedBy": { + "type": "string", + "description": "The user who performed the Quality Check." + }, + "SpatialLocationCoordinatesDate": { + "format": "date-time", + "description": "Date when coordinates were measured or retrieved.", + "x-osdu-frame-of-reference": "DateTime", + "type": "string" + }, + "CoordinateQualityCheckDateTime": { + "format": "date-time", + "description": "The date of the Quality Check.", + "x-osdu-frame-of-reference": "DateTime", + "type": "string" + }, + "Wgs84Coordinates": { + "title": "WGS 84 Coordinates", + "description": "The normalized coordinates (Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon) based on WGS 84 (EPSG:4326 for 2-dimensional coordinates, EPSG:4326 + EPSG:5714 (MSL) for 3-dimensional coordinates). This derived coordinate representation is intended for global discoverability only. The schema of this substructure is identical to the GeoJSON FeatureCollection https://geojson.org/schema/FeatureCollection.json. The coordinate sequence follows GeoJSON standard, i.e. longitude, latitude {, height}", + "$ref": "#/definitions/opendes:wks:AbstractFeatureCollection:1.0.0" + }, + "SpatialGeometryTypeID": { + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-SpatialGeometryType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Indicates the expected look of the SpatialParameterType, e.g. Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon. The value constrains the type of geometries in the GeoJSON Wgs84Coordinates and AsIngestedCoordinates.", + "x-osdu-relationship": [ + { + "EntityType": "SpatialGeometryType", + "GroupType": "reference-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractSpatialLocation.1.0.0.json" + }, + "opendes:wks:AbstractGeoFieldContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoFieldContext:1.0.0", + "description": "A single, typed field entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "title": "AbstractGeoFieldContext", + "type": "object", + "properties": { + "FieldID": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Field:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Reference to Field.", + "x-osdu-relationship": [ + { + "EntityType": "Field", + "GroupType": "master-data" + } + ], + "type": "string" + }, + "GeoTypeID": { + "const": "Field", + "description": "The fixed type 'Field' for this AbstractGeoFieldContext." + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoFieldContext.1.0.0.json" + }, + "opendes:wks:AbstractFeatureCollection:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractFeatureCollection:1.0.0", + "description": "GeoJSON feature collection as originally published in https://geojson.org/schema/FeatureCollection.json. Attention: the coordinate order is fixed: Longitude first, followed by Latitude, optionally height above MSL (EPSG:5714) as third coordinate.", + "title": "GeoJSON FeatureCollection", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "required": [ + "type", + "properties", + "geometry" + ], + "properties": { + "geometry": { + "oneOf": [ + { + "type": "null" + }, + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON GeometryCollection", + "type": "object", + "required": [ + "type", + "geometries" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "GeometryCollection" + ] + }, + "geometries": { + "type": "array", + "items": { + "oneOf": [ + { + "title": "GeoJSON Point", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "type": { + "type": "string", + "enum": [ + "Point" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON LineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "LineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON Polygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPoint", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiLineString", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + }, + { + "title": "GeoJSON MultiPolygon", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "minItems": 4, + "type": "array", + "items": { + "minItems": 2, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, + "properties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + } + ] + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "bbox": { + "minItems": 4, + "type": "array", + "items": { + "type": "number" + } + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractFeatureCollection.1.0.0.json" + }, + "opendes:wks:AbstractAccessControlList:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractAccessControlList:1.0.0", + "description": "The access control tags associated with this entity. This structure is included by the SystemProperties \"acl\", which is part of all OSDU records. Not extensible.", + "additionalProperties": false, + "title": "Access Control List", + "type": "object", + "properties": { + "viewers": { + "description": "The list of viewers to which this data record is accessible/visible/discoverable formatted as an email (core.common.model.storage.validation.ValidationDoc.EMAIL_REGEX).", + "title": "List of Viewers", + "type": "array", + "items": { + "pattern": "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$", + "type": "string" + } + }, + "owners": { + "description": "The list of owners of this data record formatted as an email (core.common.model.storage.validation.ValidationDoc.EMAIL_REGEX).", + "title": "List of Owners", + "type": "array", + "items": { + "pattern": "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$", + "type": "string" + } + } + }, + "required": [ + "owners", + "viewers" + ], + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractAccessControlList.1.0.0.json" + }, + "opendes:wks:AbstractGeoPlayContext:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractGeoPlayContext:1.0.0", + "description": "A single, typed Play entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "x-osdu-review-status": "Accepted", + "title": "AbstractGeoPlayContext", + "type": "object", + "properties": { + "PlayID": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Play:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "Reference to the play.", + "x-osdu-relationship": [ + { + "EntityType": "Play", + "GroupType": "master-data" + } + ], + "type": "string" + }, + "GeoTypeID": { + "x-osdu-is-derived": { + "RelationshipPropertyName": "PlayID", + "TargetPropertyName": "PlayTypeID" + }, + "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-PlayType:[\\w\\-\\.\\:\\%]+:[0-9]*$", + "description": "The PlayType reference of the Play (via PlayID) for application convenience.", + "x-osdu-relationship": [ + { + "EntityType": "PlayType", + "GroupType": "reference-data" + } + ], + "type": "string" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoPlayContext.1.0.0.json" + }, + "opendes:wks:AbstractLegalParentList:1.0.0": { + "x-osdu-inheriting-from-kind": [], + "x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-osdu-schema-source": "osdu:wks:AbstractLegalParentList:1.0.0", + "description": "A list of entity IDs in the data ecosystem, which act as legal parents to the current entity. This structure is included by the SystemProperties \"ancestry\", which is part of all OSDU records. Not extensible.", + "additionalProperties": false, + "title": "Parent List", + "type": "object", + "properties": { + "parents": { + "description": "An array of none, one or many entity references in the data ecosystem, which identify the source of data in the legal sense. In contract to other relationships, the source record version is required. Example: the 'parents' will be queried when e.g. the subscription of source data services is terminated; access to the derivatives is also terminated.", + "title": "Parents", + "type": "array", + "items": { + "x-osdu-relationship": [], + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.\\:\\%]+:[0-9]+$", + "type": "string" + }, + "example": [] + } + }, + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractLegalParentList.1.0.0.json" + } + }, + "properties": { + "ancestry": { + "description": "The links to data, which constitute the inputs.", + "title": "Ancestry", + "$ref": "#/definitions/opendes:wks:AbstractLegalParentList:1.0.0" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/opendes:wks:AbstractCommonResources:1.0.0" + }, + { + "$ref": "#/definitions/opendes:wks:AbstractMaster:1.0.0" + }, + { + "type": "object", + "properties": {} + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object" + } + } + } + ] + }, + "kind": { + "pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$", + "description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "example": "osdu:wks:master-data--Test:1.0.0" + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "#/definitions/opendes:wks:AbstractAccessControlList:1.0.0" + }, + "version": { + "format": "int64", + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "example": 1562066009929332 + }, + "tags": { + "description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.", + "additionalProperties": { + "type": "string" + }, + "title": "Tag Dictionary", + "type": "object", + "example": { + "NameOfKey": "String value" + } + }, + "modifyUser": { + "description": "The user reference, which created this version of this resource object. Set by the System.", + "title": "Resource Object Version Creation User Reference", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "modifyTime": { + "format": "date-time", + "description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Version Creation DateTime", + "type": "string", + "example": "2020-12-16T11:52:24.477Z" + }, + "createTime": { + "format": "date-time", + "description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.", + "title": "Resource Object Creation DateTime", + "type": "string", + "example": "2020-12-16T11:46:20.163Z" + }, + "meta": { + "description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "#/definitions/opendes:wks:AbstractMetaItem:1.0.0" + } + }, + "legal": { + "description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.", + "title": "Legal Tags", + "$ref": "#/definitions/opendes:wks:AbstractLegalTags:1.0.0" + }, + "createUser": { + "description": "The user reference, which created the first version of this resource object. Set by the System.", + "title": "Resource Object Creation User Reference", + "type": "string", + "example": "some-user@some-company-cloud.com" + }, + "id": { + "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Test:[\\w\\-\\.\\:\\%]+$", + "description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "example": "namespace:master-data--Test:ded98862-efe4-5517-a509-d99f4b941b20" + } + }, + "$id": "https://schema.osdu.opengroup.org/json/master-data/Test.1.0.0.json" + } +} \ No newline at end of file diff --git a/testing/indexer-test-gcp/pom.xml b/testing/indexer-test-gcp/pom.xml index 1f5f6b253efa1ab964b953f82112f6a213c33d86..cbefb50737b58238b5869cd65c159d45d515f67a 100644 --- a/testing/indexer-test-gcp/pom.xml +++ b/testing/indexer-test-gcp/pom.xml @@ -37,7 +37,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.8.0-SNAPSHOT</version> + <version>0.8.1-SNAPSHOT</version> </dependency> <!-- Cucumber --> diff --git a/testing/indexer-test-ibm/pom.xml b/testing/indexer-test-ibm/pom.xml index 21f69f828a8594c105ebe37e16e3c0c7e0e791c5..af1fd0eec5e992c8b1ad8d8c35b75d0f6d73c413 100644 --- a/testing/indexer-test-ibm/pom.xml +++ b/testing/indexer-test-ibm/pom.xml @@ -19,7 +19,7 @@ <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source> <cucumber.version>1.2.5</cucumber.version> - <os-core-lib-ibm.version>0.3.8-SNAPSHOT</os-core-lib-ibm.version> + <os-core-lib-ibm.version>0.7.0</os-core-lib-ibm.version> </properties> <dependencies> @@ -38,7 +38,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.8.0-SNAPSHOT</version> + <version>0.8.1-SNAPSHOT</version> </dependency> <dependency>