Class AltoSearchParser
java.lang.Object
io.goobi.viewer.model.iiif.search.parser.AbstractSearchParser
io.goobi.viewer.model.iiif.search.parser.AltoSearchParser
AltoSearchParser class.
- Author:
- florian
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMap<org.apache.commons.lang3.Range<Integer>,
List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line>> findLineMatches
(List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> lines, String regex) findLineMatches.findWordMatches
(List<de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.Word> words, String regex) findWordMatches.List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line>
getContainingLines
(List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> allLines, int indexStart, int indexEnd) getContainingLines.int
getLineEndIndex
(List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> allLines, de.intranda.digiverso.ocr.alto.model.structureclasses.Line line) getLineEndIndex.List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line>
getLines
(de.intranda.digiverso.ocr.alto.model.structureclasses.logical.AltoDocument doc) getLines.int
getLineStartIndex
(List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> allLines, de.intranda.digiverso.ocr.alto.model.structureclasses.Line line) getLineStartIndex.getPrecedingText
(de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.Word w, int maxLength) getPrecedingText.getSucceedingText
(de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.Word w, int maxLength) getSucceedingText.getText.List<de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.Word>
getWords
(de.intranda.digiverso.ocr.alto.model.structureclasses.logical.AltoDocument doc) getWords.Methods inherited from class io.goobi.viewer.model.iiif.search.parser.AbstractSearchParser
getAutoSuggestRegex, getContainedWordRegex, getPrecedingText, getQueryRegex, getSingleWordRegex, getSucceedingText
-
Constructor Details
-
AltoSearchParser
public AltoSearchParser()
-
-
Method Details
-
findWordMatches
public List<List<de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.Word>> findWordMatches(List<de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.Word> words, String regex) findWordMatches.
-
findLineMatches
public Map<org.apache.commons.lang3.Range<Integer>,List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line>> findLineMatches(List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> lines, String regex) findLineMatches.
-
getText
getText.
-
getLines
public List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> getLines(de.intranda.digiverso.ocr.alto.model.structureclasses.logical.AltoDocument doc) getLines.
- Parameters:
doc
- aAltoDocument
object.- Returns:
- a
List
object.
-
getWords
public List<de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.Word> getWords(de.intranda.digiverso.ocr.alto.model.structureclasses.logical.AltoDocument doc) getWords.
- Parameters:
doc
- aAltoDocument
object.- Returns:
- a
List
object.
-
getContainingLines
public List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> getContainingLines(List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> allLines, int indexStart, int indexEnd) getContainingLines.
-
getLineStartIndex
public int getLineStartIndex(List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> allLines, de.intranda.digiverso.ocr.alto.model.structureclasses.Line line) getLineStartIndex.
- Parameters:
allLines
- aList
object.line
- aLine
object.- Returns:
- a int.
-
getLineEndIndex
public int getLineEndIndex(List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> allLines, de.intranda.digiverso.ocr.alto.model.structureclasses.Line line) getLineEndIndex.
- Parameters:
allLines
- aList
object.line
- aLine
object.- Returns:
- a int.
-
getPrecedingText
public String getPrecedingText(de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.Word w, int maxLength) getPrecedingText.
- Parameters:
w
- aWord
object.maxLength
- a int.- Returns:
- a
String
object.
-
getSucceedingText
public String getSucceedingText(de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.Word w, int maxLength) getSucceedingText.
- Parameters:
w
- aWord
object.maxLength
- a int.- Returns:
- a
String
object.
-