forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 2
UFAL/Improve file preview generating #972
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
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
8defb21
get name and size from metadata and header of file, avoid input strea…
Paurikova2 6d55c95
checkstyle violations
Paurikova2 d1fa497
remove temp file, checkstyle, do not load full file
Paurikova2 c52090c
add { } after if
Paurikova2 8e576a7
added check for max preview file
Paurikova2 1e1ea9f
used ZipFile and TarArchived for filepreview generating
Paurikova2 1ed0c68
added removed lines
Paurikova2 9fea2e2
used 7z for zip and tar files
Paurikova2 76be5b3
removed 7z and used zip and tar entry
Paurikova2 09bcf79
checkstyle violations
Paurikova2 8f07fe2
improved file previrew generating speed, used string builder, xml bui…
Paurikova2 0ba1947
checkstyle, return boolean from haspreview and previrews from getPrev…
Paurikova2 719fa77
fix test, better doc, checkstyle
Paurikova2 2d45b6c
removed empty lines
Paurikova2 a23fc50
removed maxresult limit
Paurikova2 058824f
fix long conversion
Paurikova2 5831fda
fix problem with hibernate session
Paurikova2 e8001e7
fix problem with hibernate session
Paurikova2 316434b
fix .tar.gz generating
Paurikova2 4944c00
Merge branch 'ufal/improve-file-preview-generating' of github.com:dat…
Paurikova2 d6468d5
removed fix for .tar.gz - not work
Paurikova2 7f2374b
skip fully entry for tar
Paurikova2 252f59c
added indexes for speed up queries
Paurikova2 3c40823
removed unused improt
Paurikova2 e13b55d
fix comments, added indexes to separated sql file
Paurikova2 62693ed
added license header
Paurikova2 6805000
named constant by upper case
Paurikova2 edeeca0
added empty lines
Paurikova2 5fbdf5d
removed empty lines
Paurikova2 06d8f0c
set static attribute to static final
Paurikova2 95e7dfb
set public method to private, interupt threat in exception
Paurikova2 3522292
inicialized fileInfo, refactorization of code based on copilot review
Paurikova2 7066843
restore sql files, restore vanilla comments
Paurikova2 dd26d98
removed interuption of threat from exception
Paurikova2 dd48091
Merge branch 'dtq-dev' into ufal/improve-file-preview-generating
milanmajchrak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
240 changes: 155 additions & 85 deletions
240
dspace-api/src/main/java/org/dspace/content/PreviewContentServiceImpl.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...dspace/storage/rdbms/sqlmigration/h2/V7.6_2025.06.09__Added_Indexes_To_Preview_Tables.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| -- | ||
| -- The contents of this file are subject to the license and copyright | ||
| -- detailed in the LICENSE and NOTICE files at the root of the source | ||
| -- tree and available online at | ||
| -- | ||
| -- http://www.dspace.org/license/ | ||
| -- | ||
|
|
||
| -- =================================================================== | ||
| -- PERFORMANCE INDEXES | ||
| -- =================================================================== | ||
|
|
||
| -- | ||
| -- Index to speed up queries filtering previewcontent by bitstream_id, | ||
| -- used in hasPreview() and getPreview() JOIN with bitstream table. | ||
| -- | ||
| CREATE INDEX idx_previewcontent_bitstream_id | ||
| ON previewcontent (bitstream_id); | ||
|
|
||
| -- | ||
| -- Index to optimize NOT EXISTS subquery in getPreview(), | ||
| -- checking for existence of child_id in preview2preview. | ||
| -- | ||
| CREATE INDEX idx_preview2preview_child_id | ||
| ON preview2preview (child_id); |
25 changes: 25 additions & 0 deletions
25
.../storage/rdbms/sqlmigration/postgres/V7.6_2025.06.09__Added_Indexes_To_Preview_Tables.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| -- | ||
| -- The contents of this file are subject to the license and copyright | ||
| -- detailed in the LICENSE and NOTICE files at the root of the source | ||
| -- tree and available online at | ||
| -- | ||
| -- http://www.dspace.org/license/ | ||
| -- | ||
|
|
||
| -- =================================================================== | ||
| -- PERFORMANCE INDEXES | ||
| -- =================================================================== | ||
|
|
||
| -- | ||
| -- Index to speed up queries filtering previewcontent by bitstream_id, | ||
| -- used in hasPreview() and getPreview() JOIN with bitstream table. | ||
| -- | ||
| CREATE INDEX idx_previewcontent_bitstream_id | ||
| ON previewcontent (bitstream_id); | ||
|
|
||
| -- | ||
| -- Index to optimize NOT EXISTS subquery in getPreview(), | ||
| -- checking for existence of child_id in preview2preview. | ||
| -- | ||
| CREATE INDEX idx_preview2preview_child_id | ||
| ON preview2preview (child_id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.