The statement

The Programming Projects college subject asked us to create an application to manage documents using Java. This application has to feature the creation of a document, importing and exporting files in three different formats: plaintext, XML and our own format. The application also has to have the ability to delete and modify these documents. The main feature of the application is the various document queries that allow us to find a certain document or author in the application.

The full statement is in the document below. Note that the statement is in Catalan.

Our solution

@alexland7219, @Loparc, Salvador and I started making a use case diagram to list all the features and functionalities we wanted to add in our application. Then we made the domain class diagram. This helped us to structure the domain layer. Alongside these diagrams, we made the description of each use case and class.

After these diagrams were verified by our tutor, we started the implementation of the domain layer. It was straightforward except for a couple of algorithms and a data structure. We used the Ternary Search Tree data structure to index all words contained in the documents. As we already used it in Algorithms course, we didn’t have much trouble with it. The algorithm we found the most challenging was the term frequency–inverse document frequency also known as tf-idf. Tf-idf algorithm allows us to rank a word on how important it is to a certain document.

After the domain layer was reviewed by our tutor, he asked us to make some changes to not infringe the multilayer architecture and to make our application more efficient. After these changes were made, we designed the class diagram of the persistence layer and the presentation layer. We implemented both layers in parallel. The persistence layer was not difficult. We had trouble making our interface user-friendly. To be honest, our final version is not as user-friendly as we wanted.

An overview of the home screen of the application.


Widow that allow us to import documents.


An example of a query to find the most relevant documents given a word.


An example of a query using a boolean expression.


View Code and report on Github