/** * @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 TemplateFieldDefinition(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** * @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 TemplateFieldDefinition(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
@Test(expected = AnalysisEngineProcessException.class) public void testErrorWhenRecordNameNotUnique() throws AnalysisEngineProcessException, ResourceInitializationException, JsonParseException, JsonMappingException, IOException { TemplateRecordDefinition record1 = new TemplateRecordDefinition(jCas); record1.setBegin(123); record1.setEnd(140); record1.setName("record1"); record1.addToIndexes(); TemplateFieldDefinition field1 = new TemplateFieldDefinition(jCas); field1.setBegin(72); field1.setEnd(75); field1.setName("myField1"); field1.addToIndexes(); processJCas( TemplateRecordConfigurationCreatingConsumer.PARAM_OUTPUT_DIRECTORY, tempDirectory.toString()); }