This repository has been archived by the owner on Jun 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Example #1 Skos Conversion & Sink
Nordine Bittich edited this page Mar 22, 2020
·
1 revision
- Go to http://localhost:8088/api/project/swagger-ui.html#/
- Create a new project, e.g:
curl -X POST "http://localhost:8088/api/project/?name=skos" -H "accept: */*"
- response:
{ "id": "dda151c2-25c9-4b37-b720-b1892fdbc3ff", "name": "skos", "fileEvents": [], "sinkResponses": [] }
- copy the id and download the following example: Skos XLSX File
- Add the downloaded file to the project:
curl -X PUT "http://localhost:8088/api/project/add-file?projectId=dda151c2-25c9-4b37-b720-b1892fdbc3ff" -H "accept: */*" -H "Content-Type: multipart/form-data" -d {"file":{}}
- response:
{
"id": "dda151c2-25c9-4b37-b720-b1892fdbc3ff",
"name": "skos",
"fileEvents": [
{
"id": "1c0ca689-e796-4101-af2d-458d5361784f",
"contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"eventType": "PROJECT_FILE",
"originalFilename": "excel2skos-exemple-1.xlsx",
"name": "excel2skos-exemple-1.xlsx",
"size": 10190,
"creationDate": null,
"lastModifiedDate": null
}
],
"sinkResponses": []
}
-
Copy the file event id (here: 1c0ca689-e796-4101-af2d-458d5361784f)
-
Run the skos conversion, you will need the filevent id & the project id
-
response, you have a new file derived from the excel:
{
"id": "dda151c2-25c9-4b37-b720-b1892fdbc3ff",
"name": "skos",
"fileEvents": [
{
"id": "1c0ca689-e796-4101-af2d-458d5361784f",
"contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"eventType": "PROJECT_FILE",
"originalFilename": "excel2skos-exemple-1.xlsx",
"name": "excel2skos-exemple-1.xlsx",
"size": 10190,
"creationDate": null,
"lastModifiedDate": null
},
{
"id": "e439617a-365c-4254-b705-12516e967030",
"contentType": "text/turtle",
"eventType": "SKOS_PLAY_CONVERTER_OUTPUT",
"originalFilename": "excel2skos-exemple-1-derived-output-skos-2020-03-17-10-21.ttl",
"name": "excel2skos-exemple-1-derived-output-skos-2020-03-17-10-21.ttl",
"size": 2993,
"creationDate": null,
"lastModifiedDate": null
}
],
"sinkResponses": []
}
-
Save the transformed file to blazegraph / mongodb
curl -X POST "http://localhost:8088/api/project/{projectId}/sink" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"projectId\": \"dda151c2-25c9-4b37-b720-b1892fdbc3ff\", \"rdfFileEventId\": \"e439617a-365c-4254-b705-12516e967030\"}"
-
the triples are stored in blazegraph within the namespace "skos" (same as project name):
-
the rdf as jsonld is stored in mongodb in DB RDF_COLLECTION within the collection "skos" (same as project name):
-
audit logs :
© artcoded.tech