Skip to content

Fadi#6

Open
FadiMoubayed wants to merge 23 commits into
masterfrom
Fadi
Open

Fadi#6
FadiMoubayed wants to merge 23 commits into
masterfrom
Fadi

Conversation

@FadiMoubayed

Copy link
Copy Markdown
Collaborator

No description provided.

FadiMoubayed and others added 23 commits October 23, 2019 12:13
Changes the file reader in DatareaderApplication / afterPropertiesSet
from a String to URI
Adds a tika object and reads the content type using tika
adds a Measurements class for reading the xml file
adds xml annotations to both Measurement and Measurements class
removes the JAXBExeption from the method signature readFile of the
DataFormatReader interface, the implementation in the readFile in the
XmlReader class and the try and catch which is consequentially added to
to the afterPropertiesSet when reading the dataFile

adds try and catch to the readFile method in the XmlReader class
adds throw new IOException to the catch (JAXBExeption)
deletes the DatareaderApplication class
Introduces an Application class
Introduces a DataReaderHelper class which resolves the correct data
reader and calls the correct data method
introduces a csv/json/xml Rest controllers
organizes Spring annotations
reading the xml, json and csv files is done by using the inputstream
the inputstream is then converted to a file object using the library
commons-io.
the change is dine only in the controller classes which read the files
from the disk
This change makes it possible to run the spring application using the
jar file without having the problem FileNotFound
the instructions for creating and running the docker image are in the
file creating the docker container .txt
adds JPA dependency
adds h2 in memory database dependency to check the results in a
quick way
adds MeasurementRepository
changes the id type of the measurement from integer to Long
Adds findAll measurements
Adds count measurements
Adds add measurement
Adds delete measurement
Postman test requests are added in a seperate folder
adds a station_id column to the Measurement class
adds spring.jpa.hibernate.ddl-auto=none to the application.properties
removes the H2 database
changes the database to MySQL
The application in IntelliJ communicates with the MySQL docker container
The app in intelliJ communicates with the docker container
The instructions are executed in the command line manually
adds a docker compose file to run the MySQL container
The application is still running in IntelliJ and communicates with
the docker MySQL container
The docker compose file is run using docker-compose up in the command line
The method findall() in the DataBaseService class was returning all
measurements as a list of lists not as a list of measurements.
The reason for this was List of meanurements varible was pointing to
an ArrayList<MessageDigest> instead of ArrayList<Measurement>

Additionally in the lambda expression in this method the variable m was
added instead of e
m.foreach(e - > measurements.add(m)) it should be add(e)
modifies the docker compose file to have 2 services. The application and
the database. Both the application and the database are put on the same
network.

adds Hibernate Validator Engine Relocation Artifact dependency to the
POM file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant