Skip to content

Commit da642f1

Browse files
committed
rework file operations
1 parent 4a7fff8 commit da642f1

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

src/main/java/com/mindee/extraction/ExtractedImage.java renamed to src/main/java/com/mindee/image/ExtractedImage.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.mindee.extraction;
1+
package com.mindee.image;
22

33
import com.mindee.input.LocalInputSource;
44
import java.awt.image.BufferedImage;
@@ -21,7 +21,7 @@ public class ExtractedImage {
2121

2222
/**
2323
* Default constructor.
24-
*
24+
*
2525
* @param image Buffered image object.
2626
* @param filename Name of the extracted image.
2727
* @param saveFormat Format to save the image as, defaults to PNG.
@@ -35,7 +35,7 @@ public ExtractedImage(BufferedImage image, String filename, String saveFormat) {
3535
/**
3636
* Write the image to a file.
3737
* Uses the default image format and filename.
38-
*
38+
*
3939
* @param outputPath the output directory (must exist).
4040
* @throws IOException Throws if the file can't be accessed.
4141
*/
@@ -48,7 +48,7 @@ public void writeToFile(String outputPath) throws IOException {
4848
/**
4949
* Write the image to a file.
5050
* Uses the default image format and filename.
51-
*
51+
*
5252
* @param outputPath the output directory (must exist).
5353
* @throws IOException Throws if the file can't be accessed.
5454
*/
@@ -60,7 +60,7 @@ public void writeToFile(Path outputPath) throws IOException {
6060

6161
/**
6262
* Return the image in a format suitable for sending to MindeeClient for parsing.
63-
*
63+
*
6464
* @return an instance of {@link LocalInputSource}
6565
* @throws IOException Throws if the file can't be accessed.
6666
*/

src/main/java/com/mindee/extraction/ImageExtractor.java renamed to src/main/java/com/mindee/image/ImageExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.mindee.extraction;
1+
package com.mindee.image;
22

33
import com.mindee.geometry.Bbox;
44
import com.mindee.geometry.BboxUtils;

src/main/java/com/mindee/extraction/ExtractedPDF.java renamed to src/main/java/com/mindee/pdf/ExtractedPDF.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.mindee.extraction;
1+
package com.mindee.pdf;
22

33
import com.mindee.input.LocalInputSource;
44
import java.io.ByteArrayOutputStream;

src/main/java/com/mindee/extraction/PDFExtractor.java renamed to src/main/java/com/mindee/pdf/PDFExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.mindee.extraction;
1+
package com.mindee.pdf;
22

33
import static com.mindee.pdf.PDFUtils.mergePdfPages;
44

src/test/java/com/mindee/extraction/ImageExtractorTest.java renamed to src/test/java/com/mindee/image/ImageExtractorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.mindee.extraction;
1+
package com.mindee.image;
22

33
import static com.mindee.TestingUtilities.getResourcePath;
44
import static com.mindee.TestingUtilities.getV1ResourcePath;

src/test/java/com/mindee/extraction/PDFExtractorTest.java renamed to src/test/java/com/mindee/pdf/PDFExtractorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.mindee.extraction;
1+
package com.mindee.pdf;
22

33
import static com.mindee.TestingUtilities.getV1ResourcePath;
44

src/test/java/com/mindee/extraction/InvoiceSplitterAutoExtractionIT.java renamed to src/test/java/com/mindee/v1/fileOperation/InvoiceSplitterAutoExtractionIT.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.mindee.extraction;
1+
package com.mindee.v1.fileOperation;
22

33
import static com.mindee.TestingUtilities.getV1ResourcePath;
44
import static com.mindee.TestingUtilities.levenshteinRatio;
@@ -7,6 +7,8 @@
77
import com.mindee.MindeeException;
88
import com.mindee.TestingUtilities;
99
import com.mindee.input.LocalInputSource;
10+
import com.mindee.pdf.ExtractedPDF;
11+
import com.mindee.pdf.PDFExtractor;
1012
import com.mindee.v1.parsing.common.AsyncPredictResponse;
1113
import com.mindee.v1.parsing.common.Document;
1214
import com.mindee.v1.parsing.common.PredictResponse;

0 commit comments

Comments
 (0)