By: Team F10-3 Since: Aug 2018

1. Introduction

The police database is for police officers(PO) and headquarter personnel(HQP). Both groups will have varying access and authorization levels to this database. POs would be able to read from the database after screening someone while on patrol and choose his course of action base on the status/threat level of subject. HQP would have the added functions of adding and removing people from the database. Refer to quick start to get started

2. Quick Start

  1. Ensure that you have Java Version 9 installed on your device.

  2. Download the latest version of PRISM here.

  3. Copy the jar file to a preferred folder (an empty folder).

  4. Double-click the file to start the app. The user interface should appear in a few seconds.

  5. NOTE: DO NOT edit the text files that comes with the PRISM jar file.

    Ui
  • The text box is located at the bottom of the screen, and is grey in colour

  • Throughout the list of features, each command will indicate if its available for HQP, PO or both

  1. Type the password in the text box below and press Enter to enter system as a specific user.

  2. Defaults passwords for the users (Passwords are Case Sensitive):

    1. HQP: papa123

    2. PO1: popo1

    3. PO2: popo2

    4. PO3: popo3

    5. PO4: popo4

    6. PO5: popo5

  3. Type a command in the same text box and press Enter to excecute it.

  4. To display the full list of commands and a summary of their functions in the application, type 'help' and press Enter.

  5. Refer to Section 3, “Features” for details of each feature.

3. Features

Command Format

  • Words in UPPER_CASE are the parameters to be supplied by the user e.g. in add n/NAME, NAME is a parameter which can be used as add n/John Doe

  • Items in the WANTEDFOR parameter must be given if STATUS is "wanted"

  • Items in square brackets are optional e.g n/NAME [p/POSTALCODE] [s/STATUS] can be used as n/John Doe p/510246 s/xc or n/John Doe s/xc

  • Items with ​ after them can be used multiple times including zero times e.g. o/OFFENSE…​ can be used as   (i.e. 0 times), o/theft, o/riot o/drugs etc

3.1. Viewing help : help (HQP & PO)

Lists all the commands in a user friendly format for users and how to use them.

  • You will be unable to see the list of available commands until logged in, due to the sensitivity of the data

  • You will be shown a different set of commands depending on the type of access to the system- HQP or PO

Format: 'help'

Examples:

  • help

  • Displays all commands which can be used by the user

3.2. Display date and time : time (HQP & PO)

Shows the current System date and time.

Format: 'time'

Examples:

  • time

  • Displays the current date, and time in hrs

3.3. Adding a person: add (HQP only)

Adds a criminal to the database.

Format: 'add NAME n/NRIC d/YEAROFBIRTH p/POSTALCODE s/STATUS w/WANTEDFOR [o/PASTOFFENSES]'

Examples:

  • add John Doe n/f1234567p d/1996 p/510246 s/xc w/none o/theft o/drugs"

  • Displays a message stating the new person being added

  • If a person’s STATUS is "wanted", the WANTEDFOR parameter has to be filled

  • No two persons can have the same NRICs, the other parameters such as NAME, POSTALCODE, etc, can be the same

  • Date of birth here only refers to the year

A person can have 0 or more past offenses

3.4. Editing a person : edit (HQP only)

Edit specified parameter(s) of an existing person in the Police Records - only by HQP.

Format: 'edit n/NRIC p/[POSTAL_CODE] s/[STATUS] w/[WANTED_FOR] o/[PAST_OFFENCES]'

  • The NRIC tag 'n/' is required

  • The other tags are optional, but at least one of them must be filled

  • Edits the person with the specified NRIC.

  • At least one of the optional fields must be provided.

  • Existing values will be updated to the input values.

  • Offenses can only be added not replaced.

Examples:

  • edit n/g1952866q p/510246

  • Edits the postal code of the person with the specified NRIC to be 510246

3.5. Display a list of all persons : list (HQP & PO)

Shows a list of every person in the Police Records

Format: 'list'

Examples:

  • list

  • Displays list of all persons

3.6. Find a person by NRIC : find (HQP & PO)

Finds a person in the Police Records by the specified NRIC

Format: 'find NRIC'

Examples:

  • find s1234567a

  • Returns person with 's1234567a'

  • A timestamp and current ID is stored whenever this command is used

3.7. Get screening history of a person: check (HQP)

Displays all the times a person was screened in the form of timestamps (using 'find' command) - Only by HQP

Format: 'check s1234567a'

  • Returns an indexed list of timestamps for specified person, as well as corresponding PO ID nuber

Examples:

  • check s1234567a

  • Shows an indexed list of timestamps for when person with s1234567a was screened by any POs

3.8. Get status of POs: checkstatus (HQP & PO)

Shows all POs and their current engagement statuses

Format: 'checkstatus'

3.9. Update status of PO: updatestatus (HQP only)

Updates the PO so that it is not engaged anymore

Format: 'updatestatus PO(ID)'

Examples:

  • updatestatus po2

  • po2 is now free for dispatch

3.10. Deleting a person : delete (HQP only)

Deletes the specified person from the database.

Format: 'delete NRIC'

  • Deletes the person with the specifies NRIC.

