Tabnine Logo
TemplateRecordDefinition.getEnd
Code IndexAdd Tabnine to your IDE (free)

How to use
getEnd
method
in
uk.gov.dstl.baleen.types.templates.TemplateRecordDefinition

Best Java code snippets using uk.gov.dstl.baleen.types.templates.TemplateRecordDefinition.getEnd (Showing top 4 results out of 315)

origin: dstl/baleen

Optional<Structure> endStructure =
  JCasUtil.selectCovering(
      jCas, Structure.class, recordDefinition.getEnd(), recordDefinition.getEnd())
    .stream()
    .max(Comparator.comparingInt(Structure::getDepth));
origin: dstl/baleen

@Test
public void annotate2Record()
  throws AnalysisEngineProcessException, ResourceInitializationException {
 jCas.setDocumentText(RECORD2_TEXT);
 processJCas();
 TemplateRecordDefinition record =
   JCasUtil.selectByIndex(jCas, TemplateRecordDefinition.class, 0);
 assertEquals(83, record.getBegin());
 assertEquals(169, record.getEnd());
 assertEquals(
   " \n"
     + "    Full Name:  \n"
     + "    <<field:PersonFullName>> \n"
     + " Description: \n"
     + " <<field:Description>>",
   record.getCoveredText());
 TemplateRecordDefinition record2 =
   JCasUtil.selectByIndex(jCas, TemplateRecordDefinition.class, 1);
 assertEquals(293, record2.getBegin());
 assertEquals(379, record2.getEnd());
 assertEquals(
   " \n"
     + "    Full Name:  \n"
     + "    <<field:PersonFullName>> \n"
     + " Description: \n"
     + " <<field:Description>>",
   record2.getCoveredText());
}
origin: dstl/baleen

@Test
public void annotateRecord()
  throws AnalysisEngineProcessException, ResourceInitializationException {
 jCas.setDocumentText(RECORD_TEXT);
 processJCas();
 TemplateRecordDefinition record =
   JCasUtil.selectByIndex(jCas, TemplateRecordDefinition.class, 0);
 assertEquals(83, record.getBegin());
 assertEquals(169, record.getEnd());
 assertFalse(record.getRepeat());
 assertEquals(
   " \n"
     + "    Full Name:  \n"
     + "    <<field:PersonFullName>> \n"
     + " Description: \n"
     + " <<field:Description>>",
   record.getCoveredText());
}
origin: dstl/baleen

 @Test
 public void annotateRepeatingRecord()
   throws AnalysisEngineProcessException, ResourceInitializationException {
  jCas.setDocumentText(REPEAT_RECORD_TEXT);
  processJCas();
  TemplateRecordDefinition record =
    JCasUtil.selectByIndex(jCas, TemplateRecordDefinition.class, 0);
  assertEquals(90, record.getBegin());
  assertEquals(176, record.getEnd());
  assertTrue(record.getRepeat());
  assertEquals(
    " \n"
      + "    Full Name:  \n"
      + "    <<field:PersonFullName>> \n"
      + " Description: \n"
      + " <<field:Description>>",
    record.getCoveredText());
 }
}
uk.gov.dstl.baleen.types.templatesTemplateRecordDefinitiongetEnd

Popular methods of TemplateRecordDefinition

  • getBegin
  • getRepeat
    getter for repeat - gets Declare that this record is repeatable in the document. For example, a repe
  • setBegin
  • setEnd
  • <init>
  • addToIndexes
  • getCoveredText
  • getName
    getter for name - gets The name of the record, eg Address
  • readObject
    Write your own initialization here
  • setName
    setter for name - sets The name of the record, eg Address
  • setRepeat
    setter for repeat - sets Declare that this record is repeatable in the document. For example, a repe
  • setRepeat

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
  • getSystemService (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now