Export formats¶
KCWorks customizes how published records are serialized for download and
content negotiation (for example BibTeX). Citation display that goes through
CSL is separate: resource-type vocabulary props such as props.csl drive that
path, while some export serializers use their own resource-type maps.
BibTeX serialization¶
Upstream InvenioRDM maps stock resource-type IDs (for example
publication-conferencepaper) to BibTeX entry types in
BibTexSchema.entry_mapper. KCWorks uses different vocabulary IDs (for example
textDocument-proceedingsPaper), so without a customization those records
always fall through to @misc.
KCWorks replaces BibTeX serialization in two places via
kcworks.config.serializers (imported from invenio.cfg):
RDM_RECORDS_SERIALIZERS— API content negotiation (Accept: application/x-bibtexon/api/records/<id>)APP_RDM_RECORD_EXPORTERS— record-page export dropdown (/records/<id>/export/bibtex)
Both use KCWorksBibtexSerializer / KCWorksBibTexSchema, which keep the stock
map and add mappings for KC resource types.
Code |
Role |
|---|---|
|
|
|
Serializer wiring |
|
|
Example API request:
GET /api/records/pp4ss-8ac91 HTTP/1.1
Accept: application/x-bibtex
Even when a type is mapped, the serializer only selects that entry type if the
record supplies the required fields for it (for example @inproceedings needs
imprint:imprint.title as booktitle; @article needs journal:journal.title).
Otherwise it still falls back to @misc.
CSL JSON and formatted citations do not use this map; they resolve type from
the resource-type vocabulary’s props.csl value.
Mapped KC resource types¶
Resource type ID |
BibTeX entry type(s) tried (in order) |
Notes |
|---|---|---|
|
|
Stock equivalent: |
|
|
Stock equivalent: |
|
|
Stock equivalent: |
|
|
Stock equivalent: |
|
|
Stock equivalent: |
|
|
Stock equivalent: |
|
|
Stock equivalent: |
|
|
Stock equivalent: |
|
|
Stock equivalent: |
|
|
Close equivalent to book |
|
|
Stretch; needs journal custom fields |
|
|
Stretch; needs journal custom fields |
|
|
Stretch; needs journal custom fields |
|
|
Stretch; needs journal custom fields |
|
|
Stretch; needs journal custom fields |
|
|
Stretch; needs journal custom fields |
|
|
Same ID as stock |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Same ID as stock |
presentation-conferencePaper is intentionally left unmapped: @inproceedings
implies publication in a proceedings volume, which is the wrong signal for a
conference presentation deposit.
Unmapped KC resource types (@misc)¶
These vocabulary IDs have no entry in KCWorksBibTexSchema.entry_mapper and
serialize as @misc (aside from any required-field fallbacks above):
audiovisualaudiovisual-documentaryaudiovisual-interviewRecordingaudiovisual-musicalRecordingaudiovisual-otheraudiovisual-performanceaudiovisual-podcastEpisodeaudiovisual-audioRecordingaudiovisual-videoRecordingimageimage-chartimage-diagramimage-figureimage-mapimage-visualArtimage-photographimage-otherinstructionalResourceinstructionalResource-curriculuminstructionalResource-lessonPlaninstructionalResource-syllabusinstructionalResource-otherpresentationpresentation-conferencePaperpresentation-conferencePosterpresentation-presentationTextpresentation-slidespresentation-othertextDocumenttextDocument-bibliographytextDocument-blogPosttextDocument-dataManagementPlantextDocument-interviewTranscripttextDocument-journaltextDocument-legalCommenttextDocument-legalResponsetextDocument-musicalNotationtextDocument-onlinePublicationtextDocument-othertextDocument-poeticWorktextDocument-proposaltextDocument-reporttextDocument-technicalStandardtextDocument-whitePaperotherother-catalogother-collectionother-eventother-interactiveResourceother-notesother-patentother-peerReviewother-physicalObjectother-workflow