-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
2,264 additions
and
1,666 deletions.
There are no files selected for viewing
This file contains 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 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 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
Binary file modified
BIN
+47.8 KB
(110%)
src/lib/repository/org/primaresearch/Dla/1.4.02/Dla-1.4.02.jar
Binary file not shown.
Binary file modified
BIN
-5.71 KB
(83%)
src/lib/repository/org/primaresearch/Io/1.4.02/Io-1.4.02.jar
Binary file not shown.
This file contains 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
61 changes: 61 additions & 0 deletions
61
src/main/java/de/uniwue/web/communication/BatchSegmentationRequest.java
This file contains 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,61 @@ | ||
package de.uniwue.web.communication; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import de.uniwue.web.facade.segmentation.SegmentationSettings; | ||
import de.uniwue.web.model.PageAnnotations; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Communication object for the gui to request the segmentation of different | ||
* pages. Contains the segmentation settings and a list of page numbers to | ||
* segment. | ||
* | ||
*/ | ||
public class BatchSegmentationRequest { | ||
|
||
@JsonProperty("settings") | ||
private SegmentationSettings settings; | ||
@JsonProperty("pages") | ||
private List<Integer> pages; | ||
@JsonProperty("save") | ||
private boolean save; | ||
@JsonProperty("bookid") | ||
private Integer bookid; | ||
@JsonProperty("version") | ||
private String version; | ||
|
||
@JsonCreator | ||
public BatchSegmentationRequest(@JsonProperty("settings") SegmentationSettings settings, | ||
@JsonProperty("pages") List<Integer> pages, | ||
@JsonProperty("save") boolean save, | ||
@JsonProperty("bookid") Integer bookid, | ||
@JsonProperty("version") String version) { | ||
this.pages = pages; | ||
this.settings = settings; | ||
this.save = save; | ||
this.bookid = bookid; | ||
this.version = version; | ||
} | ||
|
||
public List<Integer> getPages() { | ||
return pages; | ||
} | ||
|
||
public SegmentationSettings getSettings() { | ||
return settings; | ||
} | ||
|
||
public boolean getSave() { return save; } | ||
|
||
public Integer getBookid() { | ||
return bookid; | ||
} | ||
|
||
public String getVersion() { | ||
return version; | ||
} | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/de/uniwue/web/controller/ConfigController.java
This file contains 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,33 @@ | ||
package de.uniwue.web.controller; | ||
|
||
import java.io.File; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.annotation.Scope; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
|
||
import de.uniwue.web.config.LarexConfiguration; | ||
import de.uniwue.web.io.FilePathManager; | ||
|
||
@Controller | ||
@Scope("request") | ||
public class ConfigController { | ||
@Autowired | ||
private FilePathManager fileManager; | ||
@Autowired | ||
private LarexConfiguration config; | ||
|
||
/** | ||
* Returns whether LAREX is configured to be used in conjunction with OCR4all or not. | ||
*/ | ||
@RequestMapping(value = "config/ocr4all", method = RequestMethod.POST, headers = "Accept=*/*", | ||
produces = "application/json") | ||
public @ResponseBody Boolean isOCR4allMode() { | ||
config.read(new File(fileManager.getConfigurationFile())); | ||
String ocr4allMode = config.getSetting("ocr4all"); | ||
return ocr4allMode.equals("enable"); | ||
} | ||
} |
This file contains 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 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.