You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2015/12/24 16:14:13 UTC
svn commit: r1721634 -
/uima/uimafit/trunk/uimafit-docbook/src/docbook/tools.uimafit.migration.xml
Author: rec
Date: Thu Dec 24 15:14:13 2015
New Revision: 1721634
URL: http://svn.apache.org/viewvc?rev=1721634&view=rev
Log:
[UIMA-3317] shell commands to ease the migration to uimaFIT version 2
Modified:
uima/uimafit/trunk/uimafit-docbook/src/docbook/tools.uimafit.migration.xml
Modified: uima/uimafit/trunk/uimafit-docbook/src/docbook/tools.uimafit.migration.xml
URL: http://svn.apache.org/viewvc/uima/uimafit/trunk/uimafit-docbook/src/docbook/tools.uimafit.migration.xml?rev=1721634&r1=1721633&r2=1721634&view=diff
==============================================================================
--- uima/uimafit/trunk/uimafit-docbook/src/docbook/tools.uimafit.migration.xml (original)
+++ uima/uimafit/trunk/uimafit-docbook/src/docbook/tools.uimafit.migration.xml Thu Dec 24 15:14:13 2015
@@ -142,5 +142,45 @@
</dependency></programlisting>
<para>uimaFIT <?eval ${project.version}?> automatically detects the presence of the legacy module and uses it - no
additional configuration is necessary.</para>
+ <para>The following bash script may help to partially automatize the source code migration process.
+ Please observe that it does not cover all of the necessary changes!</para>
+ <note>
+ <para>The script recursively changes all files under the current working directory! Make
+ sure you are in the right directory before running it! <emphasis>Use the script at your own
+ risk!</emphasis></para>
+ </note>
+ <programlisting>#!/bin/sh
+
+############################################
+# MAKE SURE TO BACKUP YOUR FILES FIRST!
+# SCRIPT RECURSIVELY CHANGES ALL JAVA FILES!
+# USE AT YOUR OWN RISK!
+############################################
+
+# Change of package names
+find . -name '*.java' -print |
+xargs perl -p -i -e 's/org.uimafit/org.apache.uima.fit/g'
+
+find . -name '*.java' -print |
+xargs perl -p -i -e 's/org.uimafit.component.xwriter.CASDumpWriter/\
+org.apache.uima.fit.component.CasDumpWriter/g'
+
+# AnalysisEngineFactory
+find . -name '*.java' -print |
+xargs perl -p -i -e 's/createAggregate/createEngine/g'
+
+find . -name '*.java' -print |
+xargs perl -p -i -e 's/createPrimitive/createEngine/g'
+
+find . -name '*.java' -print |
+xargs perl -p -i -e 's/createAnalysisEngine/createEngine/g'
+
+# Readers
+find . -name '*.java' -print |
+xargs perl -p -i -e 's/createDescription/createReaderDescription/g'
+
+find . -name '*.java' -print |
+xargs perl -p -i -e 's/createCollectionReader/createReader/g'
+</programlisting>
</section>
</chapter>