Java Report File
Java Report File
AbdulHaseeb Qadeer
ID: 21811224
Instructor: Assoc. Prof. Dr. Erbuğ ÇELEBİ
ISYE501
June 2020
The aim of this project (retrieval system) is, how to implement a simple UI that gets a search
keyword from the user and show the matching documents from title, data, and document body.
For achieving this aim, I build this project, this project included many functions and ways that I
want to explain it step by step.
Libraries: a library is a collection of precompiled routines that a program can use. The routines,
sometimes called modules, are stored in object format. Libraries are particularly useful for
storing frequently used routines because you do not need to explicitly link them to every
program that uses them. I want to mention some important libraries that I used.
II. Javax. Swing. Provides interfaces that enable the development of input methods that can
be used with any Java runtime environment. Provides a set of "lightweight" (all-Java
language) components that, to the maximum degree possible, work the same on all
platforms.
III. Java IO is an API that comes with Java, which is targeted at reading and writing data
(input and output). Most applications need to process some input and produce some
output based on that input. For instance, read data from a file or over network, and write
to a file or write a response back over the network.
After library, GUI part is starting, in this part I added some important component that I
needed.
VI. JTextArea to indicate the all text that I want from particular topics (Date, Topic and
Body) the size of this JTextArea will be 40*40.
VII. JTextField: This component allow the user to write something for searching. The length
of the characters that will be write 10 characters.
VIII. JLabel: I used this for Title of our project, and also JLabel indicate the user what action
you should do in different places.
There are 21 Reuter’s files in the folder, this program allow the user to choose the file
which file do you want to open and user should write the file name such as (001 until
021).
If particular file exists, read the file, else not exists, I used try and catch Exception to inform the
user to correct the path of file.
After reading the file, it should get the name of nodes that included in the file, first read the
parent node, and after children Tags.
Each file has many children Tags, for recognizing, detecting and reading all children Tags I
preferred to use for loop.
For the each node type, I used for all of them (Date, Title and body) String TYPE, and for storing
this document I used EachSection ArrayList and I append it to JTextArea.
Third part of the project is how to find the word or phrases from entire document or whole text.
To achieving this aim, I implemented this way (I used 4 threads to search faster).
JTextField want from user to enter the word that he/she want, after input the word this
application will underline and highlight all words that similar with our input word, it means if I
input meet, it will underline and highlight for me all similar word like meets, meeting, meet,
etc…
For underlining the search text
For example, I want to search mon in the all document…it will find all phrases or words that it
has mon word... Monkey, many, money, among, month, piedmont, months, monetary, common,
Simon, Monday, etc…
Conclusion
This project that I build, it is very helpful and usable, through this project we can read and parse
many files from our PC, and storing from entire files just particular part (DATE, TITLE AND
BODY) of the file. In addition, give the user this ability to select one from 21 files and search for
favorable word from that particular file, and this software will not find just favorable word that
entered from user, but it will find all words that will be, even similar to our input word (for mon,
Monday, money, monkey, month, monetary, etc.).
In this project, I spent more time to build good and same project, as you want. I did my best,
Apart from some requirements; approximately, I implemented all requirements, which you want
from us in this project.