Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4d035d9
Update converter for handling missing resources
anlausch Dec 17, 2018
b74290a
Stub for export
anlausch May 23, 2019
a6bbff5
Test data for ocexport, script dir moved
kaiec May 23, 2019
62b789e
JS Schema accoring to OC example in paper
kaiec May 23, 2019
653bf78
Setup of n3 and jsonld modules, test of jsonld export
kaiec May 31, 2019
932fd6d
Not really working first export
kaiec May 31, 2019
c096fd1
Further triples. Types not working
kaiec May 31, 2019
f5188f0
Fix key iteration
anlausch May 31, 2019
80addbe
Triple dedup, code/tests refactored, configs reverted.
kaiec May 31, 2019
61e326f
First approach for contributor mapping. Python helper for JSON LD
kaiec Jun 21, 2019
61db55f
Model fully implemented in a first version.
kaiec Jul 10, 2019
4b02f3f
Wrap exporter in cmd script
anlausch Jul 15, 2019
65df654
Actually generate .jsonld + documentation
anlausch Jul 16, 2019
e31aa7c
Fix output of JSON-LD
zuphilip Jul 16, 2019
4d9b1fc
Add maximum parameter in OCExport
zuphilip Jul 16, 2019
4077d05
Fix partOf, deactivate parts w/o id, add warnings
zuphilip Jul 16, 2019
3ae7148
Handle dates in OCExport
zuphilip Jul 18, 2019
cbb605d
Fix differentiation of URIs and literals
zuphilip Jul 19, 2019
a07de10
Add journalVolume and journal to OC export
zuphilip Jul 19, 2019
c451be5
OCExport: Escape <,> in URIs and fix cites
zuphilip Jul 20, 2019
89d3821
Extend OC export for contributors
zuphilip Jul 21, 2019
6e85e75
Adjust resource URLs, switch to raw data, fix "be"
zuphilip Aug 17, 2019
ede9eb7
Fix multiple issues with the OC export
zuphilip Aug 17, 2019
0ca57e2
Switch to consecutive numbers in resource urls for OC
zuphilip Aug 17, 2019
26cc03d
Add labels for all entities
zuphilip Aug 17, 2019
86592c8
Fix identifiers by using the DataCite Ontology
zuphilip Aug 17, 2019
3ba6524
Add ocrData when bibliographicEntryText is empty
zuphilip Aug 17, 2019
1e5cc87
Create always a journal resource
zuphilip Aug 17, 2019
78b19e6
Add some logging statements, option for different output
zuphilip Aug 19, 2019
a6b7ce0
Adjust export according to OC requirements
zuphilip Sep 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"node": true
"node": true,
"esversion": 6
}
184 changes: 172 additions & 12 deletions api/schema/bibliographicResourceOpenCitations.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,180 @@ const status = require('./enum.json').status;
const ResourceEmbodiment = require('./resourceEmbodiment');

