Class AltoSearchParser

java.lang.Object
io.goobi.viewer.model.iiif.search.parser.AbstractSearchParser
io.goobi.viewer.model.iiif.search.parser.AltoSearchParser

public class AltoSearchParser extends AbstractSearchParser

AltoSearchParser class.

Author:
florian
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.Line> lines)
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.

      Parameters:
      words - a List object.
      regex - a String object.
      Returns:
      a List object.
    • 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.

      Parameters:
      lines - a List object.
      regex - a String object.
      Returns:
      a Map object.
    • getText

      public String getText(List<de.intranda.digiverso.ocr.alto.model.structureclasses.Line> lines)

      getText.

      Parameters:
      lines - a List object.
      Returns:
      a String object.
    • 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 - a AltoDocument 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 - a AltoDocument 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.

      Parameters:
      indexStart - a int.
      indexEnd - a int.
      allLines - a List object.
      Returns:
      a List object.
    • 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 - a List object.
      line - a Line 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 - a List object.
      line - a Line object.
      Returns:
      a int.
    • getPrecedingText

      public String getPrecedingText(de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.Word w, int maxLength)

      getPrecedingText.

      Parameters:
      w - a Word 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 - a Word object.
      maxLength - a int.
      Returns:
      a String object.