Class DATACasUtils
- java.lang.Object
-
- org.apache.uima.collection.impl.cpm.vinci.DATACasUtils
-
public class DATACasUtils extends java.lang.ObjectThe Class DATACasUtils.
-
-
Constructor Summary
Constructors Constructor Description DATACasUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddFeature(CasData dataCas, java.lang.String featureType, java.lang.String featureName, java.lang.String featureValue)Adds the feature.static voidaddFeatureStructure(CasData dataCas, java.lang.String featureType, java.lang.String featureName, java.lang.String featureValue)Adds the feature structure.static booleandropIt(java.lang.String aKey, java.lang.String[] dropKeyList)Drop it.static voiddumpFeatures(CasData aCAS)Dump features.static longgetByteCount(CasData aDataCas)Gets the byte count.static NameValuePair[]getCasDataFeatures(CasData aCasData, java.lang.String aFeatureStructureName)Gets the cas data features.static java.lang.String[]getFeatureStructureValues(CasData aCAS, java.lang.String featureStructureName, java.lang.String featureName)Gets the feature structure values.static java.lang.StringgetFeatureValueByType(CasData aCAS, java.lang.String featureName)Gets the feature value by type.static java.lang.StringgetFeatureValueByType(CasData aCAS, java.lang.String aFeatureStructure, java.lang.String featureName)Gets the feature value by type.static java.lang.StringgetXCASasString(CasData aCasData, java.lang.String[] keysToFilter)Gets the XCA sas string.static booleanhasFeature(CasData aCAS, java.lang.String featureName)Checks for feature.static booleanhasFeatureStructure(CasData aCAS, java.lang.String aName)Checks for feature structure.static booleanisCasEmpty(CasData aDataCas)Checks if is cas empty.static booleanisValidType(java.lang.String aKey, java.lang.String[] typeList)Checks if is valid type.static voidremapFeatureTypes(CasData aDataCas, FeatureMap aFeatureMap)Remap feature types.static booleanshouldAnalyzeCAS(CasData aCAS, java.util.LinkedList aFilterList)Should analyze CAS.
-
-
-
Method Detail
-
getXCASasString
public static java.lang.String getXCASasString(CasData aCasData, java.lang.String[] keysToFilter) throws java.lang.Exception
Gets the XCA sas string.- Parameters:
aCasData- the a cas datakeysToFilter- the keys to filter- Returns:
- the XCA sas string
- Throws:
java.lang.Exception- the exception
-
addFeatureStructure
public static void addFeatureStructure(CasData dataCas, java.lang.String featureType, java.lang.String featureName, java.lang.String featureValue)
Adds the feature structure.- Parameters:
dataCas- the data casfeatureType- the feature typefeatureName- the feature namefeatureValue- the feature value
-
isCasEmpty
public static boolean isCasEmpty(CasData aDataCas)
Checks if is cas empty.- Parameters:
aDataCas- the a data cas- Returns:
- true if the data cas is empty
-
addFeature
public static void addFeature(CasData dataCas, java.lang.String featureType, java.lang.String featureName, java.lang.String featureValue)
Adds the feature.- Parameters:
dataCas- the data casfeatureType- the feature typefeatureName- the feature namefeatureValue- the feature value
-
getByteCount
public static long getByteCount(CasData aDataCas) throws java.lang.Exception
Gets the byte count.- Parameters:
aDataCas- the a data cas- Returns:
- the byte count
- Throws:
java.lang.Exception- -
-
shouldAnalyzeCAS
public static boolean shouldAnalyzeCAS(CasData aCAS, java.util.LinkedList aFilterList)
Should analyze CAS.- Parameters:
aCAS- the a CASaFilterList- the a filter list- Returns:
- true if this cas should be analyzed
-
dropIt
public static boolean dropIt(java.lang.String aKey, java.lang.String[] dropKeyList)Drop it.- Parameters:
aKey- the a keydropKeyList- the drop key list- Returns:
- true if this key is in the dropKeyList
-
isValidType
public static boolean isValidType(java.lang.String aKey, java.lang.String[] typeList)Checks if is valid type.- Parameters:
aKey- the a keytypeList- the type list- Returns:
- true if tbd
-
hasFeature
public static boolean hasFeature(CasData aCAS, java.lang.String featureName)
Checks for feature.- Parameters:
aCAS- the a CASfeatureName- the feature name- Returns:
- true if
-
hasFeatureStructure
public static boolean hasFeatureStructure(CasData aCAS, java.lang.String aName)
Checks for feature structure.- Parameters:
aCAS- the a CASaName- the a name- Returns:
- true if tbd
-
dumpFeatures
public static void dumpFeatures(CasData aCAS)
Dump features.- Parameters:
aCAS- the a CAS
-
getFeatureValueByType
public static java.lang.String getFeatureValueByType(CasData aCAS, java.lang.String featureName)
Gets the feature value by type.- Parameters:
aCAS- the a CASfeatureName- the feature name- Returns:
- true if tbd
-
getFeatureStructureValues
public static java.lang.String[] getFeatureStructureValues(CasData aCAS, java.lang.String featureStructureName, java.lang.String featureName)
Gets the feature structure values.- Parameters:
aCAS- the a CASfeatureStructureName- the feature structure namefeatureName- the feature name- Returns:
- tbd
-
getFeatureValueByType
public static java.lang.String getFeatureValueByType(CasData aCAS, java.lang.String aFeatureStructure, java.lang.String featureName)
Gets the feature value by type.- Parameters:
aCAS- the a CASaFeatureStructure- the a feature structurefeatureName- the feature name- Returns:
- tbd
-
remapFeatureTypes
public static void remapFeatureTypes(CasData aDataCas, FeatureMap aFeatureMap)
Remap feature types.- Parameters:
aDataCas- the a data casaFeatureMap- the a feature map
-
getCasDataFeatures
public static NameValuePair[] getCasDataFeatures(CasData aCasData, java.lang.String aFeatureStructureName)
Gets the cas data features.- Parameters:
aCasData- the a cas dataaFeatureStructureName- the a feature structure name- Returns:
- tbd
-
-