How maryoxd/algorithms-and-data-structures-linear-hashing works
This is a Swing desktop application for managing people and their PCR tests in persistent heap files backed by linear hashing. The main workflow runs from the user interface through AppController and Model, which validate and perform person/test operations, then display results and file-block views. The storage path uses linear hash files over heap files and serialized blocks; person and test records define the persisted data. The tree and excerpts support these key call paths, but do not expose every operation or UI route.
Main entry points: Model.java People and test operations · App.java Swing application · AppController.java Operation controller · LinearHashFile.java Linear hash index
Components 19
Desktop interface
- Swing application
src/gui/App.java - Operation controller
src/gui/controller/AppController.java - Operation state
src/gui/data/OperationsData.java - Operation and file panels
src/gui/panels - Result formatting
src/gui/util/LogFormatter.java
PCR records
- Person record
src/person/Person.java - PCR test record
src/pcrtest/PCRTest.java - Record and ID generators
src/generators
Application model
- People and test operations
src/system/Model.java - File configuration
src/system/data/FileConfig.java - Person with tests
src/system/data/PersonAndTests.java - Test with person
src/system/data/TestWithPerson.java - Person edit request
src/system/data/PersonEditRequest.java - Test edit request
src/system/data/PCRTestEditRequest.java
Persistent storage
- Linear hash index
src/linearHashFile/LinearHashFile.java - Heap file
src/heapfile/HeapFile.java - Fixed-record blocks
src/block/Block.java
Other components
- User
- Heap and hash testers
src/tester
Connections 25
- User → Swing application: operates
src/gui/App.java - Swing application → Operation controller: dispatches
src/gui/App.java - Swing application → Operation state: uses
src/gui/App.java - Swing application → Operation and file panels: renders
src/gui/App.java - Swing application → Result formatting: formats results
src/gui/App.java - Operation controller → People and test operations: delegates
src/gui/controller/AppController.java - Swing application → Person record: displays
src/gui/App.java - Swing application → PCR test record: displays
src/gui/App.java - Operation controller → Person edit request: creates
src/gui/controller/AppController.java - Operation controller → Test edit request: creates
src/gui/controller/AppController.java - Operation controller → File configuration: accepts
src/gui/controller/AppController.java - People and test operations → Person record: manages
src/system/Model.java - People and test operations → PCR test record: manages
src/system/Model.java - People and test operations → Record and ID generators: generates
src/system/Model.java - People and test operations → Person with tests: returns
src/system/Model.java - People and test operations → Test with person: returns
src/system/Model.java - People and test operations → Person edit request: applies edits
src/system/Model.java - People and test operations → Test edit request: applies edits
src/system/Model.java - People and test operations → File configuration: configures files
src/system/Model.java - People and test operations → Linear hash index: operates on
src/system/Model.java - Linear hash index → Heap file: reads and writes
src/linearHashFile/LinearHashFile.java - Linear hash index → Fixed-record blocks: manages blocks
src/linearHashFile/LinearHashFile.java - Heap file → Fixed-record blocks: serializes
src/heapfile/HeapFile.java - Heap and hash testers → Heap file: exercises
src/tester/HeapFunctionalityTester.java - Heap and hash testers → Linear hash index: exercises
src/tester/HashFunctionalityTester.java