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