T
- data type.public abstract class FSCollectionFactory<T extends FeatureStructure> extends Object
Collections
from different representations of collections
of UIMA FeatureStructures
.public static Collection<FeatureStructure> create(CAS cas, Type type)
Collection
of the given type of feature structures. This collection is backed
by the CAS, either via an CAS.getAnnotationIndex(Type)
or
FSIndexRepository.getAllIndexedFS(Type)
.cas
- the CAS to select from.type
- the type of feature structures to select. All sub-types are returned as well.Collection
of the given type of feature structures backed live by the CAS.public static <T extends FeatureStructure> Collection<T> create(FSIterator<T> aIterator)
FSIterator
to a Collection
.aIterator
- the iterator to convert.public static <T extends AnnotationFS> Collection<T> create(AnnotationIndex<T> aIndex)
AnnotationIndex
to a Collection
.aIndex
- the index to convert.public static Collection<FeatureStructure> create(ArrayFS aArray)
ArrayFS
to a Collection
.aArray
- the array to convert.public static <T extends TOP> Collection<T> create(ArrayFS aArray, Class<T> aType)
T
- the JCas type.aArray
- the FS arrayaType
- the JCas wrapper class.public static Collection<FeatureStructure> create(ArrayFS aArray, Type aType)
aArray
- the FS arrayaType
- the CAS type.public static ArrayFS createArrayFS(CAS aCas, Collection<? extends FeatureStructure> aCollection)
public static ArrayFS createArrayFS(CAS aCas, FeatureStructure[] aArray)
public static FSArray createFSArray(JCas aJCas, Collection<? extends FeatureStructure> aCollection)
public static FSArray createFSArray(JCas aJCas, FeatureStructure[] aArray)
public static BooleanArrayFS createBooleanArray(CAS aCas, Collection<Boolean> aCollection)
public static BooleanArrayFS createBooleanArray(CAS aCas, boolean[] aArray)
public static BooleanArrayFS createBooleanArray(JCas aJCas, Collection<Boolean> aCollection)
public static BooleanArrayFS createBooleanArray(JCas aJCas, boolean[] aArray)
public static ByteArrayFS createByteArray(CAS aCas, Collection<Byte> aCollection)
public static ByteArrayFS createByteArray(CAS aCas, byte[] aArray)
public static ByteArrayFS createByteArray(JCas aJCas, Collection<Byte> aCollection)
public static ByteArrayFS createByteArray(JCas aJCas, byte[] aArray)
public static DoubleArrayFS createDoubleArray(CAS aCas, Collection<Double> aCollection)
public static DoubleArrayFS createDoubleArray(CAS aCas, double[] aArray)
public static DoubleArrayFS createDoubleArray(JCas aJCas, Collection<Double> aCollection)
public static DoubleArrayFS createDoubleArray(JCas aJCas, double[] aArray)
public static FloatArrayFS createFloatArray(CAS aCas, Collection<Float> aCollection)
public static FloatArrayFS createFloatArray(CAS aCas, float[] aArray)
public static FloatArrayFS createFloatArray(JCas aJCas, Collection<Float> aCollection)
public static FloatArrayFS createFloatArray(JCas aJCas, float[] aArray)
public static IntArrayFS createIntArray(CAS aCas, Collection<Integer> aCollection)
public static IntArrayFS createIntArray(CAS aCas, int[] aArray)
public static IntArrayFS createIntArray(JCas aJCas, Collection<Integer> aCollection)
public static IntArrayFS createIntArray(JCas aJCas, int[] aArray)
public static LongArrayFS createLongArray(CAS aCas, Collection<Long> aCollection)
public static LongArrayFS createLongArray(CAS aCas, long[] aArray)
public static LongArrayFS createLongArray(JCas aJCas, Collection<Long> aCollection)
public static LongArrayFS createLongArray(JCas aJCas, long[] aArray)
public static ShortArrayFS createShortArray(CAS aCas, Collection<Short> aCollection)
public static ShortArrayFS createShortArray(CAS aCas, short[] aArray)
public static ShortArrayFS createShortArray(JCas aJCas, Collection<Short> aCollection)
public static ShortArrayFS createShortArray(JCas aJCas, short[] aArray)
public static StringArrayFS createStringArray(CAS aCas, Collection<String> aCollection)
public static StringArrayFS createStringArray(CAS aCas, String[] aArray)
public static StringArrayFS createStringArray(JCas aJCas, Collection<String> aCollection)
public static StringArrayFS createStringArray(JCas aJCas, String[] aArray)
public static <T extends ArrayFS> T fillArrayFS(T aArrayFs, Iterable<? extends FeatureStructure> aCollection)
public static ArrayFS fillArrayFS(ArrayFS aArrayFs, FeatureStructure[] aArray)
public static BooleanArrayFS fillArrayFS(BooleanArrayFS aArrayFs, Iterable<Boolean> aCollection)
public static BooleanArrayFS fillArrayFS(BooleanArrayFS aArrayFs, boolean[] aArray)
public static ByteArrayFS fillArrayFS(ByteArrayFS aArrayFs, Iterable<Byte> aCollection)
public static ByteArrayFS fillArrayFS(ByteArrayFS aArrayFs, byte[] aArray)
public static DoubleArrayFS fillArrayFS(DoubleArrayFS aArrayFs, Iterable<Double> aCollection)
public static DoubleArrayFS fillArrayFS(DoubleArrayFS aArrayFs, double[] aArray)
public static FloatArrayFS fillArrayFS(FloatArrayFS aArrayFs, Iterable<Float> aCollection)
public static FloatArrayFS fillArrayFS(FloatArrayFS aArrayFs, float[] aArray)
public static IntArrayFS fillArrayFS(IntArrayFS aArrayFs, Iterable<Integer> aCollection)
public static IntArrayFS fillArrayFS(IntArrayFS aArrayFs, int[] aArray)
public static LongArrayFS fillArrayFS(LongArrayFS aArrayFs, Iterable<Long> aCollection)
public static LongArrayFS fillArrayFS(LongArrayFS aArrayFs, long[] aArray)
public static ShortArrayFS fillArrayFS(ShortArrayFS aArrayFs, Iterable<Short> aCollection)
public static ShortArrayFS fillArrayFS(ShortArrayFS aArrayFs, short[] aArray)
public static StringArrayFS fillArrayFS(StringArrayFS aArrayFs, Iterable<String> aCollection)
public static StringArrayFS fillArrayFS(StringArrayFS aArrayFs, String[] aArray)
public static Collection<TOP> create(FSList aList)
public static <T extends TOP> Collection<T> create(FSList aList, Class<T> aType)
T
- the JCas type.aList
- the FS listaType
- the JCas wrapper class.public static Collection<TOP> create(FSList aList, Type type)
public static Collection<String> create(StringList aList)
public static Collection<Integer> create(IntegerList aList)
public static Collection<Float> create(FloatList aList)
public static FSList createFSList(JCas aJCas, Collection<? extends TOP> aCollection)
public static FloatList createFloatList(JCas aJCas, Collection<Float> aCollection)
public static IntegerList createIntegerList(JCas aJCas, Collection<Integer> aCollection)
public static StringList createStringList(JCas aJCas, Collection<String> aCollection)
Copyright © 2012–2013 The Apache Software Foundation. All rights reserved.