You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by al...@apache.org on 2007/07/06 21:50:11 UTC
svn commit: r554018 -
/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/components/FileSystemCollectionReader.java
Author: alally
Date: Fri Jul 6 12:50:09 2007
New Revision: 554018
URL: http://svn.apache.org/viewvc?view=rev&rev=554018
Log:
For backwards compatibility allow XCAS config param to be set to "true"
UIMA-413: https://issues.apache.org/jira/browse/UIMA-413
Modified:
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/components/FileSystemCollectionReader.java
Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/components/FileSystemCollectionReader.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/components/FileSystemCollectionReader.java?view=diff&rev=554018&r1=554017&r2=554018
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/components/FileSystemCollectionReader.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/components/FileSystemCollectionReader.java Fri Jul 6 12:50:09 2007
@@ -108,7 +108,9 @@
mEncoding = (String) getConfigParameterValue(PARAM_ENCODING);
mLanguage = (String) getConfigParameterValue(PARAM_LANGUAGE);
mXCAS = (String) getConfigParameterValue(PARAM_XCAS);
- mTEXT = !("xcas".equalsIgnoreCase(mXCAS) || "xmi".equalsIgnoreCase(mXCAS));
+ //XCAS parameter can be set to "xcas" or "xmi", as well as "true" (which for historical reasons
+ //means the same as "xcas"). Any other value will cause the input file to be treated as a text document.
+ mTEXT = !("xcas".equalsIgnoreCase(mXCAS) || "xmi".equalsIgnoreCase(mXCAS) || "true".equalsIgnoreCase(mXCAS));
String mLenient = (String) getConfigParameterValue(PARAM_LENIENT);
lenient = "true".equalsIgnoreCase(mLenient);
@@ -187,11 +189,11 @@
// XCAS input files
else {
try {
- if (mXCAS.equalsIgnoreCase("XCAS")) {
- XCASDeserializer.deserialize(fis, aCAS, lenient);
+ if (mXCAS.equalsIgnoreCase("xmi")) {
+ XmiCasDeserializer.deserialize(fis, aCAS, lenient);
}
else {
- XmiCasDeserializer.deserialize(fis, aCAS, lenient);
+ XCASDeserializer.deserialize(fis, aCAS, lenient);
}
} catch (SAXException e) {
UIMAFramework.getLogger(FileSystemCollectionReader.class).log(Level.WARNING,