Author: tommaso
Date: Tue Oct  5 12:24:54 2010
New Revision: 1004621

URL: http://svn.apache.org/viewvc?rev=1004621&view=rev
Log:
[UIMA-1863] - added javadoc and logging of results (FINER level) to 
AbstractAlchemyAnnotator, added RAT plugin to POM

Modified:
    uima/sandbox/trunk/AlchemyAPIAnnotator/   (props changed)
    uima/sandbox/trunk/AlchemyAPIAnnotator/pom.xml
    
uima/sandbox/trunk/AlchemyAPIAnnotator/src/main/java/org/apache/uima/alchemy/annotator/AbstractAlchemyAnnotator.java

Propchange: uima/sandbox/trunk/AlchemyAPIAnnotator/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Oct  5 12:24:54 2010
@@ -2,3 +2,4 @@ target
 .settings
 .classpath
 .project
+alchemy-annotator.iml

Modified: uima/sandbox/trunk/AlchemyAPIAnnotator/pom.xml
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/AlchemyAPIAnnotator/pom.xml?rev=1004621&r1=1004620&r2=1004621&view=diff
==============================================================================
--- uima/sandbox/trunk/AlchemyAPIAnnotator/pom.xml (original)
+++ uima/sandbox/trunk/AlchemyAPIAnnotator/pom.xml Tue Oct  5 12:24:54 2010
@@ -90,9 +90,22 @@
   </dependencies>
 
   <build>
+    <finalName>uima-an-alchemy</finalName>
     <plugins>
-
-
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>default-cli</id>
+            <configuration>
+              <excludes>
+                <exclude>release.properties</exclude> <!-- release generated 
artifact -->
+              </excludes>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>javacc-maven-plugin</artifactId>
@@ -110,7 +123,6 @@
           </execution>
         </executions>
       </plugin>
-
     </plugins>
   </build>
 

Modified: 
uima/sandbox/trunk/AlchemyAPIAnnotator/src/main/java/org/apache/uima/alchemy/annotator/AbstractAlchemyAnnotator.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/AlchemyAPIAnnotator/src/main/java/org/apache/uima/alchemy/annotator/AbstractAlchemyAnnotator.java?rev=1004621&r1=1004620&r2=1004621&view=diff
==============================================================================
--- 
uima/sandbox/trunk/AlchemyAPIAnnotator/src/main/java/org/apache/uima/alchemy/annotator/AbstractAlchemyAnnotator.java
 (original)
+++ 
uima/sandbox/trunk/AlchemyAPIAnnotator/src/main/java/org/apache/uima/alchemy/annotator/AbstractAlchemyAnnotator.java
 Tue Oct  5 12:24:54 2010
@@ -40,6 +40,9 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
 
+/**
+ * Base class for annotators which wrap AlchemyAPI web services
+ */
 public abstract class AbstractAlchemyAnnotator extends JCasAnnotator_ImplBase {
 
   private static final String STATUS_OK = "OK";
@@ -121,10 +124,10 @@ public abstract class AbstractAlchemyAnn
         Results results = this.digester.parseAlchemyXML(bufByteIn);
         Validate.notNull(results);
         Validate.notNull(results.getStatus());
-        if (results.getStatus().equalsIgnoreCase(STATUS_OK)) {
-          if (this.getContext().getLogger().isLoggable(Level.FINER))
+        if (this.getContext().getLogger().isLoggable(Level.FINER))
             this.getContext().getLogger().log(Level.FINER, results.toString());
-          mapResultsToTypeSystem(results, aJCas); // annotations from results
+        if (results.getStatus().equalsIgnoreCase(STATUS_OK)) {
+          mapResultsToTypeSystem(results, aJCas);
         } else {
           throw new AlchemyCallFailedException(results.getStatus());
         }


Reply via email to