Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dvglc committed Jun 7, 2019
2 parents fa98433 + b0cb664 commit 0a0f172
Show file tree
Hide file tree
Showing 28 changed files with 807 additions and 123,430 deletions.
17 changes: 12 additions & 5 deletions controller.xql
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,12 @@ return
else if (request:get-header('X-Forwarded-Host') = "id." || $config:serverdomain) then
let $debug1 := if ($config:debug = ("trace", "info")) then console:log("Id requested: " || $net:forwardedForServername || $exist:path || $parameterString || ". (" || net:negotiateContentType($net:servedContentTypes, '') || ')') else ()
let $debug1 := if ($config:debug = ("trace")) then console:log("Redirect (303) to '" || $config:apiserver || "/v1" || $exist:path || $parameterString || "'.") else ()
return net:redirect-with-303($config:apiserver || "/v1" || replace($exist:path, '/works\.', '/texts/') || $parameterString)

return
if (matches($exist:path, '(/texts|/concepts/|/authors)')) then
net:redirect-with-303($config:apiserver || "/v1" || $exist:path || $parameterString)
else if (matches($exist:path, '/works\.')) then
net:redirect-with-303($config:apiserver || "/v1" || replace($exist:path, '/works\.', '/texts/') || $parameterString)
else net:error(404, $netVars, ())

(: *** TEI file service (X-Forwarded-Host = 'tei.{$config:serverdomain}') *** :)
else if (request:get-header('X-Forwarded-Host') = "tei." || $config:serverdomain) then
Expand All @@ -215,6 +219,9 @@ return
if (starts-with(lower-case($reqText), 'w0')) then
let $debug := if ($config:debug = ("trace", "info")) then console:log("redirect to tei api: " || $config:apiserver || "/v1/texts/" || replace($reqText, '.xml', '') || $parameters || ".") else ()
return net:redirect($config:apiserver || "/v1/texts/" || replace($reqText, '.xml', '') || $parameters, $netVars)
else if (not($reqText)) then
let $debug := if ($config:debug = ("trace", "info")) then console:log("redirect to tei api: " || $config:apiserver || "/v1/texts" || $parameters || ".") else ()
return net:redirect($config:apiserver || "/v1/texts" || $parameters, $netVars)
else net:error(404, $netVars, ())


Expand Down Expand Up @@ -256,9 +263,9 @@ return
else if ($exist:resource eq 'SvSal_author.xml') then 'saltei-author.xml'
else if ($exist:resource eq 'SvSal_author.rng') then 'saltei-author.rng'
else $exist:resource
let $finalPath := "/tei/meta/" || $resource
let $debug := if ($config:debug = ("trace", "info")) then console:log("File download requested: " || $net:forwardedForServername || $exist:path || $parameterString || ", redirecting to salamanca-data: " || $finalPath || '?' || string-join($netVars('params'), '&') || ".") else ()
return net:forward-to-data($finalPath, $netVars, ())
let $finalPath := '/meta/' || $resource
let $debug := if ($config:debug = ("trace", "info")) then console:log("File download requested: " || $net:forwardedForServername || $exist:path || $parameterString || ", redirecting to directory: " || $finalPath || '?' || string-join($netVars('params'), '&') || ".") else ()
return net:forward-to-tei($finalPath, $netVars, ())
else
let $finalPath := "/resources/files" || $prelimPath
let $debug := if ($config:debug = ("trace", "info")) then console:log("File download requested: " || $net:forwardedForServername || $exist:path || $parameterString || ", redirecting to " || $finalPath || '?' || string-join($netVars('params'), '&') || ".") else ()
Expand Down
4 changes: 2 additions & 2 deletions corpus-admin.xql
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ declare namespace tei = "http://www.tei-c.org/ns/1.0";
let $format := request:get-parameter('format', '')

let $save :=
if ($format eq 'tei') then admin:createTeiCorpus()
else if ($format eq 'txt') then admin:createTxtCorpus()
if ($format eq 'tei') then admin:createTeiCorpus('admin')
else if ($format eq 'txt') then admin:createTxtCorpus('admin')
else ()

return
Expand Down
2 changes: 2 additions & 0 deletions data/i18n/collection_de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
<msg key="notPublished">Noch nicht veröffentlicht</msg>
<msg key="language">Sprache</msg>
<msg key="languageS">Sprache(n)</msg>
<msg key="material">Material</msg>
<msg key="readWork">Lesen</msg>
<msg key="digitalPublisher">Veröffentlicht durch</msg>
<msg key="workViews">Ansichten für dieses Werk</msg>
<msg key="volViews">Ansichten für diesen Band</msg>
Expand Down
2 changes: 1 addition & 1 deletion data/i18n/collection_en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

<!-- project.html -->

<msg key="projectDesc">Project description</msg>
<msg key="projectDesc">Project Description</msg>
<msg key="pojectDesc1">The (re-)discovery of the fundamental importance of the School of Salamanca for the early modern discourse about law, politics, religion and ethics
is widespread among of philosophers and legal historians. During the 16th and 17th centuries, the intellectual sparks emitted by this academic force field reached not
only the most far-flung cities of the Spanish monarchy, be it Mexico, Madrid or Manila: they also spread to universities in the protestant territories of the Ancien Régime.
Expand Down
Loading

0 comments on commit 0a0f172

Please sign in to comment.