Skip to content

Commit

Permalink
update comments on add-sets-to-db and basex command script
Browse files Browse the repository at this point in the history
  • Loading branch information
CanOfBees committed May 4, 2017
1 parent 0d85034 commit 057cfbf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
12 changes: 11 additions & 1 deletion add-sets-to-db.xq
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ declare function local:resume($base-url as xs:string, $token as xs:string) as do
local:resume($base-url, $new-token))
};

for $set in db:open('repox-sets')/set/spec/text()
for $set in db:open('repox-sets')/set/spec/text()[fn:not(fn:starts-with(., 'utk_'))]
let $base-url := "http://dpla.lib.utk.edu/repox/OAIHandler" (: UTK's REPOX install :)
let $verb := "?verb=ListRecords&metadataPrefix=oai_dc"
let $set-spec := "&set=" || $set
Expand All @@ -41,4 +41,14 @@ for $record in $response//oai:record
let $id := $record/oai:header/oai:identifier/text()
return(
db:add(($set), $record, $id, map { 'addcache': true() } )
),
for $set in db:open('repox-sets')/set/spec/text()[fn:starts-with(., 'utk_')]
let $base-url := "http://dpla.lib.utk.edu/repox/OAIHandler"
let $verb := "?verb=ListRecords&metadataPrefix=mods"
let $set-spec := "&set=" || $set
let $response := local:request($base-url, $verb, $set-spec)
for $record in $response//oai:record
let $id := $record/oai:header/oai:identifier/text()
return(
db:add(($set), $record, $id, map { 'addcache': true() })
)
5 changes: 5 additions & 0 deletions create-repox-sets-db.bxs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@
sets
-->
<run file="create-db-for-each-set.xq"/>

<!--
`run` an xquery script that adds <record>s to each set database
-->
<run file="add-sets-to-db.xq"/>
</commands>

0 comments on commit 057cfbf

Please sign in to comment.