/** * @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public Document(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
@Test public void testSelectors() throws UIMAException { jCas.setDocumentText("A sample document"); final Document s = new Document(jCas); s.setBegin(0); s.setEnd(10); s.addToIndexes(); SimplePipeline.runPipeline(jCas, AnalysisEngineFactory.createEngine(Selectors.class)); } }
/** * Create a Document, selecting sub type if appropriate. * * @param jCas the jCas * @param element the element name * @return the Style */ private Document createFromMain(final JCas jCas, final Element element) { final String clazz = element.attr(CLASS); switch (clazz.toLowerCase()) { case "spreadsheet": return new SpreadSheet(jCas); case "slideshow": return new SlideShow(jCas); case "document": default: return new Document(jCas); } }
/** * Internal - constructor used by generator * * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public Document(int addr, TOP_Type type) { super(addr, type); readObject(); }
@Test public void testStructures() throws UIMAException { jCas.setDocumentText("A sample document"); final Document s = new Document(jCas); s.setBegin(0); s.setEnd(10); s.addToIndexes(); SimplePipeline.runPipeline(jCas, AnalysisEngineFactory.createEngine(Structures.class)); }
/** * Create a Document, selecting sub type if appropriate. * * @param jCas the jCas * @param element the element name * @return the Style */ private Document createFromMain(final JCas jCas, final Element element) { final String clazz = element.attr(CLASS); switch (clazz.toLowerCase()) { case "spreadsheet": return new SpreadSheet(jCas); case "slideshow": return new SlideShow(jCas); case "document": default: return new Document(jCas); } }
/** * @generated * @param jcas JCas to which this Feature Structure belongs */ public Document(JCas jcas) { super(jcas); readObject(); }
@Test public void testOutputData() throws Exception { final AnalysisEngine consumer = AnalysisEngineFactory.createEngine( StructuralHtml.class, Html5.PARAM_OUTPUT_FOLDER, outputFolder.getPath(), StructuralHtml.PARAM_OUTPUT_DATA, true); final DocumentAnnotation da = (DocumentAnnotation) jCas.getDocumentAnnotationFs(); da.setSourceUri("test.txt"); jCas.setDocumentText("Example"); final Document d = new Document(jCas); d.setBegin(0); d.setEnd("Example".length()); d.addToIndexes(); consumer.process(jCas); final File f = new File(outputFolder, "test.txt.html"); assertTrue(f.exists()); assertEquals( Jsoup.parse(f, "UTF-8").html().replaceAll("\\s*", ""), EXPECTED_DATA.replaceAll("\\s*", "")); }
/** * @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public Document(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** * Internal - constructor used by generator * * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public Document(int addr, TOP_Type type) { super(addr, type); readObject(); }
Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length()); document.addToIndexes();
/** * @generated * @param jcas JCas to which this Feature Structure belongs */ public Document(JCas jcas) { super(jcas); readObject(); }
Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length()); document.addToIndexes();
Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length()); document.addToIndexes();
Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length()); document.addToIndexes();
protected void addAnnotations(JCas jCas) { document = new Document(jCas); document.setDepth(1); document.setBegin(0); document.setEnd(TEXT.length()); document.addToIndexes();
final Document doc = new Document(jCas); doc.setBegin(0); doc.setEnd(text.length()); doc.addToIndexes();
Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length()); document.addToIndexes();
int depth = 0; Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); section4.addToIndexes(); document.setEnd(cursor); document.addToIndexes();
protected void addAnnotations() { int cursor = 0; int depth = 0; Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length()); document.addToIndexes();