Examples:

  • delete g1952866q

  • Deletes the person with the specified NRIC from the records.

3.11. Clear records : clear (HQP only)

Clears all records of people in the Police Records.

Format: 'clear'

Example:

  • clear

  • Records will now be empty

3.12. Requesting for assistance : rb (HQP & PO)

Generates GPS coordinates of current location with current case and sends it to HQP. HQP would receive message in inbox.

Format: 'rb OFFENSE'

Examples:

  • rb gun

  • Sends a set of GPS coordinates, Current Case and Google Maps URL location to HQP.

3.13. Dispatch assistance for requester: dispatch (HQP only)

Generates message to dispatch an officer to backup a requesting officer Message would be sent to requester & backup officer which includes ETA(Real Time) & Location (Google Maps URL).

Format: 'dispatch BACKUP_OFFICER OFFENSE REQUESTER_OFFICER'

  • dispatch po1 gun po3

  • Sends a set of GPS coordinates, current case, ETA and Google Maps URL location of requester to backup officer and vice-versa.

3.14. Logout : logout (HQP & PO)

Logs the user out from the system.

Format: 'logout'

Examples:

  • logout

  • Any user must enter their respective password to log in

3.15. Update Password : update password (HQP)

Updates password of any existing user - only HQP can change the user’s password

Format: 'update password'

Examples:

  • update password

  • Please enter a password to change

  • User then has to enter existing password and new alphanumeric password of minimum length 5

3.16. Check unread notifications: showunread (HQP & PO)

For HQPs: Check inbox to see a list of backup requests made by POs, and are sorted based on severity first, and then time stamp. For POs: Check inbox to see who is responding to request for backup/ambulance/fire truck or to see if there are any dispatch orders

Format: 'showunread'

Examples (as a HQP):

  • 'showunread'

  • Shows a list of dispatch requests (sorted by severity then timestamp) made by POs on the ground:

Examples (as a PO): * 'showunread' * Shows any backup messages by HQ or response for backup if any

3.17. Check all notifications: inbox (HQP & PO)

For HQPs: Check inbox to see a list of backup requests made by POs, and are sorted based on severity first, and then time stamp. For POs: Check inbox to see who is responding to request for backup/ambulance/fire truck or to see if there are any dispatch orders

Format: 'inbox'

Examples (as a HQP):

  • 'inbox'

  • Shows a list of backup requests (sorted by severity then timestamp) made by POs on the ground:

Examples (as a PO): * 'inbox' * Shows any dispatch messages by HQ or response for backup if any

3.18. Read message : read(HQP & PO)

Updates the status of unread messages to read. Command to be used after showunread or inbox command

Format: 'read INDEX'

Examples: * read 1

3.19. Clear inbox: clearinbox (HQP & PO)

Clears the text file containing all the messages (both read and unread) for the user.

Format: 'clearinbox'

3.20. Shutdown program : shutdown (HQP & PO)

Shutdown the system

Format: 'shutdown'

Examples: * shutdown * Police Records System shuts down

3.21. AutoCorrect feature (HQP & PO)

Predicts expected input when the user enters invalid input that is close to input expected by the Police Records System. Currently all non-password commands and NRICs are covered by the feature.

  • The feature predicts correction for commands that are a single character away from valid command

  • The feature predicts correction for NRICs that are one or two characters away from valid NRIC

The feature works differently depending on the type of user.
  • For HQP, all commands as well as NRICs under edit, check and delete command are covered by the feature.

  • For POs, only commands they are authorized to use are covered by the feature.

  • The autocorrect feature does not cover the update password command, and NRICs under commands accessible by POs to maintain security.

Examples:

  • lost

  • Predicts that the user meant to use the command list and shows valid implementation of the list command

4. Commands List

  • Help : 'help'

  • Show time : 'time'

  • Add : 'add n/NAME n/NRIC d/YEAR_OF_BIRTH p/POSTAL_CODE s/STATUS w/WANTED_FOR o/PAST OFFENCES…​'

E.g. add John Doe n/s1234567a d/1996 p/510246 s/xc w/none o/theft o/drugs E.g. add Bob n/g1234567a d/1996 p/111111 s/clear w/none

  • Edit : 'edit NRIC n/[NAME] p/[POSTAL_CODE] s/[STATUS] w/WANTED_FOR o/PAST_OFFENCES'

E.g. edit g1952866q p/510246

  • List : 'list'

  • Find : 'find NRIC'

E.g. find s1234567a

  • Check : 'check NRIC'

E.g. check s1234567a

  • Get status of POs : 'checkstatus'

  • Update status of PO : 'updatestatus'

E.g updatestatus po2

  • Delete : 'delete NRIC'

E.g. delete g1952866q

  • Clear : 'clear'

  • Request for backup : 'RB'

  • Dispatch : 'dispatch PO(ID) CASE PO(ID)'

E.g. dispatch po2 gun po4

  • Lock : 'lock'

  • Update Password : 'update password'

  • Check unread notifications : 'showunread'

  • Check all notifications : 'inbox'

  • Read message : 'read INDEX'

E.g read 1

  • Clear Inbox : 'clearinbox'

  • Shutdown : 'shutdown'