public class DATACasUtils extends Object
| Constructor and Description |
|---|
DATACasUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addFeature(org.apache.uima.cas_data.CasData dataCas,
String featureType,
String featureName,
String featureValue)
Adds the feature.
|
static void |
addFeatureStructure(org.apache.uima.cas_data.CasData dataCas,
String featureType,
String featureName,
String featureValue)
Adds the feature structure.
|
static boolean |
dropIt(String aKey,
String[] dropKeyList)
Drop it.
|
static void |
dumpFeatures(org.apache.uima.cas_data.CasData aCAS)
Dump features.
|
static long |
getByteCount(org.apache.uima.cas_data.CasData aDataCas)
Gets the byte count.
|
static org.apache.uima.resource.metadata.NameValuePair[] |
getCasDataFeatures(org.apache.uima.cas_data.CasData aCasData,
String aFeatureStructureName)
Gets the cas data features.
|
static String[] |
getFeatureStructureValues(org.apache.uima.cas_data.CasData aCAS,
String featureStructureName,
String featureName)
Gets the feature structure values.
|
static String |
getFeatureValueByType(org.apache.uima.cas_data.CasData aCAS,
String featureName)
Gets the feature value by type.
|
static String |
getFeatureValueByType(org.apache.uima.cas_data.CasData aCAS,
String aFeatureStructure,
String featureName)
Gets the feature value by type.
|
static String |
getXCASasString(org.apache.uima.cas_data.CasData aCasData,
String[] keysToFilter)
Gets the XCA sas string.
|
static boolean |
hasFeature(org.apache.uima.cas_data.CasData aCAS,
String featureName)
Checks for feature.
|
static boolean |
hasFeatureStructure(org.apache.uima.cas_data.CasData aCAS,
String aName)
Checks for feature structure.
|
static boolean |
isCasEmpty(org.apache.uima.cas_data.CasData aDataCas)
Checks if is cas empty.
|
static boolean |
isValidType(String aKey,
String[] typeList)
Checks if is valid type.
|
static void |
remapFeatureTypes(org.apache.uima.cas_data.CasData aDataCas,
FeatureMap aFeatureMap)
Remap feature types.
|
static boolean |
shouldAnalyzeCAS(org.apache.uima.cas_data.CasData aCAS,
LinkedList aFilterList)
Should analyze CAS.
|
public static String getXCASasString(org.apache.uima.cas_data.CasData aCasData, String[] keysToFilter) throws Exception
aCasData - the a cas datakeysToFilter - the keys to filterException - the exceptionpublic static void addFeatureStructure(org.apache.uima.cas_data.CasData dataCas,
String featureType,
String featureName,
String featureValue)
dataCas - the data casfeatureType - the feature typefeatureName - the feature namefeatureValue - the feature valuepublic static boolean isCasEmpty(org.apache.uima.cas_data.CasData aDataCas)
aDataCas - the a data caspublic static void addFeature(org.apache.uima.cas_data.CasData dataCas,
String featureType,
String featureName,
String featureValue)
dataCas - the data casfeatureType - the feature typefeatureName - the feature namefeatureValue - the feature valuepublic static long getByteCount(org.apache.uima.cas_data.CasData aDataCas)
throws Exception
aDataCas - the a data casException - -public static boolean shouldAnalyzeCAS(org.apache.uima.cas_data.CasData aCAS,
LinkedList aFilterList)
aCAS - the a CASaFilterList - the a filter listpublic static boolean dropIt(String aKey, String[] dropKeyList)
aKey - the a keydropKeyList - the drop key listpublic static boolean isValidType(String aKey, String[] typeList)
aKey - the a keytypeList - the type listpublic static boolean hasFeature(org.apache.uima.cas_data.CasData aCAS,
String featureName)
aCAS - the a CASfeatureName - the feature namepublic static boolean hasFeatureStructure(org.apache.uima.cas_data.CasData aCAS,
String aName)
aCAS - the a CASaName - the a namepublic static void dumpFeatures(org.apache.uima.cas_data.CasData aCAS)
aCAS - the a CASpublic static String getFeatureValueByType(org.apache.uima.cas_data.CasData aCAS, String featureName)
aCAS - the a CASfeatureName - the feature namepublic static String[] getFeatureStructureValues(org.apache.uima.cas_data.CasData aCAS, String featureStructureName, String featureName)
aCAS - the a CASfeatureStructureName - the feature structure namefeatureName - the feature namepublic static String getFeatureValueByType(org.apache.uima.cas_data.CasData aCAS, String aFeatureStructure, String featureName)
aCAS - the a CASaFeatureStructure - the a feature structurefeatureName - the feature namepublic static void remapFeatureTypes(org.apache.uima.cas_data.CasData aDataCas,
FeatureMap aFeatureMap)
aDataCas - the a data casaFeatureMap - the a feature mappublic static org.apache.uima.resource.metadata.NameValuePair[] getCasDataFeatures(org.apache.uima.cas_data.CasData aCasData,
String aFeatureStructureName)
aCasData - the a cas dataaFeatureStructureName - the a feature structure nameCopyright © 2006–2017 The Apache Software Foundation. All rights reserved.