-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
executable file
·88 lines (80 loc) · 2.2 KB
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/sh
# Initialize the repository contents
# Note: Create Elasticseach description index first.
curl -v -X DELETE \
http://localhost:9200/descriptions
curl -v -X PUT \
-H "Content-Type: application/json; charset=utf-8" \
-H "Accept: application/json" \
--data @- \
http://localhost:9200/descriptions << EOF
{
"settings": {
"analysis": {
"analyzer": {
"descriptive_path": {
"tokenizer": "custom_hierarchy"
}
},
"tokenizer": {
"custom_hierarchy": {
"type": "path_hierarchy",
"delimiter": "/"
}
}
}
},
"mappings": {
"properties": {
"pathfacet": {
"type": "text",
"fielddata": "true",
"analyzer": "descriptive_path"
},
"path": {
"type": "keyword"
},
"title": {
"type": "text"
},
"description": {
"type": "text"
},
"level": {
"type": "keyword"
},
"depth": {
"type": "short"
}
}
}
}
EOF
curl -v -X POST \
-H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" \
-H "Slug: submissions" \
http://localhost:9090
curl -v -X POST \
-H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" \
-H "Slug: description" \
http://localhost:9090
curl -v -X POST \
-H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" \
-H "Slug: name-authority" \
http://localhost:9090
curl -v -X POST \
-H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" \
-H "Slug: person" \
http://localhost:9090/name-authority/
curl -v -X POST \
-H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" \
-H "Slug: organization" \
http://localhost:9090/name-authority/
curl -v -X POST \
-H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" \
-H "Slug: place" \
http://localhost:9090/name-authority/
curl -v -X PUT --data "@docker_stack_vols/config/SKOS_Samples_list_rev_20220902.json" \
-H "Link: <http://www.w3.org/ns/ldp#RDFSource>; rel=\"type\"" \
-H "Content-Type: application/ld+json" \
http://localhost:9090/name-authority/person/LOC_SKOS_Subset.json