Commit 309fba4b3ded8e820070a8ea62c837a5216fb737

Authored by Fernando Ribeiro
1 parent ec96d442ed
Exists in OPENAIRE5.X

Changed xoai.xml to openaire 3.0

setup-data/dspace-source/dspace/config/crosswalks/oai/xoai.xml
... ... @@ -59,29 +59,55 @@
59 59 </Description>
60 60 </Context>
61 61  
62   - <!--
63   - OpenAIRE Guidelines 1.1:
64   -
65   - - https://guidelines.openaire.eu/en/latest/
66   -
67   - There is a limitation over the embargoedEndDate parameter:
68   -
69   - - Predefined DSpace fields don't allow to set this up with a default.
  62 + <!--
  63 + OpenAIRE Guidelines 3.0:
  64 +
  65 + - https://guidelines.openaire.eu/
  66 +
  67 + There is a limitation over the embargoedEndDate parameter:
  68 +
  69 + - Predefined DSpace fields don't allow to set this up with a default.
70 70 -->
  71 +
71 72 <Context baseurl="openaire" name="OpenAIRE Context">
72   - <!-- Date format, field prefixes, etc are ensured by the transformer -->
73   - <Transformer ref="openaireTransformer"/>
74   - <!-- OpenAIRE filter -->
75   - <Filter ref="openAireFilter"/>
76   - <!-- Just an alias, in fact it returns all items within the driver context -->
77   - <Set ref="openaireSet"/>
78   - <!-- Metadata Formats -->
79   - <Format ref="oaidc"/>
80   - <Format ref="mets"/>
81   - <Description>
82   - This contexts complies with OpenAIRE rules.
83   - </Description>
  73 + <!-- Date format, field prefixes, etc are ensured by the transformer -->
  74 + <Transformer ref="openaireTransformer"/>
  75 + <!-- OpenAIRE filter -->
  76 + <Filter ref="openAireFilter"/>
  77 + <!-- Just an alias, in fact it returns all items within the driver context -->
  78 + <Set ref="openaireSet"/>
  79 + <!-- Metadata Formats -->
  80 + <Format ref="oaidc"/>
  81 + <Format ref="mets"/>
  82 + <Description>
  83 + This contexts complies with OpenAIRE Guidelines for Literature Repositories v3.0.
  84 + </Description>
  85 + </Context>
  86 + <!--
  87 + OpenAIRE Guidelines 3.0:
  88 +
  89 + - https://guidelines.openaire.eu/
  90 +
  91 + There is a limitation over the embargoedEndDate parameter:
  92 +
  93 + - Predefined DSpace fields don't allow to set this up with a default.
  94 + -->
  95 + <Context baseurl="openaireDataset" name="OpenAIRE dataset Context">
  96 + <!-- Date format, field prefixes, etc are ensured by the transformer -->
  97 + <Transformer ref="openaireTransformer"/>
  98 + <!-- OpenAIRE filter -->
  99 + <Filter ref="openAireDatasetFilter"/>
  100 + <!-- Just an alias, in fact it returns all items within the driver context -->
  101 + <Set ref="openaireDatasetSet"/>
  102 + <!-- Metadata Formats -->
  103 + <Format ref="oaidc"/>
  104 + <Format ref="mets"/>
  105 + <Description>
  106 + This contexts complies with OpenAIRE Guidelines for Literature Repositories v3.0 on Datasets.
  107 + </Description>
84 108 </Context>
  109 +
  110 +
85 111 <!-- FCT FILTER -->
86 112 <Context baseurl="fct" name="FCT Context">
87 113 <!-- Date format, field prefixes, etc are ensured by the transformer -->
... ... @@ -244,54 +270,103 @@
244 270 </Definition>
245 271 </Filter>
246 272  
247   - <!-- OpenAIRE filter for records returned by OAI-PMH.
248   - By default, return an Item record:
249   - * If a Title & Author field both exist
250   - * AND a valid DRIVER Document Type exists
251   - * AND Item is either publicly accessible OR Withdrawn (for tombstones)
252   - * AND the OpenAIRE "dc.relation" is specified
253   - This filter is only used in the OpenAIRE context ([oai]/openaire).
254   - -->
255 273  
  274 + <!-- OpenAIRE filter for records returned by OAI-PMH.
  275 + By default, return an Item record:
  276 + * If a Title & Author field both exist
  277 + * AND a valid DRIVER Document Type exists
  278 + * AND Item is either publicly accessible OR Withdrawn (for tombstones)
  279 + * AND the OpenAIRE "dc.relation" is specified
  280 + This filter is only used in the OpenAIRE context ([oai]/openaire).
  281 + -->
