Requirement: Desktop Search Component

Project Description
Develop a re-usable Desktop Search Component based on the following require- ments:

1. The user should provide a search term T that can either be a plain text string or a regular expression. This is the text/pattern to search for. The user must indicate if T denotes a regular expression or a simple search string. The user should furthermore provide a regular expression N as a filename match- ing pattern. Only files whose names match N should be searched for T.
Examples:
ˆ N='txt', T='Polytechnic' (plain text)
Search for all files containing the text "Polytechnic" and having the sub- string "txt" in their filenames.
ˆ N='[0-9].*', T='Assignment( [0-9])?' (regular expression)
Search for all files containing the text "Assignment", optionally followed by a space and a digit, in all files whose names start with a digit.

2. The search should always start in the current user's home directory and recurse into all user's sub-directories.

3. The contents of ZIP archives (regardless of the archive filename) should be included in the search.

4. For all matches found (i.e. filename matches N and file content matches T), the following information should be printed out:
(a) The complete file name (if the file resides in a ZIP archive, the file name of the ZIP archive should also be printed out)
(b) The complete directory where the file resides (if the file resides in a ZIP archive, the stored path to the file within the archive should also be printed out)
(c) The size of the file (in Bytes, if <1024; in KBytes, if <1048576; and in MBytes otherwise)

5. All exceptions occurring during run-time must be handled gracefully. Non- recoverable errors should be reported to the calling method for further error handing.

6. Your search component should be independent of any front-end (i.e. it's func- tionality should not rely on a console or GUI interface, but should be re-usable within arbitrary Java applications).
However, a console front-end should be developed and used for demonstration purposes. The console front-end should print out all error messages in a brief, yet precise, way and continue with the search whenever possible.
ˆ Create a design document including a UML class diagram and UML sequence diagram(s) as appropriate.
ˆ Specify test cases as appropriate, document them in a Test Specification Doc- ument and implement them as JUnit tests.


Solutions:

No solutions for this request have been received yet.

Submit a new solution to this problem >