AbstractFieldGenerator { public ArrayFieldValue createRawFieldValueForAnnotation(FeatureStructure annotation, String[] featurePaths, Filter[] filters) throws CASException { ArrayFieldValue arrayFieldValue = new ArrayFieldValue(); for (int i = 0; i < featurePaths.length; i++) { String featurePath = featurePaths[i]; Filter filter = null; if (filters != null && i < filters.length) filter = filters[i]; arrayFieldValue.addFlattened(createRawFieldValueForAnnotation(annotation, featurePath, filter)); } return arrayFieldValue; } @Deprecated  AbstractFieldGenerator(String fieldname); @Deprecated  AbstractFieldGenerator(String fieldname, FilterRegistry filterRegistry);  AbstractFieldGenerator();  AbstractFieldGenerator(FilterRegistry filterRegistry); void setFilterRegistry(FilterRegistry filterRegistry); @SuppressWarnings("unchecked") List<T> getTokensForAnnotationIndexes(FeaturePathSets featurePathSets,
			Filter filterForField, boolean sort, Class<T> tokenClass, AnnotationFS coveringAnnotation,
			DistributedField<? extends IToken> distributedFields, JCas aJCas); @SuppressWarnings("unchecked") T createRawFieldValueForString(String input, Filter f); ArrayFieldValue createRawArrayFieldValue(Collection<T> fieldValues); @SuppressWarnings("unchecked") ArrayFieldValue createRawArrayFieldValue(Collection<T> fieldValues, Filter filter); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] fs, String featurePath, Filter filter,
			Filter overallFilter); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] fs, String featurePath, Filter filter); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] fs, String featurePath); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] a, String[] featurePaths); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] a, String[] featurePaths,
			Filter[] filters); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] fss, String[] featurePaths,
			Filter[] filters, Filter overallFilter); ArrayFieldValue createRawFieldValueForAnnotation(FeatureStructure annotation, String[] featurePaths,
			Filter[] filters); IFieldValue createRawFieldValueForAnnotation(FeatureStructure fs, String featurePath, Filter f); PreanalyzedFieldValue createPreanalyzedFieldValue(String stringValue, List<PreanalyzedToken> tokens); PreanalyzedToken createPreanalyzedTokenInTokenSequence(List<?> fieldValueList, String term, int start,
			int end, int posIncr, byte[] payload, String type, int flags); String getFieldname(); void setFieldname(String fieldname); void addFieldSubgenerator(FieldGenerator subgenerator); FieldGenerator getFieldSubgenerator(Class<? extends FieldGenerator> generatorClass); void addInnerDocumentGenerator(FieldValueGenerator subgenerator); FieldValueGenerator getInnerDocumentGenerator(Class<? extends FieldValueGenerator> generatorClass); @Deprecated void addSubgeneratorFeatureStructure(Object key, TOP featureStructure); Map<Class<?>, List<TOP>> getSubgeneratorFS();  }
@Test public void testCreateRawFieldValueForAnnotation() throws Exception { JCas jCas = JCasFactory.createJCas("de.julielab.jcore.consumer.es.testTypes"); jCas.setDocumentText("text"); ESConsumerTestType a = new ESConsumerTestType(jCas, 0, 4); a.setStringFeature("testvalue"); StringArray sa = new StringArray(jCas, 2); sa.set(0, "saElement1"); sa.set(1, "saElement2"); a.setStringArrayFeature(sa); IFieldValue value = createRawFieldValueForAnnotation(a, "/stringFeature", null); assertEquals(RawToken.class, value.getClass()); assertEquals("testvalue", ((RawToken) value).token); value = createRawFieldValueForAnnotation(a, "/stringArrayFeature", null); assertEquals(ArrayFieldValue.class, value.getClass()); ArrayFieldValue array = (ArrayFieldValue) value; assertEquals(2, array.size()); assertEquals(RawToken.class, array.get(0).getClass()); assertEquals("saElement1", ((RawToken) array.get(0)).token); assertEquals("saElement2", ((RawToken) array.get(1)).token); }