Exploring a publications database
Motivation
This exercise is similar to Exploring IMDB movie lists, but with a richer domain model of bibliographic data for academic publications.
Tasks
The tasks are similar to the previous exercise, so we just outline them.
Get the data and parse it
Here in the GT image is a small bibtex file which has also been translated to JSON.
FileLocator gtResource / 'feenkcom' / 'gtoolkit-demos' / 'data' / 'bibtex'
You can either parse the bibtex file with the (experimental) BibtexPParser
parser:
BibtexPParser new optimize parse: (FileLocator gtResource / 'feenkcom' / 'gtoolkit-demos' / 'data' / 'bibtex' / 'scg-pub.bib') contents.
or you can parse the JSON version with STON
or NeoJSONReader
.
STON fromString: (FileLocator gtResource / 'feenkcom' / 'gtoolkit-demos' / 'data' / 'bibtex' / 'scg-pub.json') contents.
Have a look and decide which version you prefer to work with.
Wrap the data
Wrap the data as a BibliographyCollection instance. Introduce a JSON view of the raw data.
Create domain entities
Explore the data, and start to introduce domain entities for Publications and Authors, and possibly others, such as Publishers and Keywords.
Add views that allow you to navigate from a publications to authors, from authors to their co-authords and publications, and so on. Note that each entities will have to be able to navigate back to the source bibliography collection.
Add custom actions to download the PDF
For publications with Url download links, add a custom action to open the link in a WebBrowser
. See FileReference>>#gtOpenWebBrowserActionFor:
for an example of an optional action (noAction) in case there is no Url field.
Consider adding an http check for publications to indicate whether the link is valid. Have a look at WebLink>>#checkHttpStatus
to see how to check a link.
Add search facilities
Add Spotter searches to the BibliographyCollection to search for Publications matching some string.
Introduce collection wrappers
Collections of publications, authros etc should also support custom views. Wrap each of these entities as a Moldable Collection Wrapper so they can be molded.
Add some visualizations
Consider which visualizations might be interesting, such as the co-author graph, perhaps with the size of an author node reflecting the number of publications.
Have a look at the Map view of the MarkdownWebsiteExamples>>#onWebsiteOct23
example for inspiration.
Further exploration
Have a look at exploring the Zotero Web API for bibliographic data from within GT.
Draw inspiration from Working with a REST API: the GitHub case study to see how you would do this.