var bibliographicResourceOpenCitations = new SchemaObject({
identifiers: [{type: Identifier}],
type: String,
iri: String,
a: [{type: String, enum: ["document", "article", "..."] }],
label: String,
identifier: [{
id: String,
iri: String,
a: {type: String, enum: ["unique_identifier"]},
type: String,
label: String
}],
title: String,
subtitle: String,
edition: String,
number: String, // e.g. number of an article in journal
contributors: [{type: AgentRole}],
publicationDate: Date,
status: {type: String, enum: [status.valid, status.external]},
cites: [{type: String}],
partOf: String, // link to other br
parts: [{type: BibliographicEntry}],
embodiedAs: [{type: ResourceEmbodiment}],
relatedDocument: Object
date: {
value: String,
a: {type: String, enum: ["year"]}
},
contributor: [{
iri: String,
a: {type: String, enum: ["role"]},
label: String,
role_type: {type: String, enum: ["author", "publisher", "editor"]},
role_of: {
iri: String,
a: {type: String, enum: ["agent"]},
label: String,
gname: String,
fname: String,
identfier: [{
id: String,
iri: String,
a: {type: String, enum: ["unique_identifier"]},
type: String,
label: String
}],
},
next: String,
}],
format: [{
iri: String,
a: {type: String, enum: ["digital_format", "print"]},
label: String,
mime_type: String,
fpage: String,
lpage: String,
}],
reference: [{
iri: String,
a: {type: String, enum: ["entry"]},
label: String,
content: String,
crossref: String,
}],
part_of: {
iri: String,
a: { type: String, enum: ["document", "periodical_issue", "periodical_volume", "periodical_journal", "proceedings", "..." ]},
label: String,
number: String,
identifier: [{
id: String,
iri: String,
a: {type: String, enum: ["unique_identifier"]},
type: String,
label: String
}],
title: String,
subtitle: String,
part_of: {
iri: String,
a: { type: String, enum: ["document", "periodical_issue", "periodical_volume", "periodical_journal", "proceedings", "..." ]},
label: String,
number: String,
identifier: [{
id: String,
iri: String,
a: {type: String, enum: ["unique_identifier"]},
type: String,
label: String
}],
title: String,
subtitle: String,
part_of: {
iri: String,
a: { type: String, enum: ["document", "periodical_issue", "periodical_volume", "periodical_journal", "proceedings", "..." ]},
label: String,
number: String,
identifier: [{
id: String,
iri: String,
a: {type: String, enum: ["unique_identifier"]},
type: String,
label: String
}],
title: String,
subtitle: String,
}
}
},
citation: [{
iri: String,
a: {
type: String,
enum: ["document", "periodical_issue", "periodical_volume", "periodical_journal", "proceedings", "inproceedings", "..."]
},
label: String,
title: String,
date: {
value: String,
a: {type: String, enum: ["year"]}
},
format: [{
iri: String,
a: {type: String, enum: ["digital_format", "print"]},
label: String,
mime_type: String,
fpage: String,
lpage: String,
}],
part_of: {
iri: String,
a: {
type: String,
enum: ["document", "periodical_issue", "periodical_volume", "periodical_journal", "proceedings", "..."]
},
label: String,
number: String,
identifier: [{
id: String,
iri: String,
a: {type: String, enum: ["unique_identifier"]},
type: String,
label: String
}],
title: String,
subtitle: String,
part_of: {
iri: String,
a: {
type: String,
enum: ["document", "periodical_issue", "periodical_volume", "periodical_journal", "proceedings", "..."]
},
label: String,
number: String,
identifier: [{
id: String,
iri: String,
a: {type: String, enum: ["unique_identifier"]},
type: String,
label: String
}],
title: String,
subtitle: String,
part_of: {
iri: String,
a: {
type: String,
enum: ["document", "periodical_issue", "periodical_volume", "periodical_journal", "proceedings", "..."]
},
label: String,
number: String,
identifier: [{
id: String,
iri: String,
a: {type: String, enum: ["unique_identifier"]},
type: String,
label: String
}],
title: String,
subtitle: String,
}
}
},
}],
});



module.exports = bibliographicResourceOpenCitations;
26 changes: 26 additions & 0 deletions api/schema/enum.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,32 @@
"standardSeries": "STANDARD_SERIES",
"standard": "STANDARD"
},
"ocType": {
"book": "fabio:Book",
"bookChapter": "fabio:BookChapter",
"bookPart": "doco:Part",
"bookSection": "fabio:ExpressionCollection",
"bookSeries": "fabio:BookSeries",
"bookSet": "fabio:BookSet",
"bookTrack": "fabio:Expression",
"component": "fabio:Expression",
"dataset": "fabio:DataFile",
"dissertation": "fabio:Thesis",
"editedBook": "fabio:Book",
"journalArticle": "fabio:JournalArticle",
"journalIssue": "fabio:JournalIssue",
"journalVolume": "fabio:JournalVolume",
"journal": "fabio:Journal",
"monograph": "fabio:Book",
"proceedingsArticle": "fabio:ProceedingsPaper",
"proceedings": "fabio:AcademicProceedings",
"referenceBook": "fabio:ReferenceBook",
"referenceEntry": "fabio:ReferenceEntry",
"reportSeries": "fabio:Series",
"report": "fabio:ReportDocument",
"standardSeries": "fabio:Series",
"standard": "fabio:SpecificationDocument"
},
"embodimentType": {
"digital": "DIGITAL",
"print": "PRINT"
Expand Down
2 changes: 1 addition & 1 deletion api/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tags:
- name: Utils
description: Services that are not directly related to the application.
schemes:
#- http
# - http
- https
consumes:
- application/json
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"bcrypt": "^2.0.0",
"bluebird": "^3.5.2",
"cached-request": "^1.1.4",
"commander": "^2.20.0",
"connect-mongo": "^2.0.1",
"cors": "^2.8.4",
"crossref": "^1.2.1",
Expand All @@ -31,6 +32,7 @@
"heapdump": "^0.3.11",
"isomorphic-fetch": "^2.2.1",
"js-yaml": "^3.8.3",
"jsonld": "^1.6.2",
"lucene-escape-query": "^1.0.1",
"marc4js": "0.0.9",
"marc8": "0.0.4",
Expand All @@ -39,6 +41,7 @@
"mongoosastic": "^4.3.0",
"mongoose": "^4.7.2",
"morgan": "^1.9.0",
"n3": "^1.1.1",
"natural": "^0.5.0",
"node-unzip-2": "^0.2.7",
"passport": "^0.3.2",
Expand Down
Loading