Outlining a text/article using java
I want to create a program that can outline a text or article so that every subtopics can be viewed in a draft view.
My idea on the activity flows of this program are :
1. Open the file and read the text
2. Read the text line by line
2.1 If the line contains number and String text; capture and store it in database
2.2 capture and store the content of the subtopic in database
2.3 Else; back to 23.End
As i mentioned above, I'm using a combination of number and text to indicate that this is a subtopic title in the program's eyes. Though, i don't think that this is a wise algorithm as miscalculation would happened here.
Let say we have a part of an article with :
2.0 Why Java?
There are some major reason that bla..bla..bla... as follow :
1. Java is easy
2. Java is understandable
What I'm trying to show here is if there exist an ordered list inside a subtopic, the program will see it as a subtopic title too...not an ordered list...and this is troublesome...
So, What kind of algorithm should I use to solve this problem?
If there are any, can you explain to me step-by-step as I'm new to Java.
Plus, I also need help on the programming code as well. I want to know about the class and functions/methods I should use to build this program.
Any good suggestions and explaination are kindly appreciated. :)-: