/OOP_Lab12

Chain of Responsibility & Decorator Lab

Primary LanguageJavaMIT LicenseMIT

Lab 12. Chain of Responsibility & Decorator

Java CI with Maven

Description

A simple example of the Chain of Responsibility and Decorator patterns.

Task

  • Complete Task 1.
  • Check OCR with Cloud Vision API.
  • Setup Google Cloud Project.
  • Install Google Storage and Cloud Vision libraries.
  • Complete Task 2.
  • Submit a link to GitHub with tests and a GitHub Action file.

Setup

Google Cloud Project

In order to run this project, you need to create a Google Cloud Project and enable the Cloud Vision API

Instructions for creating a Google Cloud Project can be found here

After creating a project, you need to create a service account and set up the credentials, or you can use the Google Cloud SDK to set up the credentials.

If you use the Google Cloud SDK, you can set up the credentials with the following commands:

gcloud init
gcloud auth application-default login

Google Storage and local database

You will need to create a Google Storage bucket to store the images. Instructions for creating a bucket can be found here

Along with the Google Storage bucket, you will need to create a local database to store the results of the OCR. You can use the SQLite database.

If you are using IntelliJ, go to side panel and click on the Database tab. Click on the + button and select SQLite from the list. Enter cache.db as the database name and click OK.

License

The MIT License (MIT)

Copyright © 2022. Andrii Yaroshevych