-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cmr-10030: Ingesting and Searching for Visualizations (#2171)
* CMR-10030: Adding in a version of the Visualization schema; ingest, indexing, and searching. * CMR-10030: adding in the real tiles schema.
- Loading branch information
Showing
18 changed files
with
2,073 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# visualization schema change Log | ||
|
||
## [1.0.0] | ||
- 2024-??-?? | ||
Initial release in the CMR. | ||
|
||
---- | ||
Using version | ||
https://git.earthdata.nasa.gov/projects/VISLABS/repos/metadata-mapping/browse/umm/visualization/v0.10.1 as of 08/29/2024 | ||
|
||
Changes to main.json: | ||
- Changed the name of Identifier to Id | ||
- Added Name to the schema. - Not sure if generics needs this - cant I just copy the title to Name? | ||
- Changed ScienceKeywords array minItems from 0 to 1 | ||
- Fixed the reference of SpatialExtentType to spatial-temporal-extent.json | ||
- Moved the reference of TemporalExtentType to spatial-temporal-extent.json | ||
- ConceptIds moved additionalProperties: false up to the type: object declaration | ||
- MetadataSpecification is above the what and how. | ||
- required | ||
- Identifier changed name to id | ||
- Name has been added - can this be Title? | ||
- ConceptIds was added | ||
- MetadataSpecification was added | ||
- In the allOf section the What refernces are different - they don't look correct in the given schema | ||
- In the allOf section the How refernces are different - they don't look correct in the given schema | ||
- The rest is just different. | ||
|
||
Added the UMM-C 1.18.1 umm-cmn-json-schema.json Spatial, Temporal, and supporting elements to spatial-temporal-extent.json | ||
Removed the older umm-cmn-json-schema.json. | ||
|
||
|
||
|
||
Copyright © 2024-2024 United States Government as represented by the | ||
Administrator of the National Aeronautics and Space Administration. All Rights | ||
Reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"MetadataSpecification": { | ||
"URL": "https://cdn.earthdata.nasa.gov/generic/index/v0.0.1", | ||
"Name": "Generic-Index", | ||
"Version": "0.0.1" | ||
}, | ||
"Generic": { | ||
"Name": "Visualization", | ||
"Version": "1.0.0" | ||
}, | ||
"SubConceptType": "VIS", | ||
"IndexSetup" : { | ||
"index": { | ||
"number_of_shards": 3, | ||
"number_of_replicas": 1, | ||
"refresh_interval": "1s" | ||
} | ||
}, | ||
"Indexes": | ||
[ | ||
{ | ||
"Description": "Identifier", | ||
"Field": ".Identifier", | ||
"Name": "Id", | ||
"Mapping": "string" | ||
}, | ||
{ | ||
"Description": "Identifier", | ||
"Field": ".Identifier", | ||
"Name": "Identifier", | ||
"Mapping": "string" | ||
}, | ||
{ | ||
"Description": "Schema Name as the Name field", | ||
"Field": ".Name", | ||
"Name": "Name", | ||
"Mapping": "string" | ||
}, | ||
{ | ||
"Description": "Schema Title as the Title field", | ||
"Field": ".Title", | ||
"Name": "Title", | ||
"Mapping": "string" | ||
}, | ||
{ | ||
"Description": "VisualizationType", | ||
"Field": ".VisualizationType", | ||
"Name": "Visualization-Type", | ||
"Mapping": "string" | ||
}, | ||
{ | ||
"Description": "Visualization Source ConceptIds", | ||
"Field": ".ConceptIds", | ||
"Name": "Concept-Ids", | ||
"Mapping": "string", | ||
"Indexer": "simple-array-field", | ||
"Configuration": {"sub-fields": ["value", "shortName"]} | ||
}, | ||
{ | ||
"Description": "Visualization Source ConceptIds in keywords", | ||
"Field": ".ConceptIds", | ||
"Name": "keyword", | ||
"Mapping": "string", | ||
"Indexer": "simple-array-field", | ||
"Configuration": {"sub-fields": ["value"]} | ||
}, | ||
{ | ||
"Description": "Identifier with the keywords", | ||
"Field": ".Identifier", | ||
"Name": "keyword", | ||
"Mapping": "string" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
## <a name="visualization"></a> Visualization | ||
|
||
#### <a name="provider-info-visualization"></a> /providers/<provider-id>/visualizations/<native-id> | ||
|
||
### <a name="create-update-visualization"></a> Create / Update a Visualization | ||
|
||
Visualization concepts can be created or updated by sending an HTTP PUT with the metadata to the URL `%CMR-ENDPOINT%/providers/<provider-id>/visualizations/<native-id>`. The response will include the [concept id](#concept-id) and the [revision id](#revision-id). The contents of the metadata is passed in the body of the request. | ||
|
||
``` | ||
curl -XPOST \ | ||
-H "Cmr-Pretty: true" \ | ||
-H "Content-Type:application/vnd.nasa.cmr.umm+json" \ | ||
-H "Authorization: Bearer XXXX" \ | ||
"%CMR-ENDPOINT%/providers/PROV1/visualizations/sampleNativeId" \ | ||
-d @sampleVisualization.json | ||
``` | ||
|
||
#### Successful Response in XML | ||
|
||
``` | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<result> | ||
<concept-id>VIS1200000000-PROV1</concept-id> | ||
<revision-id>1</revision-id> | ||
<warnings></warnings> | ||
<existing-errors></existing-errors> | ||
</result> | ||
``` | ||
Subsequent ingests to the Visualization record will result in updates to it's metadata as well as increment the revision-id of the record. | ||
|
||
#### Successful Response in JSON | ||
|
||
By passing the option `-H "Accept: application/json"` to `curl`, one may | ||
get a JSON response: | ||
|
||
``` | ||
{"concept-id":"VIS1200000000-PROV1","revision-id":1,"warnings":null,"existing-errors":null} | ||
``` | ||
|
||
### <a name="delete-visualization"></a> Delete a Visualization | ||
|
||
Visualization metadata can be deleted by sending an HTTP DELETE to the URL `%CMR-ENDPOINT%/providers/<provider-id>/visualizations/<native-id>`. The response will include the [concept id](#concept-id) and the [revision id](#revision-id) of the tombstone. | ||
|
||
``` | ||
curl -XDELETE \ | ||
-H "Cmr-Pretty: true" \ | ||
-H "Authorization: Bearer XXXX" \ | ||
%CMR-ENDPOINT%/providers/PROV1/visualizations/sampleNative23Id" | ||
``` | ||
|
||
#### Successful Response in XML | ||
|
||
``` | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<result> | ||
<concept-id>VIS1200000000-PROV1</concept-id> | ||
<revision-id>2</revision-id> | ||
</result> | ||
``` | ||
|
||
#### Successful Response in JSON | ||
|
||
``` | ||
{"concept-id":"VIS1200000000-PROV1","revision-id":2,"warnings":null,"existing-errors":null} | ||
``` | ||
|
||
Attempting to delete an already deleted record will return | ||
the following error message | ||
|
||
#### Unsuccessful Response in XML | ||
|
||
``` | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<errors> | ||
<error>Concept with native-id [sampleNative23Id] and concept-id [VIS1200000000-PROV1] is already deleted.</error> | ||
</errors> | ||
``` | ||
|
||
#### Unsuccessful Response in JSON | ||
|
||
``` | ||
"errors": [ | ||
"Concept with native-id [sampleNative23Id] and concept-id [VIS1200000000-PROV1] is already deleted." | ||
] | ||
``` |
Oops, something went wrong.