public class JCoReTools extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_ADDITION_SIZE
Number of elements to be added if FSArray object is resized
|
| Constructor and Description |
|---|
JCoReTools() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.uima.jcas.cas.FSArray |
addToFSArray(org.apache.uima.jcas.cas.FSArray inputArray,
Collection<? extends org.apache.uima.cas.FeatureStructure> newElements)
Adds all elements in newElements to array resizes the FSArray if necessary.
|
static org.apache.uima.jcas.cas.FSArray |
addToFSArray(org.apache.uima.jcas.cas.FSArray array,
org.apache.uima.cas.FeatureStructure newElement)
Adds an Element of type FeatrueStructrue to a FSArray and resizes the FSArray if necessary
|
static org.apache.uima.jcas.cas.FSArray |
addToFSArray(org.apache.uima.jcas.cas.FSArray array,
org.apache.uima.cas.FeatureStructure newElement,
int additionSize)
Adds an Element of type FeatrueStructrue to a FSArray and resizes the FSArray if necessary, adding additionSize
new elements to the array (only if necessary!)
|
static org.apache.uima.jcas.cas.StringArray |
addToStringArray(org.apache.uima.jcas.cas.StringArray array,
String[] elements,
org.apache.uima.jcas.JCas jcas) |
static org.apache.uima.jcas.cas.StringArray |
addToStringArray(org.apache.uima.jcas.cas.StringArray array,
String element,
org.apache.uima.jcas.JCas jcas) |
static org.apache.uima.jcas.cas.FSArray |
copyFSArray(org.apache.uima.jcas.cas.FSArray array) |
static org.apache.uima.collection.CollectionReader |
getCollectionReader(String readerDescriptor) |
static String |
getPubmedId(org.apache.uima.jcas.JCas aJCas)
Returns the PubMed ID of the document in the
JCas. |
static void |
printFSArray(org.apache.uima.jcas.cas.FSArray array)
Prints the content of the FSArray to System.out
|
public static final int DEFAULT_ADDITION_SIZE
public static org.apache.uima.jcas.cas.FSArray addToFSArray(org.apache.uima.jcas.cas.FSArray array,
org.apache.uima.cas.FeatureStructure newElement)
array - The array to what the feature structure should be addednewElement - The feature structure that should be added to the arraypublic static org.apache.uima.jcas.cas.FSArray addToFSArray(org.apache.uima.jcas.cas.FSArray array,
org.apache.uima.cas.FeatureStructure newElement,
int additionSize)
array - The array to what the feature structure should be addednewElement - The feature structure that should be added to the arrayadditionSize - The size the array should be expandedpublic static org.apache.uima.jcas.cas.FSArray addToFSArray(org.apache.uima.jcas.cas.FSArray inputArray,
Collection<? extends org.apache.uima.cas.FeatureStructure> newElements)
inputArray - The array to what the feature structure should be addednewElement - The feature structure that should be added to the arrayorg.apache.uima.cas.CASExceptionpublic static org.apache.uima.jcas.cas.FSArray copyFSArray(org.apache.uima.jcas.cas.FSArray array)
public static org.apache.uima.jcas.cas.StringArray addToStringArray(org.apache.uima.jcas.cas.StringArray array,
String element,
org.apache.uima.jcas.JCas jcas)
public static org.apache.uima.jcas.cas.StringArray addToStringArray(org.apache.uima.jcas.cas.StringArray array,
String[] elements,
org.apache.uima.jcas.JCas jcas)
public static void printFSArray(org.apache.uima.jcas.cas.FSArray array)
array - The array to be printedpublic static String getPubmedId(org.apache.uima.jcas.JCas aJCas)
Returns the PubMed ID of the document in the JCas.
This can only be done when an annotation of type de.julielab.jcore.types.pubmed.Header is present
and its feature docId has the appropriate value.
aJCas - Headerpublic static org.apache.uima.collection.CollectionReader getCollectionReader(String readerDescriptor)
Copyright © 2016 JULIE Lab Jena, Germany. All rights reserved.