You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Changes in uimaFIT 2.x

Backwards compatibility

Compatibility with legacy annotation is provided by the #Legacy support module.

Change of Maven group ID

The Maven group ID has changed from org.uimafit to org.apache.uima.

Change of package names to org.apache.uima.fit

The base package has been renamed from org.uimafit to org.apache.uima.fit. A global search/replace on Java files with for lines starting with import org.uimafit and replacing that with import org.apache.uima.fit should work.

Version requirements.

Depends on UIMA 2.4.1.

@ConfigurationParameter

The default value for the mandatory attribute now is true.

The default name of configuration parameters is now the name of the annotated field only. The classname is no longer prefixed. The method ConfigurationParameterFactory.createConfigurationParameterName() that was used to generate the prefixed name has been removed.

META-INF/org.uimafit folder

Now the META-INF/org.uimafit was renamed to META-INF/org.apache.uima.fit.

JCasUtil

The deprecated JCasUtil.iterate() methods have been removed. JCasUtil.select() should be used instead.

AnalysisEngineFactory

All createAggregateXXX and createPrimitiveXXX methods have been renamed to createEngineXXX. The old names are deprecated.

All createAnalysisEngineXXX methods have been renamed to createEngineXXX. The old names are deprecated.

CollectionReaderFactory

All createDescriptionXXX methods have been renamed to createReaderDescriptionXXX. The old names are deprecated.

All createCollectionReaderXXX methods have been renamed to createReaderXXX. The old names are deprecated.

JCasIterable

JCasIterable now only accepts reader and engine descriptions (no instances) and no longer implements the Iterator interface. Instead, new JCasIterator has been added, which replaces JCasIterable in that respect.

CasDumpWriter

CASDumpWriter has been renamed to CasDumpWriter.

Legacy support module

The compatibility layer should allow you to migrate to uimaFIT 2.0.0 without breaking anything. You should then be able to gradually change the codebase to be compatible with uimaFIT 2.0.0. As far as my tests go, uimaFIT 1.x and 2.0.0 can coexist peacefully on the classpath (and indeed both need to be on the classpath in order to use the legacy support module).

To enable the legacy support, make sure that you have a dependency on uimaFIT 1.x and then just add a dependency on

<dependency>
  <groupId>org.apache.uima</groupId>
  <artifactId>uimafit-legacy-support</artifactId>
  <version>2.0.0-SNAPSHOT</version>
</dependency>

uimaFIT 2.x automatically detects the presence of the legacy module and uses it - no additional configuration is necessary.

  • No labels