-
-
Notifications
You must be signed in to change notification settings - Fork 0
added coal, probab, db, automata books #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,6 +19,17 @@ public BookLoader(String resourcePath) { | |||||||||||||||||||||||
| this.resourcePath = resourcePath; | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // Add a new method specifically for the Indexer | ||||||||||||||||||||||||
| public List<Book> loadBooksFromSource(String path) { | ||||||||||||||||||||||||
| ObjectMapper mapper = new ObjectMapper(); | ||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||
| // Reads directly from the project folder, ignoring AppData | ||||||||||||||||||||||||
| return mapper.readValue(new File("src/main/resources" + path), new TypeReference<List<Book>>() {}); | ||||||||||||||||||||||||
|
Comment on lines
+25
to
+27
|
||||||||||||||||||||||||
| try { | |
| // Reads directly from the project folder, ignoring AppData | |
| return mapper.readValue(new File("src/main/resources" + path), new TypeReference<List<Book>>() {}); | |
| // Load from classpath so this works both in development and from a packaged JAR | |
| try (InputStream inputStream = getClass().getResourceAsStream(path)) { | |
| if (inputStream == null) { | |
| // Resource not found on classpath | |
| return Collections.emptyList(); | |
| } | |
| return mapper.readValue(inputStream, new TypeReference<List<Book>>() {}); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3321,6 +3321,82 @@ | |||||
| "rating": "4.6", | ||||||
| "coverUrl": "https://m.media-amazon.com/images/S/compressed.photo.goodreads.com/books/1348971620i/9637420.jpg", | ||||||
| "downLink": "https://dl.icdst.org/pdfs/files4/f5087fa30778ccd742790526c0d6be83.pdf" | ||||||
| }, | ||||||
| { | ||||||
| "bookId": 208, | ||||||
| "title": "Computer Organization and Architecture: Designing for Performance", | ||||||
| "author": "William Stallings", | ||||||
| "description": "A comprehensive textbook on computer organization and architecture, covering processor design, memory hierarchy, I/O systems, instruction sets, and performance optimization principles. It provides both theoretical foundations and practical examples for students and professionals in computer science and engineering.", | ||||||
| "progLang": "Assembly", | ||||||
| "category": "Computer Science", | ||||||
| "tag": [ | ||||||
| "Computer Organization", | ||||||
| "Computer Architecture", | ||||||
| "William Stallings", | ||||||
| "Processor Design", | ||||||
| "Memory Hierarchy", | ||||||
| "Assembly", | ||||||
| "I/O Systems" | ||||||
| ], | ||||||
| "rating": "4.1", | ||||||
|
||||||
| "rating": "4.1", | |
| "rating": 4.1, |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rating field should be a numeric value, not a string. The Book domain model expects a float type for the rating field. Change "4.3" to 4.3 (without quotes) to match the data type used in most other book entries.
| "rating": "4.3", | |
| "rating": 4.3, |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The progLang field should be "Assembly" rather than "English" since this book is specifically about assembly language programming for the IBM PC. This would be consistent with book 208 which also uses "Assembly" for assembly-related content.
| "progLang": "English", | |
| "progLang": "Assembly", |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rating field should be a numeric value, not a string. The Book domain model expects a float type for the rating field. Change "4.5" to 4.5 (without quotes) to match the data type used in most other book entries.
| "rating": "4.5", | |
| "rating": 4.5, |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rating field should be a numeric value, not a string. The Book domain model expects a float type for the rating field. Change "4.5" to 4.5 (without quotes) to match the data type used in most other book entries.
| "rating": "4.5", | |
| "rating": 4.5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import is unused and should be removed. The code catches generic Exception rather than IOException specifically.