-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathflat-deposit.xml
178 lines (177 loc) · 10.1 KB
/
flat-deposit.xml
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns:flat="java:nl.mpi.tla.flat">
<config>
<import class="nl.mpi.tla.flat.deposit.context.Environment" prefix="env-"/>
<import class="nl.mpi.tla.flat.deposit.context.SystemProperties" prefix="sys-"/>
<property name="activeFedoraNamespace" value="{$env-FLAT_NAMESPACE}" uniq="true"/>
<property name="fedoraNamespace" value="comic"/>
<property name="fedoraNamespace" value="mpi"/>
<property name="fedoraNamespace" value="lat"/>
<property name="fitsService" value="http://localhost:8080/fits/" uniq="true"/>
<property name="home" value="/app/flat" uniq="true"/>
<property name="base" value="{$home}/deposit" uniq="true"/>
<property name="bag" value="{$base}/bags/{$sip}" uniq="true"/>
<property name="work" value="{flat:findBagBase($bag)}" uniq="true"/>
<property name="easy" value="{$base}/easy" uniq="true"/>
<property name="epicPrefix" value="{doc(concat($base,'/policies/epic-config.xml'))//HandlePrefix}"/>
<property name="gsearchUser" value="fgsAdmin"/>
<property name="gsearchPassword" value="fgsAdmin"/>
<property name="gsearchServer" value="http://localhost:8080/fedoragsearch"/>
<property name="dk-rollbackLog" value="{$work}/rollback.log"/>
<property name="dk-pidList" value="{$work}/pids.csv"/>
</config>
<init>
<action name="logSetup" class="nl.mpi.tla.flat.deposit.action.WorkspaceLogSetup">
<parameter name="dir" value="{$work}/logs"/>
<parameter name="logConfig" value="{$base}/policies/log-config.xml"/>
</action>
<action class="nl.mpi.tla.flat.deposit.action.Owner">
<parameter name="policy" value="{$work}/metadata/policy.n3"/>
<parameter name="dir" value="{$work}/acl"/>
</action>
<action name="check workspace" class="nl.mpi.tla.flat.deposit.action.SIPLoad">
<parameter name="sip" value="{$work}/metadata/record.cmdi"/>
</action>
<action class="nl.mpi.tla.flat.deposit.action.FedoraIsAIPUpdate">
<parameter name="fedoraConfig" value="{$base}/policies/fedora-config.xml"/>
<parameter name="prefix" value="{$epicPrefix}"/>
</action>
<action class="nl.mpi.tla.flat.deposit.action.FedoraLoadCollectionHierarchy">
<parameter name="fedoraConfig" value="{$base}/policies/fedora-config.xml"/>
</action>
</init>
<main>
<action class="nl.mpi.tla.flat.deposit.action.IndexRollback">
<parameter name="gsearchServer" value="{$gsearchServer}"/>
<parameter name="gsearchUser" value="{$gsearchUser}"/>
<parameter name="gsearchPassword" value="{$gsearchPassword}"/>
</action>
<action name="assemble package" class="nl.mpi.tla.flat.deposit.action.ResourceMapping">
<parameter name="dir" value="{$work}/resources"/>
<parameter name="fedoraConfig" value="{$base}/policies/fedora-config.xml"/>
</action>
<action name="validate metadata" class="nl.mpi.tla.flat.deposit.action.Validate">
<parameter name="schemaCache" value="{$base}/cache/schemas"/>
<parameter name="rules" value="{$base}/policies/rules.sch"/>
</action>
<action name="validate resources" class="nl.mpi.tla.flat.deposit.action.FITS">
<parameter name="fitsService" value="{$fitsService}"/>
<parameter name="mimetypes" value="{$base}/policies/fits-mimetypes.xml"/>
<parameter name="dir" value="{$work}/fits"/>
</action>
<!-- ^^^ VALIDATE vvv ARCHIVE -->
<action name="purge updates" class="nl.mpi.tla.flat.deposit.action.PurgeUpdates">
<parameter name="fedoraConfig" value="{$base}/policies/fedora-config.xml"/>
<parameter name="dir" value="{$work}/fits"/>
<parameter name="ext" value=".FITS.xml"/>
<parameter name="path" value="normalize-space(//fits:md5checksum)"/>
</action>
<action class="nl.mpi.tla.flat.deposit.action.HandleAssignment">
<parameter name="prefix" value="{$epicPrefix}"/>
</action>
<!--<action class="nl.mpi.tla.flat.deposit.action.Locking">
<parameter name="mode" value="lock"/>
<parameter name="what" value="sip"/>
</action>-->
<action name="persist resources" class="nl.mpi.tla.flat.deposit.action.Persist">
<parameter name="resourcesDir" value="/app/flat/data"/>
<parameter name="policyFile" value="{$base}/policies/persistence-policy.xml"/>
<parameter name="xpathDatasetName" value="(replace(replace(replace(/cmd:CMD/cmd:Header/cmd:MdSelfLink/@lat:flatURI,'.*{$epicPrefix}_',''),'#.*',''),'_','-'),replace(/cmd:CMD/cmd:Header/cmd:MdSelfLink,'.*{$epicPrefix}/',''))[.!=''][1]"/>
</action>
<action name="acl" class="nl.mpi.tla.flat.deposit.action.ACL">
<parameter name="policy" value="{$work}/metadata/policy.n3"/>
<parameter name="roles" value="{$base}/policies/roles.xml"/>
<parameter name="dir" value="{$work}/acl"/>
</action>
<action class="nl.mpi.tla.flat.deposit.action.ACLUpdate">
<parameter name="fedoraConfig" value="{$base}/policies/fedora-config.xml"/>
<parameter name="dir" value="{$work}/acl"/>
</action>
<action class="nl.mpi.tla.flat.deposit.action.FOXCreate">
<parameter name="owner" value="{$work}/acl/owner.xml"/>
<parameter name="fedoraConfig" value="{$base}/policies/fedora-config.xml"/>
<parameter name="cmd2fox" value="{$base}/policies/cmd2fox.xsl"/>
<parameter name="jar_cmd2fox" value="{$base}/transforms/cmd2fox.xsl"/>
<parameter name="dir" value="{$work}/fox"/>
<parameter name="icons" value="{$env-FLAT_ICON_DIR}"/>
<parameter name="policies" value="{$work}/acl"/>
<parameter name="policies" value="{$base}/policies"/>
<!--<parameter name="license-uri" value="https://www.meertens.knaw.nl/flat/content/terms"/>-->
</action>
<action class="nl.mpi.tla.flat.deposit.action.FOXUpdate">
<parameter name="debug" value="true"/>
<parameter name="dir" value="{$work}/fox"/>
</action>
<action class="nl.mpi.tla.flat.deposit.action.FedoraUser">
<parameter name="user" value="{$work}/acl/owner.xml"/>
<parameter name="fedoraConfig" value="{$base}/policies/fedora-config.xml"/>
<parameter name="userFedoraConfig" value="{$work}/acl/fedora-config.xml"/>
<parameter name="drupal" value="/var/www/html/flat"/>
<parameter name="drush" value="/var/www/composer/vendor/drush/drush/drush"/>
</action>
<!--<action class="nl.mpi.tla.flat.deposit.action.Locking">
<parameter name="mode" value="lock"/>
<!-\-
<parameter name="what" value="sip"/>
<parameter name="what" value="parent collections"/>
<parameter name="what" value="all collections"/>
<parameter name="what" value="foo"/>
<parameter name="what" value="{//xpath}"/>
-\->
<parameter name="what" value="collections"/>
</action>-->
<action class="nl.mpi.tla.flat.deposit.action.UpdateCollections">
<parameter name="prefix" value="{$epicPrefix}"/>
<parameter name="fedoraConfig" value="{$work}/acl/fedora-config.xml"/>
<parameter name="firstDir" value="{$work}/fox"/>
<parameter name="dir" value="{$work}/admin-fox"/>
<!--<parameter name="try-fix-pid" value="true"/>-->
</action>
<!-- SIP + parent collection -->
<action name="update sip and parent collection" class="nl.mpi.tla.flat.deposit.action.FedoraInteract">
<parameter name="fedoraConfig" value="{$work}/acl/fedora-config.xml"/>
<parameter name="dir" value="{$work}/fox"/>
</action>
<!-- ancestor collections -->
<action name="update ancestor collections" class="nl.mpi.tla.flat.deposit.action.FedoraInteract">
<parameter name="fedoraConfig" value="{$base}/policies/fedora-config.xml"/>
<parameter name="dir" value="{$work}/admin-fox"/>
</action>
<!--<action class="nl.mpi.tla.flat.deposit.action.Locking">
<parameter name="mode" value="unlock"/>
</action>-->
<action class="nl.mpi.tla.flat.deposit.action.FedoraDelete">
<parameter name="fedoraConfig" value="{$work}/acl/fedora-config.xml"/>
</action>
<action class="nl.mpi.tla.flat.deposit.action.EPICHandleCreation">
<parameter name="fedoraConfig" value="{$base}/policies/fedora-config.xml"/>
<parameter name="epicConfig" value="{$base}/policies/epic-config.xml"/>
</action>
<action class="nl.mpi.tla.flat.deposit.action.Index">
<parameter name="gsearchServer" value="{$gsearchServer}"/>
<parameter name="gsearchUser" value="{$gsearchUser}"/>
<parameter name="gsearchPassword" value="{$gsearchPassword}"/>
</action>
<!--
<action class="nl.mpi.tla.flat.deposit.action.WorkspaceCleanup"/>
-->
</main>
<exception>
</exception>
<rollback/>
<final>
<!--
<action class="nl.mpi.tla.flat.deposit.action.Mail">
<parameter name="config" value="{$base}/policies/mail-config.xml"/>
<parameter name="subject" value=": deposit for user "/>
<parameter name="template" value="{$base}/policies/mail-exception.xsl"/>
<parameter name="tmpl-bag" value="{$bag}"/>
<parameter name="tmpl-user" value="{if (sx:fileExists(concat('file:',$work,'/acl/owner.xml') cast as xs:anyURI)) then (doc(concat($work,'/acl/owner.xml'))/user/name) else ('')}"/>
</action>
-->
<action name="status" class="nl.mpi.tla.flat.deposit.action.UpdateSwordStatus">
<parameter name="props" value="{$bag}/deposit.properties"/>
</action>
<action name="logTeardown" class="nl.mpi.tla.flat.deposit.action.WorkspaceLogCleanup"/>
</final>
</flow>