PROJECT: The Infinity Machine


Overview

The Infinity Machine is a desktop application that lets users store research materials for future use. It provides a quick and easy way for tech-savvy users, like university students or researchers, to manage and organise their research materials.

The user interacts with the application using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.

Summary of contributions

  • Major Enhancement: Added bibliography related functionalites

    • What it does: This set of functionalities allows the sources stored in the Infinity Machine to be used for generating bibliographical entries in the APA or MLA style.

    • Justification: A typical user would expect a piece of software for managing sources to also be able to generate appropriate bibliography entries.

    • Implementation: This new feature required a large number of additional fields in source. A new command, biblioEdit, was added to manage these fields.

  • Code contributed:
    [Project Dashboard]
    [biblio command code]
    [biblio command test]
    [biblioEdit command]
    [biblioEdit command test]
    [Source]

  • Other contributions:

    • Integration of existing functions:

      • Changes were made to storage to allow for persistent storage of the new Source objects.

    • Enhancement to existing features:

      • Revamped utility for populating initial sources to more closely match that used in the test. Added readability, functionality, extensibility.

    • Test Enhancements

      • Added a test for above mentioned utility.

      • Added tests for biblio-related features.

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

The created source comes with an empty set of biblio fields, used for storing information for creating a bibliography entry. Refer to biblio and biblioEdit for more information. ==== Generating a bibliography entry : biblio

Generates an bibliographical entry from the source at the specified.
Format: biblio INDEX FORMAT

  • Generates a bibliographical entry of the appropriate style from the source at the specified INDEX.

  • The index refers to the index number shown in the displayed source list.

  • The index *must be valid (between the indexes of the first source and the last source inclusive.

  • The format must be APA or MLA

Currently, only source types of "Book", "Journal Article" and "Website" are supported. If any suggested fields for a given source type are not populated, they will be reflected to the user when biblio is used.

Examples:

  • biblio 1 APA
    Generates an APA style bibliography entry for the first source.

  • biblio 2 MLA
    Generates an MLA style bibliography entry for the second source.

Replaces the information stored under the indicated header in the indicated source.

Format: biblioEdit INDEX HEADER BODY

  • Replaces a bibliofield of matching HEADER of the source at the specified INDEX with BODY.

  • The index refers to the index number shown in the displayed source list.

  • The index *must be valid (between the indexes of the first source and the last source inclusive.

  • The header must be one of the following:

  • "City", "Journal", "Medium", "Pages", "Publisher", "URL", "Website", "Day", "Month", "Year"

To ensure the accuracy of the bibliography generated, please ensure the accuracy of entered BODY.

The <i></i> braces indicate that the text between should be italicized.

Examples:

  • biblioEdit 1 City London
    Replaces the "City" bibliofield in the first source with "London".

  • biblioEdit 2 Publisher Penguin
    Replaces the "Publisher" bibliofield in the second source with "Penguin".

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Biblio feature

Overview

Given that the Infinity Machine is used to manage sources, a user might reasonably expect to use the information stored to generate usable bibligraphy entries. This functionality is implemented by the biblio command and the biblioEdit command.

BiblioFields

When a Source object is created, in addition to the compulsory fields of Title, Author, Type, and Detail, it is also created with a set of BiblioFields for storing additional information that might be needed for creating a bibliography entry.

BiblioFields is used to store information under the following headers: "City", "Journal", "Medium", "Pages", "Publisher", "URL", "Website", "Day", "Month", "Year"

BiblioFields is empty by default.

Biblio Command Implementation

The biblio command extends Infinity Machine with a bibliography generating functionality.

It is currently implemented with the following syntax: biblio INDEX FORMAT

  • INDEX — Indicates the index of the source to generate a bibliography entry for.

  • FORMAT — Indicates the format which the bibliography entry should follow.

    • Currently only APA and MLA formats are supported.

An example would be biblio 1 APA.

When the command is entered, the following occurs:

  • The associated parser, BiblioCommandParser, checks the validity of the entered arguments.

  • The indicated source is fetched from the SourceManager.

  • A check is performed on the source to ensure that it is of a supported type.

    • Currently only Book, Journal Article and Website sources are supported. These are chosen as they are the most likely to be used.

  • Based on the type of the source and the requested format, a bibliography entry is generated by accessing each of the source’s relevant fields.

    • If any of the necessary fields is empty, a placeholder value is used instead.

    • The empty field is noted for feedback to user later.

  • The bibliography entry is returned to the user along with feedback on empty fields.

Extensions: Future implementations can include additional supported source types.

BiblioEdit Command Implementation

The biblioEdit command is a supporting command for the Biblio feature. It is responsible for changing the information stored in the BiblioFields of a source.

It is currently implemented with the following syntax: biblioEdit INDEX HEADER BODY

  • INDEX — Indicates the index of the source to generate a bibliography entry for.

  • HEADER — Indicates the header for the information which the user wishes to change.

    • As mention in relation to BiblioFields above, valid headers are "City", "Journal", "Medium", "Pages", "Publisher", "URL", "Website", "Day", "Month", "Year"

  • BODY — Indicates the new value that should stored under the relevant header.

BiblioEditCommand

An example would be biblioEdit 1 City London

Alternative: The bibliofields of a source can be set at object creation with the add command. However, this makes using the add command excessively onerous. The current implementation allows the user to change each field as needed and preserves the information stored under the other headers in Bibliofields.

Extensions: A future implementation may allow information under multiple headers to be edited at once. Additionally, checks can be introduced to ensure the entered field bodies are appropriate e.g. the Month bibliofield should only accept values matching the English name of months.

Example Usage Scenario

Given below is an example usage scenario and how the BiblioEdit mechanism behaves.

  • Step 1 — The user launches Infinity Machine for the first time.

  • Step 2 — The user clears the database of sample sources using the clear command.

  • Step 3 — The user executes an add command to add a source entry to the database. The source has type "Textbook".

    • BiblioFields is empty

  • Step 4 — The user executes a biblio command with the following arguments: 1 APA

    • The user is informed that "Textbook" is not a supported source type

  • Step 5 — The user executes an Edit command with the following arguments: 1 y/Journal Article

    • The source type is changed to "Book"

  • Step 6 — The user executes a biblio command with the following arguments: 1 APA

    • A bibliography entry is generated with placeholder values as the requisite biblio fields are empty.

    • The user receives the bibliography entry along with a warning that some required fields are empty

    • The warning is appended with a list of empty but recommened fields: "Year", "City", "Publisher"

  • Step 7 — The user executes a biblioEdit command with the following arguments: 1 City London

  • Step 8 — The user executes a biblioEdit command with the following arguments: 1 Publisher Penguin

  • Step 9 — The user executes a biblioEdit command with the following arguments: 1 Year 2001

  • Step 10 — The user executes a biblio command with the following arguments: 1 APA

    • The user receives an appropriately formatted bibliography entry