From 341e80ce281338846b205f32098a30819b17f9c0 Mon Sep 17 00:00:00 2001 From: Neelesh Thakur Date: Sun, 14 Mar 2021 14:28:39 -0500 Subject: [PATCH 01/14] add support for featurecollection --- .../osdu/indexer/model/geojson/Feature.java | 26 + .../model/geojson/FeatureCollection.java | 31 + .../indexer/model/geojson/GeoJsonObject.java | 22 + .../osdu/indexer/model/geojson/Geometry.java | 31 + .../model/geojson/GeometryCollection.java | 23 + .../indexer/model/geojson/LineString.java | 11 + .../model/geojson/MultiLineString.java | 13 + .../indexer/model/geojson/MultiPoint.java | 11 + .../indexer/model/geojson/MultiPolygon.java | 18 + .../osdu/indexer/model/geojson/Point.java | 21 + .../osdu/indexer/model/geojson/Polygon.java | 59 ++ .../osdu/indexer/model/geojson/Position.java | 56 + .../jackson/FeatureCollectionSerializer.java | 67 ++ .../geojson/jackson/PositionDeserializer.java | 53 + .../geojson/jackson/PositionSerializer.java | 22 + .../service/AttributeParsingServiceImpl.java | 7 +- .../indexer/util/parser/GeoShapeParser.java | 53 +- .../AttributeParsingServiceImplTest.java | 2 +- .../util/parser/GeoShapeParserTest.java | 62 +- .../resources/testData/index_records_3.json | 977 ++++++++++-------- 20 files changed, 1039 insertions(+), 526 deletions(-) create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Feature.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/FeatureCollection.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/GeoJsonObject.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Geometry.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/GeometryCollection.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/LineString.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiLineString.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiPoint.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiPolygon.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Point.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Polygon.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Position.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/FeatureCollectionSerializer.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/PositionDeserializer.java create mode 100644 indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/PositionSerializer.java 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 00000000..7c429e71 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Feature.java @@ -0,0 +1,26 @@ +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 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 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 00000000..c8c84a76 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/FeatureCollection.java @@ -0,0 +1,31 @@ +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 { + + private List features = new ArrayList(); + + public FeatureCollection add(Feature feature) { + features.add(feature); + return this; + } + + public void addAll(Collection features) { + this.features.addAll(features); + } + + @Override + public Iterator 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 00000000..9ba2ee3f --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/GeoJsonObject.java @@ -0,0 +1,22 @@ +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 00000000..f061161d --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Geometry.java @@ -0,0 +1,31 @@ +package org.opengroup.osdu.indexer.model.geojson; + +import java.util.ArrayList; +import java.util.List; + +public abstract class Geometry extends GeoJsonObject { + + protected List coordinates = new ArrayList(); + + public Geometry() { + } + + public Geometry(T... elements) { + for (T coordinate : elements) { + coordinates.add(coordinate); + } + } + + public Geometry add(T elements) { + coordinates.add(elements); + return this; + } + + public List getCoordinates() { + return coordinates; + } + + public void setCoordinates(List 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 00000000..a4159116 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/GeometryCollection.java @@ -0,0 +1,23 @@ +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 { + + private List geometries = new ArrayList(); + + @Override + public Iterator 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 00000000..a2692ec7 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/LineString.java @@ -0,0 +1,11 @@ +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 00000000..701dabd5 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiLineString.java @@ -0,0 +1,13 @@ +package org.opengroup.osdu.indexer.model.geojson; + +import lombok.NoArgsConstructor; + +import java.util.List; + +@NoArgsConstructor +public class MultiLineString extends Geometry> { + + public MultiLineString(List 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 00000000..4c44e084 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiPoint.java @@ -0,0 +1,11 @@ +package org.opengroup.osdu.indexer.model.geojson; + +import lombok.NoArgsConstructor; + +@NoArgsConstructor +public class MultiPoint extends Geometry { + + 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 00000000..f223b209 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/MultiPolygon.java @@ -0,0 +1,18 @@ +package org.opengroup.osdu.indexer.model.geojson; + +import lombok.NoArgsConstructor; + +import java.util.List; + +@NoArgsConstructor +public class MultiPolygon extends Geometry>> { + + 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 00000000..429b08de --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Point.java @@ -0,0 +1,21 @@ +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 00000000..f1f9e001 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Polygon.java @@ -0,0 +1,59 @@ +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> { + + public Polygon(List polygon) { + add(polygon); + } + + public Polygon(Position... polygon) { + add(Arrays.asList(polygon)); + } + + public void setExteriorRing(List points) { + if (coordinates.isEmpty()) { + coordinates.add(0, points); + } else { + coordinates.set(0, points); + } + } + + @JsonIgnore + public List getExteriorRing() { + assertExteriorRing(); + return coordinates.get(0); + } + + @JsonIgnore + public List> getInteriorRings() { + assertExteriorRing(); + return coordinates.subList(1, coordinates.size()); + } + + public List getInteriorRing(int index) { + assertExteriorRing(); + return coordinates.get(1 + index); + } + + public void addInteriorRing(List 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 00000000..1c9a5840 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/Position.java @@ -0,0 +1,56 @@ +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 00000000..24820209 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/FeatureCollectionSerializer.java @@ -0,0 +1,67 @@ +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 { + + @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 00000000..d837e09e --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/PositionDeserializer.java @@ -0,0 +1,53 @@ +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 { + + @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 00000000..909482d6 --- /dev/null +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/geojson/jackson/PositionSerializer.java @@ -0,0 +1,22 @@ +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 { + + @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/service/AttributeParsingServiceImpl.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/AttributeParsingServiceImpl.java index fae0b4e6..733408ab 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 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 9532e498..8bd6ec83 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 geoShapeObject) { + private ObjectMapper mapper = new ObjectMapper(); - Preconditions.checkNotNull(geoShapeObject, "geoShapeObject cannot be null"); + public Map parseGeoJson(Map 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>() { + }); + } 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 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/service/AttributeParsingServiceImplTest.java b/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/AttributeParsingServiceImplTest.java index 5db76eb0..67362f02 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 storageData = new HashMap<>(); storageData.put("location", parseJson(shapeJson)); - when(this.geoShapeParser.parseGeoJson(storageData)).thenReturn(""); + when(this.geoShapeParser.parseGeoJson(storageData)).thenReturn(new HashMap<>()); Map 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 8c1d36fe..2e34f70c 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, String> parser, String shapeJson, String errorMessage) { + private void validateInput(Function, Map> parser, String shapeJson, String errorMessage) { try { Type type = new TypeToken>() {}.getType(); Map shapeObj = new Gson().fromJson(shapeJson, type); - String parsedShape = parser.apply(shapeObj); + Map 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/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 983e7bdb..58a7e0de 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 + ] + ] + } ] - ] + } } ] } -- GitLab From 7bd90d62584ec9f2069f74b4ab81ba3502cd8ce1 Mon Sep 17 00:00:00 2001 From: neelesh thakur Date: Wed, 17 Mar 2021 15:19:42 -0500 Subject: [PATCH 02/14] use version in schema for AbstractFeatureCollection --- .../schema/converter/PropertiesProcessor.java | 49 +- .../SchemaConverterPropertiesConfig.java | 8 +- .../osdu/indexer/schema/converter/readme.md | 32 +- .../converter/PropertiesProcessorTest.java | 6 +- .../SchemaToStorageFormatImplTest.java | 5 + .../resources/converter/basic/schema.json | 84 +- .../converter/basic/test-schema.json | 1999 +++++++++++++++++ .../integration-tests/index_records_1.schema | 2 +- .../integration-tests/index_records_2.schema | 2 +- .../integration-tests/index_records_3.schema | 2 +- .../new-definitions-format/colons-sample.json | 1999 +++++++++++++++++ .../colons-sample.json.res | 77 + .../tags/allOf/allOf-inside-allOf.json | 16 +- .../tags/allOf/allOf-inside-property.json | 4 +- .../converter/tags/allOf/indefinitions.json | 8 +- .../converter/tags/anyOf/indefinitions.json | 8 +- .../converter/tags/mixAllAnyOneOf/mix.json | 16 +- .../converter/tags/oneOf/indefinitions.json | 8 +- .../converter/wks/slb_wke_wellbore.json | 140 +- .../indexRecord-schema-service.feature | 16 +- .../testData/index_records_1.schema.json | 4 +- .../testData/index_records_2.schema.json | 4 +- .../testData/index_records_3.schema.json | 4 +- 23 files changed, 4303 insertions(+), 190 deletions(-) create mode 100644 indexer-core/src/test/resources/converter/basic/test-schema.json create mode 100644 indexer-core/src/test/resources/converter/new-definitions-format/colons-sample.json create mode 100644 indexer-core/src/test/resources/converter/new-definitions-format/colons-sample.json.res 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 d98b1f77..57c2cae2 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,26 @@ public class PropertiesProcessor { return processProperties(definition.getProperties()); } + private String getDefinitionIdentity(String definitionSubRef) { + String[] components = definitionSubRef.split(":"); + if (components.length < 4) { + throw new AppException(HttpStatus.SC_CONFLICT, "Wrong definition format:" + definitionSubRef, + "Wrong definition format:" + definitionSubRef); + } + + return components[2]; + } + + private String getDefinitionColonVersion(String definitionSubRef) { + String[] components = definitionSubRef.split(":"); + if (components.length < 4) { + throw new AppException(HttpStatus.SC_CONFLICT, "Wrong definition format:" + definitionSubRef, + "Wrong definition format:" + definitionSubRef); + } + + return ":" + components[3]; + } + private Stream> processOfItems(List allOf, List anyOf, List oneOf) { Stream> ofItems = null; @@ -119,7 +144,7 @@ public class PropertiesProcessor { return ofItems; } - public Stream> processProperties(Map properties){ + public Stream> processProperties(Map properties) { return properties.entrySet().stream().flatMap(this::processPropertyEntry); } @@ -175,7 +200,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 +232,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 +244,20 @@ public class PropertiesProcessor { private Supplier getFromItemsPattern(Supplier 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 getFromType(Supplier typeSupplier) { - return () -> { + return () -> { String type = typeSupplier.get(); return schemaConverterConfig.getPrimitiveTypesMap().getOrDefault(type, type); }; } - private Supplier getFromFormat(Supplier formatSupplier){ - return () -> { + private Supplier getFromFormat(Supplier 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 f530c842..beab91b1 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 primitiveTypesMap = getDefaultPrimitiveTypesMap(); private Set 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 getDefaultSpecialDefinitionsMap() { Map 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 3b5e146c..aafac004 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 @@ -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 +``` + +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" } } @@ -310,14 +318,14 @@ For instance ```json { "definitions": { - "wellboreData1": { + "opendes:wks:wellboreData1:1.0.0": { "properties": { "prop1": { "type": "string" } } }, - "wellboreData2": { + "opendes:wks:wellboreData2:1.0.0": { "properties": { "prop2": { "type": "string" @@ -331,11 +339,11 @@ For instance { "anyOf": [ { - "$ref": "#/definitions/wellboreData1" + "$ref": "#/definitions/opendes:wks:wellboreData1:1.0.0" } ], "oneOf": [ { - "$ref": "#/definitions/wellboreData2" + "$ref": "#/definitions/opendes:wks:wellboreData2:1.0.0" } ] } 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 600af3b4..182bc58d 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 07642442..e9ad441d 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/resources/converter/basic/schema.json b/indexer-core/src/test/resources/converter/basic/schema.json index 1c406a9e..67f2aae7 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/basic/test-schema.json b/indexer-core/src/test/resources/converter/basic/test-schema.json new file mode 100644 index 00000000..21e57189 --- /dev/null +++ b/indexer-core/src/test/resources/converter/basic/test-schema.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/integration-tests/index_records_1.schema b/indexer-core/src/test/resources/converter/integration-tests/index_records_1.schema index 779d2d20..59cdd5a6 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 cf5f858c..6e923af9 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 802d4493..07c410a2 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 00000000..b35fc4d3 --- /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 00000000..8f3ca4d7 --- /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-allOf.json b/indexer-core/src/test/resources/converter/tags/allOf/allOf-inside-allOf.json index 8ba3af25..950a7ed6 100644 --- a/indexer-core/src/test/resources/converter/tags/allOf/allOf-inside-allOf.json +++ b/indexer-core/src/test/resources/converter/tags/allOf/allOf-inside-allOf.json @@ -1,27 +1,27 @@ { "definitions": { - "wellboreData1": { + "opendes:wks:wellboreData1:1.0.0": { "properties": { "prop1": { "type": "string" } } }, - "wellboreData2": { + "opendes:wks:wellboreData2:1.0.0": { "properties": { "prop2": { "type": "string" } } }, - "wellboreData3": { + "opendes:wks:wellboreData3:1.0.0": { "properties": { "prop3": { "type": "string" } } }, - "wellboreData4": { + "opendes:wks:wellboreData4:1.0.0": { "properties": { "prop4": { "type": "string" @@ -35,18 +35,18 @@ { "allOf": [ { - "$ref": "#/definitions/wellboreData1" + "$ref": "#/definitions/opendes:wks:wellboreData1:1.0.0" }, { - "$ref": "#/definitions/wellboreData2" + "$ref": "#/definitions/opendes:wks:wellboreData2:1.0.0" } ] }, { - "$ref": "#/definitions/wellboreData3" + "$ref": "#/definitions/opendes:wks:wellboreData3:1.0.0" }, { - "$ref": "#/definitions/wellboreData4" + "$ref": "#/definitions/opendes:wks:wellboreData4:1.0.0" } ] } 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 1f2d761d..ec3efcd3 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 @@ -1,6 +1,6 @@ { "definitions": { - "def1": { + "opendes:wks:def1:1.0.0": { "properties": { "prop1": { "type": "string" @@ -14,7 +14,7 @@ "FacilityName": { "allOf": [ { - "$ref": "#/definitions/def1" + "$ref": "#/definitions/opendes:wks:def1:1.0.0" }, { "properties": { diff --git a/indexer-core/src/test/resources/converter/tags/allOf/indefinitions.json b/indexer-core/src/test/resources/converter/tags/allOf/indefinitions.json index 0064dd0a..db27b0b9 100644 --- a/indexer-core/src/test/resources/converter/tags/allOf/indefinitions.json +++ b/indexer-core/src/test/resources/converter/tags/allOf/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": { "allOf": [ { - "$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/indexer-core/src/test/resources/converter/tags/anyOf/indefinitions.json b/indexer-core/src/test/resources/converter/tags/anyOf/indefinitions.json index 4733286c..ab87712a 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/indexer-core/src/test/resources/converter/tags/mixAllAnyOneOf/mix.json b/indexer-core/src/test/resources/converter/tags/mixAllAnyOneOf/mix.json index 2eb9de93..c94d1649 100644 --- a/indexer-core/src/test/resources/converter/tags/mixAllAnyOneOf/mix.json +++ b/indexer-core/src/test/resources/converter/tags/mixAllAnyOneOf/mix.json @@ -1,27 +1,27 @@ { "definitions": { - "wellboreData1": { + "opendes:wks:wellboreData1:1.0.0": { "properties": { "prop1": { "type": "string" } } }, - "wellboreData2": { + "opendes:wks:wellboreData2:1.0.0": { "properties": { "prop2": { "type": "string" } } }, - "wellboreData3": { + "opendes:wks:wellboreData3:1.0.0": { "properties": { "prop3": { "type": "string" } } }, - "wellboreData4": { + "opendes:wks:wellboreData4:1.0.0": { "properties": { "prop4": { "type": "string" @@ -35,19 +35,19 @@ { "anyOf": [ { - "$ref": "#/definitions/wellboreData1" + "$ref": "#/definitions/opendes:wks:wellboreData1:1.0.0" } ], "oneOf": [ { - "$ref": "#/definitions/wellboreData2" + "$ref": "#/definitions/opendes:wks:wellboreData2:1.0.0" } ] }, { - "$ref": "#/definitions/wellboreData3" + "$ref": "#/definitions/opendes:wks:wellboreData3:1.0.0" }, { - "$ref": "#/definitions/wellboreData4" + "$ref": "#/definitions/opendes:wks:wellboreData4:1.0.0" } ] } diff --git a/indexer-core/src/test/resources/converter/tags/oneOf/indefinitions.json b/indexer-core/src/test/resources/converter/tags/oneOf/indefinitions.json index 4733286c..ab87712a 100644 --- a/indexer-core/src/test/resources/converter/tags/oneOf/indefinitions.json +++ b/indexer-core/src/test/resources/converter/tags/oneOf/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/indexer-core/src/test/resources/converter/wks/slb_wke_wellbore.json b/indexer-core/src/test/resources/converter/wks/slb_wke_wellbore.json index 4750faf2..32ca4d6d 100644 --- a/indexer-core/src/test/resources/converter/wks/slb_wke_wellbore.json +++ b/indexer-core/src/test/resources/converter/wks/slb_wke_wellbore.json @@ -3,7 +3,7 @@ "$license": "Copyright 2017-2020, Schlumberger\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { - "core_dl_geopoint": { + "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": { @@ -28,7 +28,7 @@ "title": "2D Map Location", "type": "object" }, - "geoJsonFeature": { + "opendes:wks:geoJsonFeature:1.0.0": { "properties": { "bbox": { "items": { @@ -40,27 +40,27 @@ "geometry": { "oneOf": [ { - "$ref": "#/definitions/geoJsonPoint", + "$ref": "#/definitions/opendes:wks:geoJsonPoint:1.0.0", "title": "GeoJSON Point" }, { - "$ref": "#/definitions/geoJsonMultiPoint", + "$ref": "#/definitions/opendes:wks:geoJsonMultiPoint:1.0.0", "title": "GeoJSON MultiPoint" }, { - "$ref": "#/definitions/geoJsonLineString", + "$ref": "#/definitions/opendes:wks:geoJsonLineString:1.0.0", "title": "GeoJSON LineString" }, { - "$ref": "#/definitions/geoJsonMultiLineString", + "$ref": "#/definitions/opendes:wks:geoJsonMultiLineString:1.0.0", "title": "GeoJSON MultiLineString" }, { - "$ref": "#/definitions/polygon", + "$ref": "#/definitions/opendes:wks:polygon:1.0.0", "title": "GeoJSON Polygon" }, { - "$ref": "#/definitions/geoJsonMultiPolygon", + "$ref": "#/definitions/opendes:wks:geoJsonMultiPolygon:1.0.0", "title": "GeoJSON MultiPolygon" }, { @@ -76,27 +76,27 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/geoJsonPoint", + "$ref": "#/definitions/opendes:wks:geoJsonPoint:1.0.0", "title": "GeoJSON Point" }, { - "$ref": "#/definitions/geoJsonMultiPoint", + "$ref": "#/definitions/opendes:wks:geoJsonMultiPoint:1.0.0", "title": "GeoJSON MultiPoint" }, { - "$ref": "#/definitions/geoJsonLineString", + "$ref": "#/definitions/opendes:wks:geoJsonLineString:1.0.0", "title": "GeoJSON LineString" }, { - "$ref": "#/definitions/geoJsonMultiLineString", + "$ref": "#/definitions/opendes:wks:geoJsonMultiLineString:1.0.0", "title": "GeoJSON MultiLineString" }, { - "$ref": "#/definitions/polygon", + "$ref": "#/definitions/opendes:wks:polygon:1.0.0", "title": "GeoJSON Polygon" }, { - "$ref": "#/definitions/geoJsonMultiPolygon", + "$ref": "#/definitions/opendes:wks:geoJsonMultiPolygon:1.0.0", "title": "GeoJSON MultiPolygon" } ] @@ -144,7 +144,7 @@ "title": "GeoJSON Feature", "type": "object" }, - "geoJsonFeatureCollection": { + "opendes:wks:geoJsonFeatureCollection:1.0.0": { "properties": { "bbox": { "items": { @@ -155,7 +155,7 @@ }, "features": { "items": { - "$ref": "#/definitions/geoJsonFeature", + "$ref": "#/definitions/opendes:wks:geoJsonFeature:1.0.0", "title": "GeoJSON Feature" }, "type": "array" @@ -174,7 +174,7 @@ "title": "GeoJSON FeatureCollection", "type": "object" }, - "geoJsonLineString": { + "opendes:wks:geoJsonLineString:1.0.0": { "description": "GeoJSON LineString as defined in http://geojson.org/schema/LineString.json.", "properties": { "bbox": { @@ -209,7 +209,7 @@ "title": "GeoJSON LineString", "type": "object" }, - "geoJsonMultiLineString": { + "opendes:wks:geoJsonMultiLineString:1.0.0": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "bbox": { @@ -247,7 +247,7 @@ "title": "GeoJSON MultiLineString", "type": "object" }, - "geoJsonMultiPoint": { + "opendes:wks:geoJsonMultiPoint:1.0.0": { "properties": { "bbox": { "items": { @@ -280,7 +280,7 @@ "title": "GeoJSON Point", "type": "object" }, - "geoJsonMultiPolygon": { + "opendes:wks:geoJsonMultiPolygon:1.0.0": { "description": "GeoJSON MultiPolygon derived from http://geojson.org/schema/MultiPolygon.json", "properties": { "bbox": { @@ -323,7 +323,7 @@ "title": "MultiPolygon", "type": "object" }, - "geoJsonPoint": { + "opendes:wks:geoJsonPoint:1.0.0": { "properties": { "bbox": { "items": { @@ -353,7 +353,7 @@ "title": "GeoJSON Point", "type": "object" }, - "geographicPosition": { + "opendes:wks:geographicPosition:1.0.0": { "description": "A position in the native geographic CRS (latitude and longitude) combined with an elevation from mean seal level (MSL)", "properties": { "crsKey": { @@ -362,7 +362,7 @@ "type": "string" }, "elevationFromMsl": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "Elevation from Mean Seal Level, downwards negative. The unit definition is found via 'elevationFromMsl.unitKey' in 'frameOfReference.units' dictionary.", "title": "Elevation from MSL" }, @@ -386,7 +386,7 @@ "title": "Geographic Position", "type": "object" }, - "legal": { + "opendes:wks:legal:1.0.0": { "description": "Legal meta data like legal tags, relevant other countries, legal status.", "properties": { "legaltags": { @@ -414,7 +414,7 @@ "title": "Legal Meta Data", "type": "object" }, - "linkList": { + "opendes:wks:linkList:1.0.0": { "additionalProperties": { "description": "An array of one or more entity references in the data lake.", "items": { @@ -427,7 +427,7 @@ "title": "Link List", "type": "object" }, - "metaItem": { + "opendes:wks:metaItem: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.", "properties": { "kind": { @@ -496,7 +496,7 @@ "title": "Frame of Reference Meta Data Item", "type": "object" }, - "plssLocation": { + "opendes:wks:plssLocation:1.0.0": { "$id": "definitions/plssLocation", "description": "A location described by the Public Land Survey System (United States)", "properties": { @@ -542,7 +542,7 @@ "title": "US PLSS Location", "type": "object" }, - "point3dNonGeoJson": { + "opendes:wks:point3dNonGeoJson:1.0.0": { "description": "A 3-dimensional point with a CRS key, which is further described in 'frameOfReference.crs' and a unitKey for the z or 3rd coordinate; the unit key is further described in 'frameOfReference.units'.", "properties": { "coordinates": { @@ -574,7 +574,7 @@ "title": "3D Point with CRS/Unit key", "type": "object" }, - "polygon": { + "opendes:wks:polygon:1.0.0": { "$schema": "http://json-schema.org/draft-07/schema#", "description": "GeoJSON Polygon derived from http://geojson.org/schema/Polygon.json", "properties": { @@ -613,7 +613,7 @@ "title": "GeoJSON Polygon", "type": "object" }, - "projectedPosition": { + "opendes:wks:projectedPosition:1.0.0": { "description": "A position in the native CRS in Cartesian coordinates combined with an elevation from mean seal level (MSL)", "properties": { "crsKey": { @@ -622,7 +622,7 @@ "type": "string" }, "elevationFromMsl": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "Elevation from Mean Seal Level, downwards negative. The unit definition is found via 'elevationFromMsl.unitKey' in 'frameOfReference.units' dictionary.", "title": "Elevation from MSL" }, @@ -646,23 +646,23 @@ "title": "Projected Position", "type": "object" }, - "relationships": { + "opendes:wks:relationships:1.0.0": { "description": "All relationships from this entity.", "properties": { "definitiveTimeDepthRelation": { - "$ref": "#/definitions/toOneRelationship", + "$ref": "#/definitions/opendes:wks:toOneRelationship:1.0.0", "description": "The definitive tome-depth relation providing the MD to seismic travel-time transformation.", "title": "Definitive Time-Depth Relation", "x-slb-targetEntity": "timeDepthRelation_logSet" }, "definitiveTrajectory": { - "$ref": "#/definitions/toOneRelationship", + "$ref": "#/definitions/opendes:wks:toOneRelationship:1.0.0", "description": "The definitive trajectory providing the MD to 3D space transformation.", "title": "Definitive Trajectory", "x-slb-targetEntity": "trajectory" }, "tieInWellbore": { - "$ref": "#/definitions/toOneRelationship", + "$ref": "#/definitions/opendes:wks:toOneRelationship:1.0.0", "description": "The tie-in wellbore if this wellbore is a side-track.", "title": "Tie-in Wellbore", "x-slb-aliasProperties": [ @@ -672,7 +672,7 @@ "x-slb-targetEntity": "wellbore" }, "well": { - "$ref": "#/definitions/toOneRelationship", + "$ref": "#/definitions/opendes:wks:toOneRelationship:1.0.0", "description": "The well to which this wellbore belongs.", "title": "Well", "x-slb-aliasProperties": [ @@ -685,11 +685,11 @@ "title": "Relationships", "type": "object" }, - "simpleElevationReference": { + "opendes:wks:simpleElevationReference:1.0.0": { "description": "The entity's elevation reference, the elevation above MSL where vertical property is 0. Examples: MD==0, Elevation_Depth==0, TVD==0.", "properties": { "elevationFromMsl": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "The elevation above mean sea level (MSL), at which the vertical origin is 0.0. The 'unitKey' is further defined in 'frameOfReference.units'.", "example": 123.45, "title": "Elevation from MSL", @@ -713,7 +713,7 @@ "title": "Simple Elevation Reference", "type": "object" }, - "tagDictionary": { + "opendes:wks:tagDictionary:1.0.0": { "additionalProperties": { "description": "An array of one or more tag items, e.g. access control list tags, legal tags, etc.", "items": { @@ -726,7 +726,7 @@ "title": "Tag Dictionary", "type": "object" }, - "toManyRelationship": { + "opendes:wks:toManyRelationship:1.0.0": { "description": "A relationship from this entity to many other entities either by natural key (name) or explicit id, optionally classified by confidence level.", "properties": { "confidences": { @@ -765,7 +765,7 @@ } } }, - "toOneRelationship": { + "opendes:wks:toOneRelationship:1.0.0": { "description": "A relationship from this entity to one other entity either by natural key (name) or id, optionally classified by confidence level", "properties": { "confidence": { @@ -797,7 +797,7 @@ "title": "To One Relationship", "type": "object" }, - "valueArrayWithUnit": { + "opendes:wks:valueArrayWithUnit:1.0.0": { "description": "Array of values associated with unit context. The 'unitKey' can be looked up in the 'frameOfReference.units'.", "properties": { "unitKey": { @@ -826,7 +826,7 @@ "title": "Values with unitKey", "type": "object" }, - "valueWithUnit": { + "opendes:wks:valueWithUnit:1.0.0": { "description": "Number value associated with unit context. The 'unitKey' can be looked up in the root property meta[] array.", "properties": { "unitKey": { @@ -849,12 +849,12 @@ "title": "Value with unitKey", "type": "object" }, - "wellboreData": { + "opendes:wks:wellboreData:1.0.0": { "$id": "definitions/wellboreData", "description": "The domain specific data container for a wellbore.", "properties": { "airGap": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "The gap between water surface and offshore drilling platform.", "example": [ 11, @@ -911,7 +911,7 @@ "type": "string" }, "drillingDaysTarget": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "Target days for drilling wellbore.", "example": [ 12.5, @@ -924,7 +924,7 @@ "x-slb-measurement": "Time" }, "elevationReference": { - "$ref": "#/definitions/simpleElevationReference", + "$ref": "#/definitions/opendes:wks:simpleElevationReference:1.0.0", "description": "The wellbore's elevation reference from mean sea level (MSL), positive above MSL. This is where MD == 0 and TVD == 0", "title": "Elevation Reference", "type": "object" @@ -982,7 +982,7 @@ ] }, "kickOffMd": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "The kick-off point in measured depth (MD); for the main well the kickOffMd is set to 0.", "example": [ 6543.2, @@ -995,7 +995,7 @@ "x-slb-measurement": "Standard_Depth_Index" }, "kickOffTvd": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "Kickoff true vertical depth of the wellbore; for the main wellbore the kickOffMd is set to 0.", "example": [ 6543.2, @@ -1008,7 +1008,7 @@ "x-slb-measurement": "Standard_Depth_Index" }, "locationWGS84": { - "$ref": "#/definitions/geoJsonFeatureCollection", + "$ref": "#/definitions/opendes:wks:geoJsonFeatureCollection:1.0.0", "description": "A 2D GeoJSON FeatureCollection defining wellbore location or trajectory in WGS 84 CRS.", "title": "Wellbore Shape WGS 84", "type": "object" @@ -1045,7 +1045,7 @@ "type": "string" }, "plssLocation": { - "$ref": "#/definitions/plssLocation", + "$ref": "#/definitions/opendes:wks:plssLocation:1.0.0", "description": "A location described by the Public Land Survey System (United States)", "title": "US PLSS Location", "type": "object" @@ -1059,7 +1059,7 @@ "type": "string" }, "relationships": { - "$ref": "#/definitions/relationships", + "$ref": "#/definitions/opendes:wks:relationships:1.0.0", "description": "The related entities.", "title": "Relationships" }, @@ -1100,7 +1100,7 @@ "type": "string" }, "totalDepthMd": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "The measured depth of the borehole. If status is plugged, indicates the maximum depth reached before plugging. It is recommended that this value be updated about every 10 minutes by an assigned raw data provider at a site.", "example": [ 13200, @@ -1114,7 +1114,7 @@ "x-slb-measurement": "Standard_Depth_Index" }, "totalDepthMdDriller": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "The total depth along the wellbore as reported by the drilling contractor from 'elevationReference'. The unit definition is found via the property's unitKey' in 'frameOfReference.units' dictionary..", "example": [ 13200.23, @@ -1127,7 +1127,7 @@ "x-slb-measurement": "Standard_Depth_Index" }, "totalDepthMdPlanned": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "Planned measured depth for the wellbore total depth.", "example": [ 13200, @@ -1140,7 +1140,7 @@ "x-slb-measurement": "Standard_Depth_Index" }, "totalDepthMdSubSeaPlanned": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "Planned measured for the wellbore total depth - with respect to seabed.", "example": [ 13100, @@ -1153,7 +1153,7 @@ "x-slb-measurement": "Standard_Depth_Index" }, "totalDepthProjectedMd": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "The projected total measured depth of the borehole. This property is questionable as there is not precise documentation available.", "example": [ 13215, @@ -1163,7 +1163,7 @@ "x-slb-measurement": "Standard_Depth_Index" }, "totalDepthTvd": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "The true vertical depth of the borehole. If status is plugged, indicates the maximum depth reached before plugging. It is recommended that this value be updated about every 10 minutes by an assigned raw data provider at a site.", "example": [ 12200.23, @@ -1176,7 +1176,7 @@ "x-slb-measurement": "Standard_Depth_Index" }, "totalDepthTvdDriller": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "The total depth true vertical as reported by the drilling contractor from 'elevationReference', Downwards increasing. The unit definition is found via the property's unitKey' in 'frameOfReference.units' dictionary.", "example": [ 12200.23, @@ -1189,7 +1189,7 @@ "x-slb-measurement": "Standard_Depth_Index" }, "totalDepthTvdPlanned": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "Planned true vertical depth for the wellbore total depth.", "example": [ 12200.23, @@ -1202,7 +1202,7 @@ "x-slb-measurement": "Standard_Depth_Index" }, "totalDepthTvdSubSeaPlanned": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "Planned true vertical depth for the wellbore total depth - with respect to seabed.", "example": [ 12100.23, @@ -1229,25 +1229,25 @@ ] }, "wellHeadElevation": { - "$ref": "#/definitions/valueWithUnit", + "$ref": "#/definitions/opendes:wks:valueWithUnit:1.0.0", "description": "The wellbore's vertical position is an elevation from mean sea level (MSL), positive above MSL.", "title": "Well Head Elevation", "x-slb-measurement": "Standard_Depth_Index" }, "wellHeadGeographic": { - "$ref": "#/definitions/geographicPosition", + "$ref": "#/definitions/opendes:wks:geographicPosition:1.0.0", "description": "The wellbore's well head position in the native, geographic CRS; vertical position is an elevation from mean sea level (MSL), positive above MSL.", "title": "Well Head Position, Geographic", "type": "object" }, "wellHeadProjected": { - "$ref": "#/definitions/projectedPosition", + "$ref": "#/definitions/opendes:wks:projectedPosition:1.0.0", "description": "The wellbore's well head position in the native, projected CRS; vertical position is an elevation from mean sea level (MSL), positive above MSL.", "title": "Well Head Position, Projected", "type": "object" }, "wellHeadWgs84": { - "$ref": "#/definitions/core_dl_geopoint", + "$ref": "#/definitions/opendes:wks:core_dl_geopoint:1.0.0", "description": "The wellbore's position in WGS 84 latitude and longitude.", "format": "core:dl:geopoint:1.0.0", "title": "WGS 84 Position", @@ -1366,17 +1366,17 @@ "description": "The well-known wellbore schema. Used to capture the general information about a wellbore. This information is sometimes called a \"wellbore header\". A wellbore represents the path from surface to a unique bottomhole location. The wellbore object is uniquely identified within the context of one well object.", "properties": { "acl": { - "$ref": "#/definitions/tagDictionary", + "$ref": "#/definitions/opendes:wks:tagDictionary:1.0.0", "description": "The access control tags associated with this entity.", "title": "Access Control List" }, "ancestry": { - "$ref": "#/definitions/linkList", + "$ref": "#/definitions/opendes:wks:linkList:1.0.0", "description": "The links to data, which constitute the inputs.", "title": "Ancestry" }, "data": { - "$ref": "#/definitions/wellboreData", + "$ref": "#/definitions/opendes:wks:wellboreData:1.0.0", "description": "Wellbore data container", "title": "Wellbore Data" }, @@ -1392,14 +1392,14 @@ "type": "string" }, "legal": { - "$ref": "#/definitions/legal", + "$ref": "#/definitions/opendes:wks:legal:1.0.0", "description": "The geological interpretation's legal tags", "title": "Legal Tags" }, "meta": { "description": "The meta data section linking the 'unitKey', 'crsKey' to self-contained definitions (persistableReference)", "items": { - "$ref": "#/definitions/metaItem" + "$ref": "#/definitions/opendes:wks:metaItem:1.0.0" }, "title": "Frame of Reference Meta Data", "type": "array" 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 11d3ec64..01f3d371 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 @@ -4,9 +4,9 @@ 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 | + | tenant1:indexer-int-test:sample-schema-1:3.0.4 | tenant1-indexer-int-test:sample-schema-1-3.0.4 | index_records_1 | + | tenant1:indexer-int-test:sample-schema-2:2.0.4 | tenant1-indexer-int-test:sample-schema-2-2.0.4 | index_records_2 | + | tenant1:indexer-int-test:sample-schema-3:2.0.4 | tenant1-indexer-int-test:sample-schema-3-2.0.4 | index_records_3 | Scenario Outline: Ingest the record and Index in the Elastic Search When I ingest records with the with for a given @@ -15,8 +15,8 @@ Feature: Indexing of the documents 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"}}}}}" | + | "tenant1:indexer-int-test:sample-schema-1:3.0.4" | "index_records_schema_1" | 5 | "tenant1-indexer-int-test-sample-schema-1-3.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:2.0.4" | "index_records_schema_1" | 5 | "tenant1-indexer-int-test-sample-schema-3-2.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"}}}}}" | Scenario Outline: Ingest the record and Index in the Elastic Search with bad attribute When I ingest records with the with for a given @@ -24,8 +24,8 @@ Feature: Indexing of the documents 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" | + | "tenant1:indexer-int-test:sample-schema-2:2.0.4" | "index_records_2" | 4 | "tenant1-indexer-int-test-sample-schema-2-2.0.4" | "data.Location" | "data.default.viewers@tenant1" | + | "tenant1:indexer-int-test:sample-schema-3:2.0.4" | "index_records_3" | 7 | "tenant1-indexer-int-test-sample-schema-3-2.0.4" | "data.GeoShape" | "data.default.viewers@tenant1" | Scenario Outline: Ingest the record and Index in the Elastic Search with tags When I ingest records with the with for a given @@ -33,4 +33,4 @@ Feature: Indexing of the documents 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 | + | "tenant1:indexer-int-test:sample-schema-1:3.0.4" | "index_records_1" | "tenant1-indexer-int-test-sample-schema-1-3.0.4" | "data.default.viewers@tenant1" | "testtag" | "testvalue" | 5 | 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 9e54b338..ee802781 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 @@ -4,7 +4,7 @@ "authority": "tenant1", "source": "indexer-int-test", "entityType": "sample-schema-1", - "schemaVersionMajor": "2", + "schemaVersionMajor": "3", "schemaVersionMinor": "0", "schemaVersionPatch": "4" }, @@ -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", 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 869df29b..da16c000 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 @@ -4,7 +4,7 @@ "authority": "tenant1", "source": "indexer-int-test", "entityType": "sample-schema-2", - "schemaVersionMajor": "1", + "schemaVersionMajor": "2", "schemaVersionMinor": "0", "schemaVersionPatch": "4" }, @@ -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", 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 bb5d2e9c..68be7945 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 @@ -4,7 +4,7 @@ "authority": "tenant1", "source": "indexer-int-test", "entityType": "sample-schema-3", - "schemaVersionMajor": "1", + "schemaVersionMajor": "2", "schemaVersionMinor": "0", "schemaVersionPatch": "4" }, @@ -18,7 +18,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", -- GitLab From aa68864ff11449f01d6477c27162a241bfe884cd Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Thu, 18 Mar 2021 18:55:01 -0500 Subject: [PATCH 03/14] add integration test of r3 schema --- .../step_definitions/index/record/Steps.java | 6 + testing/indexer-test-core/pom.xml | 22 +- .../opengroup/osdu/common/RecordSteps.java | 8 + .../org/opengroup/osdu/util/ElasticUtils.java | 25 +- .../indexRecord-schema-service.feature | 17 +- .../testData/r3-index_record_wks_master.json | 143 ++ .../r3-index_record_wks_master.schema.json | 2012 +++++++++++++++++ 7 files changed, 2225 insertions(+), 8 deletions(-) create mode 100644 testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.json create mode 100644 testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.schema.json 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 8721cee8..37079ccd 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 @@ -68,4 +68,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 0190d6b3..dd51191e 100644 --- a/testing/indexer-test-core/pom.xml +++ b/testing/indexer-test-core/pom.xml @@ -109,7 +109,27 @@ elasticsearch-rest-high-level-client 7.8.1 - + + org.locationtech.jts.io + jts-io-common + 1.15.0 + + + org.locationtech.spatial4j + spatial4j + 0.7 + + + com.vividsolutions + jts + 1.13 + + + xerces + xercesImpl + + + org.apache.logging.log4j 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 cb3dc70a..4f3b563a 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 df99970e..30a6104e 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 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 01f3d371..a48b502b 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:3.0.4 | tenant1-indexer-int-test:sample-schema-1-3.0.4 | index_records_1 | - | tenant1:indexer-int-test:sample-schema-2:2.0.4 | tenant1-indexer-int-test:sample-schema-2-2.0.4 | index_records_2 | - | tenant1:indexer-int-test:sample-schema-3:2.0.4 | tenant1-indexer-int-test:sample-schema-3-2.0.4 | index_records_3 | + | kind | index | schemaFile | + | tenant1:indexer-int-test:sample-schema-1:3.0.4 | tenant1-indexer-int-test:sample-schema-1-3.0.4 | index_records_1 | + | tenant1:indexer-int-test:sample-schema-2:2.0.4 | tenant1-indexer-int-test:sample-schema-2-2.0.4 | index_records_2 | + | tenant1:indexer-int-test:sample-schema-3:2.0.4 | tenant1-indexer-int-test:sample-schema-3-2.0.4 | index_records_3 | + | tenant1:indexer-int-test:master-data--test:1.0.2 | tenant1-indexer-int-test-master-data--test-1.0.2 | r3-index_record_wks_master | Scenario Outline: Ingest the record and Index in the Elastic Search When I ingest records with the with for a given @@ -34,3 +35,11 @@ Feature: Indexing of the documents Examples: | kind | recordFile | index | acl | tagKey | tagValue | number | | "tenant1:indexer-int-test:sample-schema-1:3.0.4" | "index_records_1" | "tenant1-indexer-int-test-sample-schema-1-3.0.4" | "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 with for a given + Then I should be able search documents for the by bounding box query with points (, ) and (, ) on field + + Examples: + | kind | recordFile | number | index | acl | field | top_left_latitude | top_left_longitude | bottom_right_latitude | bottom_right_longitude | + | "tenant1:indexer-int-test:master-data--test:1.0.2" | "r3-index_record_wks_master" | 1 | "tenant1-indexer-int-test-master-data--test-1.0.2" | ""data.default.viewers@tenant1" | "data.SpatialLocation.Wgs84Coordinates" | 52.0 | -100.0 | 0.0 | 100.0 | 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 00000000..de6e08da --- /dev/null +++ b/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.json @@ -0,0 +1,143 @@ +[ + { + "id": "tenant1::testIngest61", + "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 00000000..55edc7a0 --- /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": "indexer-int-test", + "entityType": "master-data--Test", + "schemaVersionMajor": "1", + "schemaVersionMinor": "0", + "schemaVersionPatch": "2" + }, + "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 -- GitLab From b8cb612bbcb338a7831e3127adae7d69148200b8 Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Thu, 18 Mar 2021 21:18:28 -0500 Subject: [PATCH 04/14] fix typo --- .../features/indexrecord/indexRecord-schema-service.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a48b502b..2fde3a74 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 @@ -42,4 +42,4 @@ Feature: Indexing of the documents Examples: | kind | recordFile | number | index | acl | field | top_left_latitude | top_left_longitude | bottom_right_latitude | bottom_right_longitude | - | "tenant1:indexer-int-test:master-data--test:1.0.2" | "r3-index_record_wks_master" | 1 | "tenant1-indexer-int-test-master-data--test-1.0.2" | ""data.default.viewers@tenant1" | "data.SpatialLocation.Wgs84Coordinates" | 52.0 | -100.0 | 0.0 | 100.0 | + | "tenant1:indexer-int-test:master-data--test:1.0.2" | "r3-index_record_wks_master" | 1 | "tenant1-indexer-int-test-master-data--test-1.0.2" | "data.default.viewers@tenant1" | "data.SpatialLocation.Wgs84Coordinates" | 52.0 | -100.0 | 0.0 | 100.0 | -- GitLab From d39a59165291035ae8500124f849c468063b950c Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Fri, 19 Mar 2021 09:45:33 -0500 Subject: [PATCH 05/14] update test core version to support geoshape query --- testing/indexer-test-aws/pom.xml | 2 +- testing/indexer-test-azure/pom.xml | 2 +- testing/indexer-test-core/pom.xml | 2 +- testing/indexer-test-gcp/pom.xml | 2 +- testing/indexer-test-ibm/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/indexer-test-aws/pom.xml b/testing/indexer-test-aws/pom.xml index 2472c74b..39bb3942 100644 --- a/testing/indexer-test-aws/pom.xml +++ b/testing/indexer-test-aws/pom.xml @@ -42,7 +42,7 @@ org.opengroup.osdu.indexer indexer-test-core - 0.8.0-SNAPSHOT + 0.8.1-SNAPSHOT diff --git a/testing/indexer-test-azure/pom.xml b/testing/indexer-test-azure/pom.xml index 074e1cab..baa5cd8b 100644 --- a/testing/indexer-test-azure/pom.xml +++ b/testing/indexer-test-azure/pom.xml @@ -45,7 +45,7 @@ org.opengroup.osdu.indexer indexer-test-core - 0.8.0-SNAPSHOT + 0.8.1-SNAPSHOT diff --git a/testing/indexer-test-core/pom.xml b/testing/indexer-test-core/pom.xml index dd51191e..e9c63cd0 100644 --- a/testing/indexer-test-core/pom.xml +++ b/testing/indexer-test-core/pom.xml @@ -11,7 +11,7 @@ org.opengroup.osdu.indexer indexer-test-core - 0.8.0-SNAPSHOT + 0.8.1-SNAPSHOT 1.8 diff --git a/testing/indexer-test-gcp/pom.xml b/testing/indexer-test-gcp/pom.xml index 1f5f6b25..cbefb507 100644 --- a/testing/indexer-test-gcp/pom.xml +++ b/testing/indexer-test-gcp/pom.xml @@ -37,7 +37,7 @@ org.opengroup.osdu.indexer indexer-test-core - 0.8.0-SNAPSHOT + 0.8.1-SNAPSHOT diff --git a/testing/indexer-test-ibm/pom.xml b/testing/indexer-test-ibm/pom.xml index 21f69f82..4c538756 100644 --- a/testing/indexer-test-ibm/pom.xml +++ b/testing/indexer-test-ibm/pom.xml @@ -38,7 +38,7 @@ org.opengroup.osdu.indexer indexer-test-core - 0.8.0-SNAPSHOT + 0.8.1-SNAPSHOT -- GitLab From df776672b9ad8434cb72e2a2d82213261aee6310 Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Sat, 20 Mar 2021 17:40:35 -0500 Subject: [PATCH 06/14] pipeline --- devops/azure/chart/templates/deployment.yaml | 4 +--- devops/azure/pipeline.yml | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/devops/azure/chart/templates/deployment.yaml b/devops/azure/chart/templates/deployment.yaml index 20fac08c..2c8a0d79 100644 --- a/devops/azure/chart/templates/deployment.yaml +++ b/devops/azure/chart/templates/deployment.yaml @@ -106,6 +106,4 @@ spec: - name: partition_service_endpoint value: http://partition/api/partition/v1 - name: azure_istioauth_enabled - value: "true" - - name: azure_activedirectory_AppIdUri - value: "api://$(aad_client_id)" + value: "true" \ No newline at end of file diff --git a/devops/azure/pipeline.yml b/devops/azure/pipeline.yml index 1ccfb6be..5d4ca014 100644 --- a/devops/azure/pipeline.yml +++ b/devops/azure/pipeline.yml @@ -29,12 +29,15 @@ trigger: resources: repositories: - - repository: FluxRepo - type: git - name: k8-gitops-manifests - - repository: TemplateRepo - type: git - name: infra-azure-provisioning + - repository: FluxRepo + type: git + name: k8-gitops-manifests + - repository: TemplateRepo + type: git + name: infra-azure-provisioning + - repository: security-templates + type: git + name: security-infrastructure variables: - group: 'Azure - OSDU' @@ -76,9 +79,9 @@ stages: chartPath: ${{ variables.chartPath }} valuesFile: ${{ variables.valuesFile }} testCoreMavenPomFile: 'testing/indexer-test-core/pom.xml' - testCoreMavenOptions: '--settings $(System.DefaultWorkingDirectory)/drop/deploy/testing/maven/settings.xml' + testCoreMavenOptions: '--settings $(System.DefaultWorkingDirectory)/drop/deploy/testing/maven/settings.xml -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' skipDeploy: ${{ variables.SKIP_DEPLOY }} skipTest: ${{ variables.SKIP_TESTS }} providers: - name: Azure - environments: ['demo'] + environments: ['dev', 'qa', 'prd', 'weu', 'cvn'] -- GitLab From aaec39000cf5a284f102d449b4f0d7a691875f27 Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Sat, 20 Mar 2021 18:39:13 -0500 Subject: [PATCH 07/14] add attribution --- .../osdu/indexer/model/geojson/Feature.java | 16 +++++++++++++++- .../indexer/model/geojson/FeatureCollection.java | 14 ++++++++++++++ .../indexer/model/geojson/GeoJsonObject.java | 14 ++++++++++++++ .../osdu/indexer/model/geojson/Geometry.java | 14 ++++++++++++++ .../model/geojson/GeometryCollection.java | 14 ++++++++++++++ .../osdu/indexer/model/geojson/LineString.java | 14 ++++++++++++++ .../indexer/model/geojson/MultiLineString.java | 14 ++++++++++++++ .../osdu/indexer/model/geojson/MultiPoint.java | 14 ++++++++++++++ .../osdu/indexer/model/geojson/MultiPolygon.java | 14 ++++++++++++++ .../osdu/indexer/model/geojson/Point.java | 14 ++++++++++++++ .../osdu/indexer/model/geojson/Polygon.java | 14 ++++++++++++++ .../osdu/indexer/model/geojson/Position.java | 14 ++++++++++++++ .../jackson/FeatureCollectionSerializer.java | 14 ++++++++++++++ .../geojson/jackson/PositionDeserializer.java | 14 ++++++++++++++ .../geojson/jackson/PositionSerializer.java | 14 ++++++++++++++ .../step_definitions/index/record/Steps.java | 10 ++++++++++ 16 files changed, 221 insertions(+), 1 deletion(-) 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 index 7c429e71..4d03bbe0 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; @@ -10,7 +24,7 @@ import java.util.Map; public class Feature extends GeoJsonObject { @JsonInclude() - private Map properties = new HashMap(); + private Map properties = new HashMap<>(); @JsonInclude() private GeoJsonObject geometry; private String id; 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 index c8c84a76..2040e646 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index 9ba2ee3f..2f137a5f 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index f061161d..99b0841a 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index a4159116..903ac081 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index a2692ec7..8eee0477 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index 701dabd5..2e16db6e 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index 4c44e084..aabbdda8 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index f223b209..6c9d8af0 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index 429b08de..9808209a 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index f1f9e001..31461b42 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index 1c9a5840..fa124ee1 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index 24820209..f5d412a0 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index d837e09e..5c721c2e 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 index 909482d6..09275a25 100644 --- 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 @@ -1,3 +1,17 @@ +// 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; 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 7539fe6b..03912e84 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 -- GitLab From 74b2cb322498d77c4966c6f2a59dd7b2ce06bb2a Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Mon, 22 Mar 2021 16:31:59 -0500 Subject: [PATCH 08/14] use official schema id for geoJson integration test and revert kind version update --- .../converter/basic/test-schema.json | 1999 ----------------- .../indexRecord-schema-service.feature | 27 +- .../r3-index_record_wks_master.schema.json | 6 +- 3 files changed, 17 insertions(+), 2015 deletions(-) delete mode 100644 indexer-core/src/test/resources/converter/basic/test-schema.json diff --git a/indexer-core/src/test/resources/converter/basic/test-schema.json b/indexer-core/src/test/resources/converter/basic/test-schema.json deleted file mode 100644 index 21e57189..00000000 --- a/indexer-core/src/test/resources/converter/basic/test-schema.json +++ /dev/null @@ -1,1999 +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: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-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 2fde3a74..c639e9d0 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,11 +3,12 @@ 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:3.0.4 | tenant1-indexer-int-test:sample-schema-1-3.0.4 | index_records_1 | - | tenant1:indexer-int-test:sample-schema-2:2.0.4 | tenant1-indexer-int-test:sample-schema-2-2.0.4 | index_records_2 | - | tenant1:indexer-int-test:sample-schema-3:2.0.4 | tenant1-indexer-int-test:sample-schema-3-2.0.4 | index_records_3 | - | tenant1:indexer-int-test:master-data--test:1.0.2 | tenant1-indexer-int-test-master-data--test-1.0.2 | r3-index_record_wks_master | + | 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 | + | tenant1:indexer-int-test:sample-schema-1:1.0.5 | tenant1-indexer-int-test:sample-schema-1-1.0.5 | index_records_1 | + | tenant1:wks:master-data--Wellbore:1.0.0 | tenant1-wks-master-data--wellbore-1.0.0 | r3-index_record_wks_master | Scenario Outline: Ingest the record and Index in the Elastic Search When I ingest records with the with for a given @@ -15,9 +16,9 @@ Feature: Indexing of the documents Then I should get the elastic for the and in the Elastic Search Examples: - | kind | recordFile | number | index | type | acl | mapping | - | "tenant1:indexer-int-test:sample-schema-1:3.0.4" | "index_records_schema_1" | 5 | "tenant1-indexer-int-test-sample-schema-1-3.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:2.0.4" | "index_records_schema_1" | 5 | "tenant1-indexer-int-test-sample-schema-3-2.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-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"}}}}}" | Scenario Outline: Ingest the record and Index in the Elastic Search with bad attribute When I ingest records with the with for a given @@ -25,8 +26,8 @@ Feature: Indexing of the documents Examples: | kind | recordFile | number | index | skippedAttribute | acl | - | "tenant1:indexer-int-test:sample-schema-2:2.0.4" | "index_records_2" | 4 | "tenant1-indexer-int-test-sample-schema-2-2.0.4" | "data.Location" | "data.default.viewers@tenant1" | - | "tenant1:indexer-int-test:sample-schema-3:2.0.4" | "index_records_3" | 7 | "tenant1-indexer-int-test-sample-schema-3-2.0.4" | "data.GeoShape" | "data.default.viewers@tenant1" | + | "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" | Scenario Outline: Ingest the record and Index in the Elastic Search with tags When I ingest records with the with for a given @@ -34,12 +35,12 @@ Feature: Indexing of the documents Examples: | kind | recordFile | index | acl | tagKey | tagValue | number | - | "tenant1:indexer-int-test:sample-schema-1:3.0.4" | "index_records_1" | "tenant1-indexer-int-test-sample-schema-1-3.0.4" | "data.default.viewers@tenant1" | "testtag" | "testvalue" | 5 | + | "tenant1:indexer-int-test:sample-schema-1:1.0.5" | "index_records_1" | "tenant1-indexer-int-test-sample-schema-1-1.0.5" | "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 with for a given Then I should be able search documents for the by bounding box query with points (, ) and (, ) on field Examples: - | kind | recordFile | number | index | acl | field | top_left_latitude | top_left_longitude | bottom_right_latitude | bottom_right_longitude | - | "tenant1:indexer-int-test:master-data--test:1.0.2" | "r3-index_record_wks_master" | 1 | "tenant1-indexer-int-test-master-data--test-1.0.2" | "data.default.viewers@tenant1" | "data.SpatialLocation.Wgs84Coordinates" | 52.0 | -100.0 | 0.0 | 100.0 | + | kind | recordFile | number | index | acl | field | top_left_latitude | top_left_longitude | bottom_right_latitude | bottom_right_longitude | + | "tenant1:wks:master-data--Wellbore:1.0.0" | "r3-index_record_wks_master" | 1 | "tenant1-wks-master-data--wellbore-1.0.0" | "data.default.viewers@tenant1" | "data.SpatialLocation.Wgs84Coordinates" | 52.0 | -100.0 | 0.0 | 100.0 | 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 index 55edc7a0..efcd428f 100644 --- 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 @@ -2,11 +2,11 @@ "schemaInfo": { "schemaIdentity": { "authority": "tenant1", - "source": "indexer-int-test", - "entityType": "master-data--Test", + "source": "wks", + "entityType": "master-data--Wellbore", "schemaVersionMajor": "1", "schemaVersionMinor": "0", - "schemaVersionPatch": "2" + "schemaVersionPatch": "0" }, "status": "DEVELOPMENT" }, -- GitLab From 8adeed536bb5624be259fd59d558fae63550297c Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Mon, 22 Mar 2021 17:37:41 -0500 Subject: [PATCH 09/14] provide schema definition for test data --- .../testData/index_records_1.schema.json | 27 + .../testData/index_records_2.schema.json | 27 + .../testData/index_records_3.schema.json | 529 +++++++++++++++++- 3 files changed, 582 insertions(+), 1 deletion(-) 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 ee802781..7598024c 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 @@ -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 da16c000..f97d1d40 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 @@ -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.schema.json b/testing/indexer-test-core/src/main/resources/testData/index_records_3.schema.json index 68be7945..6cb83e1f 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 @@ -18,7 +18,7 @@ "type": "object", "properties": { "GeoShape": { - "$ref": "#/definitions/opendes:wks:geoJsonFeatureCollection:1.0.0", + "$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 -- GitLab From adb3bda904186bf81184fb19418489a6858effba Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Mon, 22 Mar 2021 18:34:46 -0500 Subject: [PATCH 10/14] use entitlements v1 --- devops/azure/chart/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devops/azure/chart/templates/deployment.yaml b/devops/azure/chart/templates/deployment.yaml index 2c8a0d79..1db3281c 100644 --- a/devops/azure/chart/templates/deployment.yaml +++ b/devops/azure/chart/templates/deployment.yaml @@ -90,7 +90,7 @@ spec: - name: reindex_topic_name value: recordstopic - name: entitlements_service_endpoint - value: http://entitlements/api/entitlements/v2 + value: http://entitlements-azure/entitlements/v1 - name: entitlements_service_api_key value: "OBSOLETE" - name: schema_service_url -- GitLab From 6a981faa5431a113ff751265b92aeaf0111cb778 Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Tue, 23 Mar 2021 11:09:48 -0500 Subject: [PATCH 11/14] add tutorial and integration test fix --- docs/tutorial/IndexerService.md | 38 ++++++++++++++++++- .../step_definitions/index/record/Steps.java | 9 ++--- .../indexRecord-schema-service.feature | 28 +++++++------- .../testData/index_records_1.schema.json | 8 ++-- .../testData/index_records_2.schema.json | 6 +-- .../testData/index_records_3.schema.json | 8 ++-- .../r3-index_record_wks_master.schema.json | 2 +- 7 files changed, 66 insertions(+), 33 deletions(-) diff --git a/docs/tutorial/IndexerService.md b/docs/tutorial/IndexerService.md index d11f1675..57128e41 100644 --- a/docs/tutorial/IndexerService.md +++ b/docs/tutorial/IndexerService.md @@ -8,6 +8,7 @@ - [Copy Index ](#copy-index) - [Get task status ](#get-task-status) - [Schema Service adoption ](#schema-service-adoption) + - [R3 Schema Support ](#r3-schema-support) ##Introduction @@ -251,7 +252,7 @@ API will respond with status of task. [Back to table of contents](#TOC) -##Shema Service adoption +##Schema Service adoption 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 + +Indexer service support r3 schema. These schemas are created via Schema service. + +Here is an example following end-to-end workflow can be exercised: + +* 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/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 37079ccd..97779ee8 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; @@ -69,8 +68,8 @@ public class Steps extends SchemaServiceRecordSteps { 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 ( + @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); } 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 c639e9d0..fbad5afb 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,12 +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 | - | tenant1:indexer-int-test:sample-schema-1:1.0.5 | tenant1-indexer-int-test:sample-schema-1-1.0.5 | index_records_1 | - | tenant1:wks:master-data--Wellbore:1.0.0 | tenant1-wks-master-data--wellbore-1.0.0 | r3-index_record_wks_master | + | 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:1.0.3 | tenant1-wks-master-data--wellbore-1.0.3 | r3-index_record_wks_master | Scenario Outline: Ingest the record and Index in the Elastic Search When I ingest records with the with for a given @@ -16,26 +15,25 @@ Feature: Indexing of the documents Then I should get the elastic for the and 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 with for a given Then I should get the documents for the in the Elastic Search with out 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 with for a given Then I should be able to search record with index by tag and value Examples: - | kind | recordFile | index | acl | tagKey | tagValue | number | - | "tenant1:indexer-int-test:sample-schema-1:1.0.5" | "index_records_1" | "tenant1-indexer-int-test-sample-schema-1-1.0.5" | "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 with for a given @@ -43,4 +41,4 @@ Feature: Indexing of the documents Examples: | kind | recordFile | number | index | acl | field | top_left_latitude | top_left_longitude | bottom_right_latitude | bottom_right_longitude | - | "tenant1:wks:master-data--Wellbore:1.0.0" | "r3-index_record_wks_master" | 1 | "tenant1-wks-master-data--wellbore-1.0.0" | "data.default.viewers@tenant1" | "data.SpatialLocation.Wgs84Coordinates" | 52.0 | -100.0 | 0.0 | 100.0 | + | "tenant1:wks:master-data--Wellbore:1.0.3" | "r3-index_record_wks_master" | 1 | "tenant1-wks-master-data--wellbore-1.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 7598024c..b7ecdbc6 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": "3", + "source": "indexer", + "entityType": "test-data--Integration", + "schemaVersionMajor": "1", "schemaVersionMinor": "0", - "schemaVersionPatch": "4" + "schemaVersionPatch": "0" }, "status": "DEVELOPMENT" }, 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 f97d1d40..e67e1950 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", + "source": "indexer", + "entityType": "test-data--Integration", "schemaVersionMajor": "2", "schemaVersionMinor": "0", - "schemaVersionPatch": "4" + "schemaVersionPatch": "0" }, "status": "DEVELOPMENT" }, 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 6cb83e1f..87bc4b64 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": "2", + "source": "indexer", + "entityType": "test-data--Integration", + "schemaVersionMajor": "3", "schemaVersionMinor": "0", - "schemaVersionPatch": "4" + "schemaVersionPatch": "0" }, "status": "DEVELOPMENT" }, 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 index efcd428f..c0582cb6 100644 --- 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 @@ -6,7 +6,7 @@ "entityType": "master-data--Wellbore", "schemaVersionMajor": "1", "schemaVersionMinor": "0", - "schemaVersionPatch": "0" + "schemaVersionPatch": "3" }, "status": "DEVELOPMENT" }, -- GitLab From 168570ec6981d553065e55746fb8c1a9ea5615c7 Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Tue, 23 Mar 2021 11:54:25 -0500 Subject: [PATCH 12/14] IT fixes --- .../step_definitions/index/record/Steps.java | 9 +++--- .../indexRecord-schema-service.feature | 28 +++++++++---------- .../testData/index_records_1.schema.json | 8 +++--- .../testData/index_records_2.schema.json | 6 ++-- .../testData/index_records_3.schema.json | 8 +++--- .../r3-index_record_wks_master.schema.json | 2 +- 6 files changed, 29 insertions(+), 32 deletions(-) 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 37079ccd..97779ee8 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; @@ -69,8 +68,8 @@ public class Steps extends SchemaServiceRecordSteps { 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 ( + @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); } 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 c639e9d0..fbad5afb 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,12 +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 | - | tenant1:indexer-int-test:sample-schema-1:1.0.5 | tenant1-indexer-int-test:sample-schema-1-1.0.5 | index_records_1 | - | tenant1:wks:master-data--Wellbore:1.0.0 | tenant1-wks-master-data--wellbore-1.0.0 | r3-index_record_wks_master | + | 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:1.0.3 | tenant1-wks-master-data--wellbore-1.0.3 | r3-index_record_wks_master | Scenario Outline: Ingest the record and Index in the Elastic Search When I ingest records with the with for a given @@ -16,26 +15,25 @@ Feature: Indexing of the documents Then I should get the elastic for the and 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 with for a given Then I should get the documents for the in the Elastic Search with out 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 with for a given Then I should be able to search record with index by tag and value Examples: - | kind | recordFile | index | acl | tagKey | tagValue | number | - | "tenant1:indexer-int-test:sample-schema-1:1.0.5" | "index_records_1" | "tenant1-indexer-int-test-sample-schema-1-1.0.5" | "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 with for a given @@ -43,4 +41,4 @@ Feature: Indexing of the documents Examples: | kind | recordFile | number | index | acl | field | top_left_latitude | top_left_longitude | bottom_right_latitude | bottom_right_longitude | - | "tenant1:wks:master-data--Wellbore:1.0.0" | "r3-index_record_wks_master" | 1 | "tenant1-wks-master-data--wellbore-1.0.0" | "data.default.viewers@tenant1" | "data.SpatialLocation.Wgs84Coordinates" | 52.0 | -100.0 | 0.0 | 100.0 | + | "tenant1:wks:master-data--Wellbore:1.0.3" | "r3-index_record_wks_master" | 1 | "tenant1-wks-master-data--wellbore-1.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 7598024c..b7ecdbc6 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": "3", + "source": "indexer", + "entityType": "test-data--Integration", + "schemaVersionMajor": "1", "schemaVersionMinor": "0", - "schemaVersionPatch": "4" + "schemaVersionPatch": "0" }, "status": "DEVELOPMENT" }, 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 f97d1d40..e67e1950 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", + "source": "indexer", + "entityType": "test-data--Integration", "schemaVersionMajor": "2", "schemaVersionMinor": "0", - "schemaVersionPatch": "4" + "schemaVersionPatch": "0" }, "status": "DEVELOPMENT" }, 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 6cb83e1f..87bc4b64 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": "2", + "source": "indexer", + "entityType": "test-data--Integration", + "schemaVersionMajor": "3", "schemaVersionMinor": "0", - "schemaVersionPatch": "4" + "schemaVersionPatch": "0" }, "status": "DEVELOPMENT" }, 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 index efcd428f..c0582cb6 100644 --- 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 @@ -6,7 +6,7 @@ "entityType": "master-data--Wellbore", "schemaVersionMajor": "1", "schemaVersionMinor": "0", - "schemaVersionPatch": "0" + "schemaVersionPatch": "3" }, "status": "DEVELOPMENT" }, -- GitLab From dee0b35c12b53a6f6bf26c5c78909522bba271d7 Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Tue, 23 Mar 2021 12:15:16 -0500 Subject: [PATCH 13/14] revert accidental update --- devops/azure/chart/templates/deployment.yaml | 6 ++++-- devops/azure/pipeline.yml | 19 ++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/devops/azure/chart/templates/deployment.yaml b/devops/azure/chart/templates/deployment.yaml index 1db3281c..20fac08c 100644 --- a/devops/azure/chart/templates/deployment.yaml +++ b/devops/azure/chart/templates/deployment.yaml @@ -90,7 +90,7 @@ spec: - name: reindex_topic_name value: recordstopic - name: entitlements_service_endpoint - value: http://entitlements-azure/entitlements/v1 + value: http://entitlements/api/entitlements/v2 - name: entitlements_service_api_key value: "OBSOLETE" - name: schema_service_url @@ -106,4 +106,6 @@ spec: - name: partition_service_endpoint value: http://partition/api/partition/v1 - name: azure_istioauth_enabled - value: "true" \ No newline at end of file + value: "true" + - name: azure_activedirectory_AppIdUri + value: "api://$(aad_client_id)" diff --git a/devops/azure/pipeline.yml b/devops/azure/pipeline.yml index 5d4ca014..1ccfb6be 100644 --- a/devops/azure/pipeline.yml +++ b/devops/azure/pipeline.yml @@ -29,15 +29,12 @@ trigger: resources: repositories: - - repository: FluxRepo - type: git - name: k8-gitops-manifests - - repository: TemplateRepo - type: git - name: infra-azure-provisioning - - repository: security-templates - type: git - name: security-infrastructure + - repository: FluxRepo + type: git + name: k8-gitops-manifests + - repository: TemplateRepo + type: git + name: infra-azure-provisioning variables: - group: 'Azure - OSDU' @@ -79,9 +76,9 @@ stages: chartPath: ${{ variables.chartPath }} valuesFile: ${{ variables.valuesFile }} testCoreMavenPomFile: 'testing/indexer-test-core/pom.xml' - testCoreMavenOptions: '--settings $(System.DefaultWorkingDirectory)/drop/deploy/testing/maven/settings.xml -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' + testCoreMavenOptions: '--settings $(System.DefaultWorkingDirectory)/drop/deploy/testing/maven/settings.xml' skipDeploy: ${{ variables.SKIP_DEPLOY }} skipTest: ${{ variables.SKIP_TESTS }} providers: - name: Azure - environments: ['dev', 'qa', 'prd', 'weu', 'cvn'] + environments: ['demo'] -- GitLab From 17318719d96442773698c81034ba50ec890450f4 Mon Sep 17 00:00:00 2001 From: NThakur4 Date: Tue, 23 Mar 2021 13:50:19 -0500 Subject: [PATCH 14/14] update integration test schema version for r3 data as Azure env have some conflicts --- docs/tutorial/IndexerService.md | 4 ++-- .../features/indexrecord/indexRecord-schema-service.feature | 4 ++-- .../resources/testData/r3-index_record_wks_master.schema.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/tutorial/IndexerService.md b/docs/tutorial/IndexerService.md index 57128e41..0873557d 100644 --- a/docs/tutorial/IndexerService.md +++ b/docs/tutorial/IndexerService.md @@ -265,9 +265,9 @@ Later call to the Storage Service will be deprecated and then removed (after the Indexer service support r3 schema. These schemas are created via Schema service. -Here is an example following end-to-end workflow can be exercised: +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 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) 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 fbad5afb..711ce2de 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 @@ -7,7 +7,7 @@ Feature: Indexing of the documents | 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:1.0.3 | tenant1-wks-master-data--wellbore-1.0.3 | r3-index_record_wks_master | + | 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 with for a given @@ -41,4 +41,4 @@ Feature: Indexing of the documents Examples: | kind | recordFile | number | index | acl | field | top_left_latitude | top_left_longitude | bottom_right_latitude | bottom_right_longitude | - | "tenant1:wks:master-data--Wellbore:1.0.3" | "r3-index_record_wks_master" | 1 | "tenant1-wks-master-data--wellbore-1.0.3" | "data.default.viewers@tenant1" | "data.SpatialLocation.Wgs84Coordinates" | 52 | -100 | 0 | 100 | + | "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/r3-index_record_wks_master.schema.json b/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.schema.json index c0582cb6..0d69ae53 100644 --- 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 @@ -4,7 +4,7 @@ "authority": "tenant1", "source": "wks", "entityType": "master-data--Wellbore", - "schemaVersionMajor": "1", + "schemaVersionMajor": "2", "schemaVersionMinor": "0", "schemaVersionPatch": "3" }, -- GitLab