256 282 <Filter id="openAireFilter">
257   - <Definition>
258   - <And>
259   - <LeftCondition>
260   - <And>
261   - <LeftCondition>
262   - <Custom ref="titleExistsCondition"/>
263   - </LeftCondition>
264   - <RightCondition>
265   - <Custom ref="authorExistsCondition"/>
266   - </RightCondition>
267   - </And>
268   - </LeftCondition>
269   - <RightCondition>
270   - <And>
271   - <LeftCondition>
272   - <Custom ref="driverDocumentTypeCondition"/>
273   - </LeftCondition>
274   - <RightCondition>
275   - <And>
276   - <LeftCondition>
277   - <Or>
278   - <LeftCondition>
279   - <Custom ref="itemAccessCondition"/>
280   - </LeftCondition>
281   - <RightCondition>
282   - <Custom ref="itemWithdrawnCondition"/>
283   - </RightCondition>
284   - </Or>
285   - </LeftCondition>
286   - <RightCondition>
287   - <Custom ref="openaireRelationCondition"/>
288   - </RightCondition>
289   - </And>
290   - </RightCondition>
291   - </And>
292   - </RightCondition>
293   - </And>
294   - </Definition>
  283 + <Definition>
  284 + <And>
  285 + <LeftCondition>
  286 + <And>
  287 + <LeftCondition>
  288 + <And>
  289 + <LeftCondition>
  290 + <Custom ref="titleExistsCondition"/>
  291 + </LeftCondition>
  292 + <RightCondition>
  293 + <Custom ref="authorExistsCondition"/>
  294 + </RightCondition>
  295 + </And>
  296 + </LeftCondition>
  297 + <RightCondition>
  298 + <Custom ref="driverDocumentTypeCondition"/>
  299 + </RightCondition>
  300 + </And>
  301 + </LeftCondition>
  302 + <RightCondition>
  303 + <Or>
  304 + <LeftCondition>
  305 + <And>
  306 + <LeftCondition>
  307 + <Or>
  308 + <LeftCondition>
  309 + <Custom ref="itemAccessCondition"/>
  310 + </LeftCondition>
  311 + <RightCondition>
  312 + <Custom ref="itemWithdrawnCondition"/>
  313 + </RightCondition>
  314 + </Or>
  315 + </LeftCondition>
  316 + <RightCondition>
  317 + <Custom ref="driverAccessCondition"/>
  318 + </RightCondition>
  319 + </And>
  320 + </LeftCondition>
  321 + <RightCondition>
  322 + <Custom ref="openaireRelationCondition"/>
  323 + </RightCondition>
  324 + </Or>
  325 + </RightCondition>
  326 + </And>
  327 + </Definition>
  328 + </Filter>
  329 +
  330 + <!-- OpenAIRE filter for records returned by OAI-PMH.
  331 + By default, return an Item record:
  332 + * If a Title & Author field both exist
  333 + * AND a valid DRIVER Document Type exists
  334 + * AND Item is either publicly accessible OR Withdrawn (for tombstones)
  335 + * AND the OpenAIRE "dc.relation" is specified
  336 + This filter is only used in the OpenAIRE context ([oai]/openaire).
  337 + -->
  338 + <Filter id="openAireDatasetFilter">
  339 + <Definition>
  340 + <And>
  341 + <LeftCondition>
  342 + <Custom ref="datasetDocumentTypeCondition"/>
  343 + </LeftCondition>
  344 + <RightCondition>
  345 + <And>
  346 + <LeftCondition>
  347 + <Or>
  348 + <LeftCondition>
  349 + <Custom ref="itemAccessCondition"/>
  350 + </LeftCondition>
  351 + <RightCondition>
  352 + <Custom ref="itemWithdrawnCondition"/>
  353 + </RightCondition>
  354 + </Or>
  355 + </LeftCondition>
  356 + <RightCondition>
  357 + <Or>
  358 + <LeftCondition>
  359 + <Custom ref="driverAccessCondition"/>
  360 + </LeftCondition>
  361 + <RightCondition>
  362 + <Custom ref="openaireRelationCondition"/>
  363 + </RightCondition>
  364 + </Or>
  365 + </RightCondition>
  366 + </And>
  367 + </RightCondition>
  368 + </And>
  369 + </Definition>
295 370 </Filter>
296 371  
297 372 <!-- UKETD Filter for records returned by OAI-PMH.
... ... @@ -427,9 +502,24 @@
427 502 <string>annotation</string>
428 503 <string>contributionToPeriodical</string>
429 504 <string>patent</string>
  505 + <string>dataset</string>
430 506 <string>other</string>
431   - </list>
432   - </Configuration>
  507 + </list>
  508 + </Configuration>
  509 + </CustomCondition>
  510 +
  511 + <!-- This condition determines if an Item has a "dc.type" field
  512 + specifying one of the valid DATASET document types. -->
  513 + <CustomCondition id="datasetDocumentTypeCondition">
  514 + <Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
  515 + <Configuration>
  516 + <string name="field">dc.type</string>
  517 + <string name="operator">contains</string>
  518 + <list name="values">
  519 + <string>dataset</string>
  520 + <string>Dataset</string>
  521 + </list>
  522 + </Configuration>
433 523 </CustomCondition>
434 524  
435 525 <!-- This condition determines if an Item has a "dc.rights" field
... ... @@ -441,7 +531,7 @@
441 531 <string name="field">dc.rights</string>
442 532 <string name="operator">contains</string>
443 533 <list name="values">
444   - <string>open access</string>
  534 + <!--<string>open access</string>-->
445 535 <string>openAccess</string>
446 536 </list>
447 537 </Configuration>
... ... @@ -467,7 +557,7 @@
467 557 <Configuration>
468 558 <string name="field">dc.relation</string>
469 559 <string name="operator">starts_with</string>
470   - <string name="value">info:eu-repo/grantAgreement</string>
  560 + <string name="value">info:eu-repo/grantAgreement/</string>
471 561 </Configuration>
472 562 </CustomCondition>
473 563 </Filters>
... ... @@ -478,10 +568,15 @@
478 568 <Name>Open Access DRIVERset</Name>
479 569 <!-- Just an alias -->
480 570 </Set>
481   - <Set id="openaireSet">
482   - <Spec>ec_fundedresources</Spec>
483   - <Name>EC_fundedresources set</Name>
484   - <!-- Just an alias -->
  571 + <Set id="openaireSet">
  572 + <Spec>openaire</Spec>
  573 + <Name>OpenAIRE</Name>
  574 + <!-- Just an alias -->
  575 + </Set>
  576 + <Set id="openaireDatasetSet">
  577 + <Spec>openaireDataset</Spec>
  578 + <Name>OpenAIRE datasets</Name>
  579 + <!-- Just an alias -->
485 580 </Set>
486 581 <!-- FCT FILTER -->
487 582 <Set id="fctSet">
... ...