-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoaicat-figshare-example.properties
86 lines (71 loc) · 5.08 KB
/
oaicat-figshare-example.properties
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
# OAICat Configuration
# This paramter is optional. Comment it out if you want the code to get the baseURL
# from the request instead. Setting it here is only necessary if your firewall messes
# with the request in a way that alters the baseURL from your expectations.
# OAIHandler.baseURL=http://localhost:8080/oaicat/OAIHandler
# Uncomment this line if you want to include an XSL stylesheet reference
# in the OAI response so they can be rendered into HTML by browsers.
OAIHandler.styleSheet=/oaicat/oaicat.xsl
# Uncomment this line if you want OAICat to render the responses into HTML on the server using
# OAIHandler.stylesheet when the request comes from an old browser.
#OAIHandler.renderForOldBrowsers=true
###
### RECOMMENDED SETUP FOR OAICAT-FIGSHARE
###
AbstractCatalog.oaiCatalogClassName=net.datanoid.oaipmh.figshare.FigshareOAICatalog
AbstractCatalog.recordFactoryClassName=net.datanoid.oaipmh.figshare.JSONRecordFactory
AbstractCatalog.secondsToLive=3600
#AbstractCatalog.granularity=YYYY-MM-DD
AbstractCatalog.granularity=YYYY-MM-DDThh:mm:ssZ
# Custom Identify response values
Identify.repositoryName=Custom Figshare Repository
Identify.adminEmail=mailto:digital-stewardship@unimelb.edu.au
Identify.earliestDatestamp=2014-01-01T00:00:00Z
Identify.deletedRecord=no
# This is the new way to specify <description> elements in general for the Identify verb
# Append something unique like .1, .2, etc to 'Identify.description' for each occurrence
Identify.description.1=<description><oai-identifier xmlns=\"http://www.openarchives.org/OAI/2.0/oai-identifier\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.openarchives.org/OAI/2.0/oai-identifier http://www.openarchives.org/OAI/2.0/oai-identifier.xsd\"><scheme>oai</scheme><repositoryIdentifier>figshare.com</repositoryIdentifier><delimiter>:</delimiter><sampleIdentifier>oai:figshare.com:article/9643055</sampleIdentifier></oai-identifier></description>
###
### CUSTOM PROPERTIES FOR OAICAT-FIGSHARE
###
## Note: Minimal changes are needed, update FigshareOAICatalog.searchFilter to your
## desired search filter (one line only), and/or or FigshareOAICatalog.institution
## to your figshare institution/portal ID (an integer). Either are optional.
#FigshareOAICatalog.maxListSize=10
#FigshareOAICatalog.searchFilter=:keyword: "Digital Heritage"
#FigshareOAICatalog.searchFilter=:institution: melbourne AND :group: Zoology
#FigshareOAICatalog.institution=8
JSONRecordFactory.repositoryIdentifier=figshare.com
# List the supported metadataPrefixes along with the class that performs the associated crosswalk
# (only qdc/oai_dc/json are supported at this point)
Crosswalks.oai_dc=net.datanoid.oaipmh.figshare.JSON2oai_dc
Crosswalks.qdc=net.datanoid.oaipmh.figshare.JSON2qdc
Crosswalks.json=net.datanoid.oaipmh.figshare.JSON2json
# Add further attributes to the <DC>/root element, eg. XMLNS for custom elements perhaps specified in format customisations
#JSON2qdc.dcElementAddAttributes=xmlns:foaf="http://xmlns.com/foaf/0.1/"
#JSON2oai_dc.dcElementAddAttributes=xmlns:foaf="http://xmlns.com/foaf/0.1/"
## Format customisations.
## There are several standard string substitutions you can use:
## %NAME% = name of the custom field, or name of a file
## %VALUE% = value of the custom field, or link to the file
## %VALUE2% = MD5 hash of the file
## And there are also character escapings for each of the substitutions:
## %NAME_ELEMENT% = format suitable for use as an XML element name
## %*_CDATA% = escaped as text/CDATA, so can be safely used within an XML element contents
## %*_ATTRIB% = escaped text that can be used as an XML element attribute within quotes
# Files will be output in the corresponding format
JSON2qdc.filesFormat=<dcterms:hasPart rdf:resource="%VALUE_ATTRIB%">%NAME_CDATA%</dcterms:hasPart><dcterms:hasPart xsi:type="dcterms:URI" rdf:resource="%VALUE_ATTRIB%">%VALUE_CDATA%</dcterms:hasPart>
# Any figshare custom_fields matching a Regex will be output in the corresponding Format.
# For each custom field only the first match is used, so the order is important.
# Property names must end with consecutive numbers starting from 1.
JSON2qdc.customFields.Regex.1=(?i)principal\\s+contact\\s+name.*
JSON2qdc.customFields.Format.1=<dc:description.contactname>Principal Contact: %VALUE_CDATA%</dc:description.contactname>
# Place this as the last consecutive number, ensures all further custom_fields become descriptions
JSON2qdc.customFields.Regex.2=.*
JSON2qdc.customFields.Format.2=<dc:description.%NAME_ELEMENT%>%NAME_CDATA% = %VALUE_CDATA%</dc:description.%NAME_ELEMENT%>
# Same again for standard DC
JSON2oai_dc.filesFormat=<dcterms:hasPart rdf:resource="%VALUE_ATTRIB%">%NAME_CDATA%</dcterms:hasPart><dcterms:hasPart xsi:type="dcterms:URI" rdf:resource="%VALUE_ATTRIB%">%VALUE_CDATA%</dcterms:hasPart>
JSON2oai_dc.customFields.Regex.1=(?i)principal\\s+contact\\s+name.*
JSON2oai_dc.customFields.Format.1=<dc:description.contactname>Principal Contact: %VALUE_CDATA%</dc:description.contactname>
JSON2oai_dc.customFields.Regex.2=.*
JSON2oai_dc.customFields.Format.2=<dc:description.%NAME_ELEMENT%>%NAME_CDATA% = %VALUE_CDATA%</dc:description.%NAME_ELEMENT%>