Changeset 38294
- Timestamp:
- 2023-10-06T18:07:52+13:00 (7 months ago)
- Location:
- gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/ACTIVATE.sh
r38240 r38294 3 3 source ../_local_collect_config.sh 4 4 5 if [ "x$GSDL3SRCHOME" = "x" ] ; then 6 pushd ../../../../../ && . ./SETUP.bash && popd 7 fi 5 8 6 9 echo "Obtaining lock: gs3-building.flock" 7 10 8 #sudo -u $gs_server_username -- \ 9 bash -c "pushd ../../../../../ && . ./gs3-setup.sh && popd && flock gs3-building.flock activate.pl -removeold -site $site -library_url $gs_library_url $* \"$col\"" 11 ##sudo -u $gs_server_username -- \ 12 #bash -c "pushd ../../../../../ && . ./gs3-setup.sh && popd && flock gs3-building.flock activate.pl -removeold -site $site -library_url $gs_library_url $* \"$col\"" 13 14 15 ./DESTROY-ALL-PREV-OPENANNOTATION-LISTS.sh 16 17 echo "" 18 echo "####" 19 echo "# Activating the collection" 20 echo "####" 21 echo "" 22 23 24 if [ $gs_server_username != $USER ] ; then 25 sudo -u $gs_server_username -- \ 26 flock gs3-building.flock activate.pl -removeold -site $site -library_url $gs_library_url $* "$col" 27 else 28 flock gs3-building.flock activate.pl -removeold -site $site -library_url $gs_library_url $* "$col" 29 30 fi 10 31 11 32 echo "Releasing lock: gs3-building.flock" 33 /bin/rm gs3-building.flock 34 35 echo "" 36 echo "####" 37 echo "# Done activating ... moving on to submitting annotation IDs" 38 echo "####" 39 echo "" 40 41 ./POPULATE-ALL-NEW-OPENANNOTATION-LISTS.sh -
gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/BUILDCOL.sh
r38281 r38294 23 23 if [ $gs_server_username != $USER ] ; then 24 24 sudo -u $gs_server_username -- \ 25 flock gs3-building.flock buildcol.pl -removeold -site $site $ col $*25 flock gs3-building.flock buildcol.pl -removeold -site $site $* $col 26 26 else 27 flock gs3-building.flock buildcol.pl -removeold -site $site $col $* 27 flock gs3-building.flock buildcol.pl -removeold -site $site $* $col 28 29 # flock gs3-building.flock buildcol.pl -removeold -site $site -activate -library_url $gs_library_url $* $col 30 31 # flock gs3-building.flock buildcol.pl -removeold -site $site -mode compress_text $* $col \ 32 # && echo "-------------------" \ 33 # && flock gs3-building.flock buildcol.pl -removeold -site $site -mode build_index $* $col \ 34 # && echo "-------------------" \ 35 # && flock gs3-building.flock buildcol.pl -removeold -site $site -mode infodb $* $col \ 36 # && echo "-------------------" \ 37 # && flock gs3-building.flock activate.pl -removeold -site $site -library_url $gs_library_url $* $col \ 38 # && echo "-------------------" \ 39 # && flock gs3-building.flock buildcol.pl -removeold -site $site -mode extra -library_url $gs_library_url $* $col 28 40 fi 29 41 … … 41 53 42 54 43 44 echo ""45 55 echo "****" 46 echo "****" 47 echo "Before running ./ACTIVATE.sh consider whether you want/need to ingest the" 48 echo "OpenAnnotations into the Simple Annotation Server:" 49 echo " ./SUBMIT-ALL-OPENANNOTATION-LISTS.sh" 50 echo "" 51 echo "And then index them for Mirador3 within document searching:" 52 echo " ./INDEX-ALL-IIIF-MANIFESTS.sh" 53 echo "****" 56 echo "* Next run ./ACTIVATE.sh" 54 57 echo "****" 55 58 echo "" 56 59 60 #echo "" 61 #echo "****" 62 #echo "****" 63 #echo "Before running ./ACTIVATE.sh consider whether you want/need to ingest the" 64 #echo "OpenAnnotations into the Simple Annotation Server:" 65 #echo " ./SUBMIT-ALL-OPENANNOTATION-LISTS.sh" 66 #echo "" 67 #echo "And then index them for Mirador3 within document searching:" 68 #echo " ./INDEX-ALL-IIIF-MANIFESTS.sh" 69 #echo "****" 70 #echo "****" 71 #echo "" 72 -
gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/DELETE-OPENANNOTATION-LIST.sh
r38240 r38294 5 5 iuri_id=$1 6 6 7 8 7 internal_url_base="http://localhost:$gs_http_port/simpleAnnotationStore/annotation" 9 #internal_url_base="http://localhost:4343/simpleAnnotationStore/annotation"10 8 11 9 post_url="${internal_url_base}/destroy" 12 10 13 echo ""14 #echo curl -X DELETE -d "uri=${iuri_id}" "$post_url"15 #curl -X DELETE -d "uri=${iuri_id}" "$post_url"16 11 17 echo curl -X DELETE "$post_url?uri=${iuri_id}"12 echo " " curl -X DELETE "$post_url?uri=${iuri_id}" 18 13 curl -X DELETE "$post_url?uri=${iuri_id}" 19 14 20 21 echo "" -
gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/IMPORT.sh
r38281 r38294 41 41 42 42 43 echo ""44 43 echo "****" 45 echo "****" 46 echo "Before running ./BUILDCOL.sh consider whether you want to 'hard-reset' " 47 echo "the triplestore:" 48 echo " ./RESET-ANNOTATION-STORE.sh" 49 echo "****" 44 echo "* Next run ./BUILDCOL.sh" 50 45 echo "****" 51 46 echo "" 47 48 #echo "" 49 #echo "****" 50 #echo "****" 51 #echo "Before running ./BUILDCOL.sh consider whether you want to 'hard-reset' " 52 #echo "the triplestore:" 53 #echo " ./RESET-ANNOTATION-STORE.sh" 54 #echo "****" 55 #echo "****" 56 #echo "" -
gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/INDEX-IIIF-MANIFEST.sh
r38281 r38294 48 48 iuri="$gs_library_url/sites/$site/collect/$col/tmp/doc-openannotation--with-otherContent--pid$pid.json" 49 49 50 #internal_url_base="http://localhost:4343/simpleAnnotationStore"51 50 internal_url_base="http://localhost:$gs_http_port/simpleAnnotationStore" 52 51 … … 60 59 61 60 if [ $? = 0 ] ; then 61 echo "For debugging purposes, supressing removal of tmp/doc-openannotation--with-otherContent--pid$pid.json" 62 62 /bin/rm tmp/doc-openannotation--with-otherContent--pid$pid.json 63 63 fi … … 65 65 echo "" 66 66 67 # The above curl POST returns JSON output of the form: 68 # {"loaded":{"short_id":"f3bac06f17c9240b76b082dbdcbb365a","uri":"http://ld.greenstone.org/intermuse/programmes/HASH012cd965c3e83d504f4a78cd/manifest"}} 67 # When the IIIFManifest file is ingested, the returned JSON includes the 'short_id' for the 68 # submitted file. This is a value that a built Greenstone collection needs to know to 69 # use Mirador's search within-the-document, but produced at this stage is too late 70 # to be incorporated. The solution to this has been to look into how SAS calculates 71 # this short_id value, and encode the same calculation into the GoogleVisionAPI plugin 72 # so the same value can be computed there (when it is generating OpenAnnotations, and 73 # storing them as associated files), with the computed value set as the metadata field 74 # SASShortID 69 75 70 # It might be the short_id is need for a later step in Greenstone, a comment to this affect was left in this script: 76 77 # In more detail ... 71 78 # 72 # The short_id is needed to ... 79 # To search within specific IIIFManafest, the SAS Search endpoint makes use of a field 80 # called 'short_id'. This turns out to be an MD5 hash of the URL, and is done so the 81 # Restful URL to query the document specifies the 82 83 # For example the Doc ID: 84 # http://ld.greenstone.org/intermuse/demo-localhost/HMS_1/canvas/1 73 85 # 74 # However no other detail given, and at present the features that are needed in Mirador appear to work OK86 # gets hashed to 212807d9741cd2497368dee6c16f2882 75 87 # 76 # Legacy comment written during a development phase that is no longer relevant/required?? 88 # and so is then searched through SAS as: 89 # 90 # http://localhost:8383/simpleAnnotationStore/search-api/212807d9741cd2497368dee6c16f2882/search?q=SOUL 77 91 78 # {"loaded":{"short_id":"e2465cd7e5174f2720cee110d9b4a06a","uri":"http://ld.greenstone.org/intermuse/programmes-and-performers/HASH012cd965c3e83d504f4a78cd/manifest"}}+ echo '' 92 93 # So Greenstone3's XSL presentation layer can correctly construct the URL to search within 94 # the Mirador viewer using the SAS search endpoint, it need to set this short_id as a piece 95 # of metadata (SASShortID). 96 # 97 # This is done in the GoogleVisionAPI Plugin, 'replicating' (computing up-stream, really) 98 # the MD5 hash calculation that SAS also does at this point, when the IIIFManifest is ingested 99 -
gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/SUBMIT-ALL-OPENANNOTATION-LISTS.sh
r38240 r38294 1 1 #!/bin/bash 2 2 3 oalist_files=`find archives -name "openannotation-list*.json" -print` 4 #oalist_files=`find archives/HMS_2.dir/ -name "openannotation-list*.json" -print` 3 4 # In overview: 5 # 6 # For each document that contains an OpenAnnotation associated file(s): 7 # 8 # For each new page (i.e., currently in archives) 9 # Add the newly formed openannotation-list<page-num>.json that is in 'archives' 5 10 6 11 7 echo "" 8 echo "Deleting any existing IDs" 9 for oalist_file in $oalist_files ; do 10 echo " $oalist_file" 11 12 oal_resource_ids=`./oalist-resoure-ids.py $oalist_file` 13 14 for oal_resource_id in $oal_resource_ids ; do 15 echo " $oal_resource_id" 16 ./DELETE-OPENANNOTATION-LIST.sh $oal_resource_id 17 done 18 19 done 20 21 echo "Done deleting any previous existing IDs ... moving on to submitting annotation IDs" 22 sleep 2 23 12 new_oalist_files=`find archives -name "openannotation-list*.json" -print` 24 13 25 14 echo "" 26 15 echo "Populating with new versions of OpenAnnotation-List JSON files" 27 16 28 for oalist_file in $oalist_files ; do 29 echo $oalist_file 30 ./SUBMIT-OPENANNOTATION-LIST.sh $oalist_file 31 17 for oalist_file in $new_oalist_files ; do 18 echo " " $oalist_file 19 ./POPULATE-OPENANNOTATION-LIST.sh $oalist_file 32 20 done 33 21 -
gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/SUBMIT-OPENANNOTATION-LIST.sh
r38240 r38294 4 4 5 5 6 #iuri_prefix=http://localhost:4343/greenstone3/library/sites/intermuse/collect/$col/index/assoc/7 6 iuri_prefix=$gs_library_url/sites/$site/collect/$col/index/assoc/ 8 7 9 ifilename=$ {1:-archives/HASH012c.dir/openannotation-list.json}8 ifilename=$1 10 9 11 10 iuri_tail=${ifilename#archives/} … … 13 12 iuri="${iuri_prefix}${iuri_tail}" 14 13 15 16 #internal_url_base="http://localhost:4343/simpleAnnotationStore/annotation"17 14 internal_url_base="http://localhost:$gs_http_port/simpleAnnotationStore/annotation" 18 19 15 post_url="${internal_url_base}/populate" 20 16 21 17 22 echo "" 18 #echo curl -X POST -d "uri=${iuri}" "$post_url" 19 #curl -X POST -d "uri=${iuri}" "$post_url" 23 20 24 echo curl -X POST -d "uri=${iuri}" "$post_url"25 curl -X POST - d "uri=${iuri}" "$post_url"21 echo " " curl -X POST -H \'Content-Type: text/plain\' -d \"@$ifilename\" $post_url 22 curl -X POST -H 'Content-Type: text/plain' -d "@$ifilename" $post_url 26 23 27 echo "" -
gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/etc/collectionConfig.xml
r38250 r38294 298 298 299 299 <search type="jenaTDB" orthogonal="true"/> 300 300 <!-- 301 <search type="sasOpenAnnotation" orthogonal="true"/> 302 --> 303 <!-- 304 <search type="sasIIIFManifest" orthogonal="true"/> 305 --> 301 306 302 307 <infodb type="jdbm"/>
Note:
See TracChangeset
for help on using the changeset viewer.