Author: rwesten
Date: Wed Jun  6 11:01:22 2012
New Revision: 1346822

URL: http://svn.apache.org/viewvc?rev=1346822&view=rev
Log:
STANBOL-583: implemented license key handling as described by 
http://markmail.org/message/pzbtwv3ujek7pipz; activated the CELI engines in the 
Enhancer Bundlelist

Modified:
    incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml
    
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/CeliConstants.java
    
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/classification/impl/CeliClassificationEnhancementEngine.java
    
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/langid/impl/CeliLanguageIdentifierEnhancementEngine.java
    
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/lemmatizer/impl/CeliLemmatizerEnhancementEngine.java
    
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/ner/impl/CeliNamedEntityExtractionEnhancementEngine.java
    
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/utils/Utils.java
    
incubator/stanbol/trunk/enhancer/engines/celi/src/main/resources/OSGI-INF/metatype/metatype.properties
    
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/classification/impl/CeliClassificationEnhancementEngineTest.java
    
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/langid/impl/CeliLanguageIdentifierEnhancementEngineTest.java
    
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/lemmatizer/impl/CeliLemmatizerEnhancementEngineTest.java
    
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/ner/impl/CeliNamedEntityExtractionEnhancementEngineTest.java

Modified: incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml 
(original)
+++ incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml Wed 
Jun  6 11:01:22 2012
@@ -177,14 +177,12 @@
       <artifactId>org.apache.stanbol.enhancer.engines.geonames</artifactId>
       <version>0.10.0-incubating-SNAPSHOT</version>
     </bundle>
-    <!-- http://linguagrid.org/ -->
-    <!-- STANBOL-583: Deactivated until a decision if the linguagrid.org
-            Engines should be activated if no license is available
-    <bundle>  
+    
+    <bundle> <!-- http://linguagrid.org/ -->
       <groupId>org.apache.stanbol</groupId>
          <artifactId>org.apache.stanbol.enhancer.engines.celi</artifactId>
       <version>0.10.0-incubating-SNAPSHOT</version>
-    </bundle>  -->
+    </bundle>
   </startLevel>
   
   <!-- Default Configuration for the Stanbol Enhancer -->

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/CeliConstants.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/CeliConstants.java?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/CeliConstants.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/CeliConstants.java
 Wed Jun  6 11:01:22 2012
@@ -23,7 +23,7 @@ public interface CeliConstants {
     
     /**
      * Property used to provide the license key for the CELI service to all the
-     * CELI engines.<p>
+     * CELI engines. Keys need to be configured in the form 
'{user-name}:{password}'<p>
      * License keys are read from:<ol>
      * <li> {@link ComponentContext#getProperties()} - engine configuration: 
      * This can be used to configure a specific keys for single Engine
@@ -39,5 +39,18 @@ public interface CeliConstants {
      * </ul>
      */
     String CELI_LICENSE = "celi.license";
+    /**
+     * If this property is present and set to "true" engines will allow to use
+     * the test account. This allows to test the CELI engines without 
requesting
+     * an account on <a href="http://www.linguagrid.org";>linguagrid.org</a><p>
+     * NOTES: <ul>
+     * <li> This can be parsed as configuration for a specific CELI engine, as
+     * OSGI framework property or System property. If a {@link #CELI_LICENSE} 
is
+     * present this property will be ignored.
+     * <li> The test account does not require to configure a {@link 
#CELI_LICENSE}
+     * <li>Requests are limited to 100 requests per day and IP address.
+     * </ul>
+     */
+    String CELI_TEST_ACCOUNT = "celi.testaccount";
 
 }

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/classification/impl/CeliClassificationEnhancementEngine.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/classification/impl/CeliClassificationEnhancementEngine.java?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/classification/impl/CeliClassificationEnhancementEngine.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/classification/impl/CeliClassificationEnhancementEngine.java
 Wed Jun  6 11:01:22 2012
@@ -48,10 +48,12 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.felix.scr.annotations.Properties;
 import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.PropertyUnbounded;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.stanbol.commons.stanboltools.offline.OnlineMode;
 import org.apache.stanbol.enhancer.engines.celi.CeliConstants;
+import org.apache.stanbol.enhancer.engines.celi.utils.Utils;
 import org.apache.stanbol.enhancer.servicesapi.Blob;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
 import org.apache.stanbol.enhancer.servicesapi.EngineException;
@@ -71,7 +73,8 @@ import org.slf4j.LoggerFactory;
 @Service
 @Properties(value = { 
     @Property(name = EnhancementEngine.PROPERTY_NAME, value = 
"celiClassification"),
-    @Property(name = CeliConstants.CELI_LICENSE)
+    @Property(name = CeliConstants.CELI_LICENSE),
+    @Property(name = CeliConstants.CELI_TEST_ACCOUNT,boolValue=false)
 })
 public class CeliClassificationEnhancementEngine extends 
AbstractEnhancementEngine<IOException, RuntimeException> implements 
EnhancementEngine, ServiceProperties {
        
@@ -146,13 +149,7 @@ public class CeliClassificationEnhanceme
                super.activate(ctx);
                @SuppressWarnings("unchecked")
         Dictionary<String, Object> properties = ctx.getProperties();
-               this.licenseKey = (String) 
properties.get(CeliConstants.CELI_LICENSE);
-               if(licenseKey == null || licenseKey.isEmpty()){
-                   this.licenseKey = 
ctx.getBundleContext().getProperty(CeliConstants.CELI_LICENSE);
-               }
-               if (licenseKey == null || licenseKey.isEmpty()) {
-                       log.warn("no CELI license key configured for this 
Engine, a guest account will be used (max 100 requests per day). Go on 
http://linguagrid.org for getting a proper license key.");
-               }
+        this.licenseKey = 
Utils.getLicenseKey(properties,ctx.getBundleContext());
                String url = (String) properties.get(SERVICE_URL);
                if (url == null || url.isEmpty()) {
                        throw new ConfigurationException(SERVICE_URL, 
String.format("%s : please configure the URL of the CELI Web Service (e.g. by" 
+ "using the 'Configuration' tab of the Apache Felix Web Console).", 
getClass().getSimpleName()));

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/langid/impl/CeliLanguageIdentifierEnhancementEngine.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/langid/impl/CeliLanguageIdentifierEnhancementEngine.java?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/langid/impl/CeliLanguageIdentifierEnhancementEngine.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/langid/impl/CeliLanguageIdentifierEnhancementEngine.java
 Wed Jun  6 11:01:22 2012
@@ -47,6 +47,7 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.stanbol.commons.stanboltools.offline.OnlineMode;
 import org.apache.stanbol.enhancer.engines.celi.CeliConstants;
+import org.apache.stanbol.enhancer.engines.celi.utils.Utils;
 import org.apache.stanbol.enhancer.servicesapi.Blob;
 import org.apache.stanbol.enhancer.servicesapi.Chain;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
@@ -67,7 +68,8 @@ import org.slf4j.LoggerFactory;
 @Service
 @Properties(value = { 
     @Property(name = EnhancementEngine.PROPERTY_NAME, value = "celiLangid"),
-    @Property(name = CeliConstants.CELI_LICENSE)
+    @Property(name = CeliConstants.CELI_LICENSE),
+    @Property(name = CeliConstants.CELI_TEST_ACCOUNT,boolValue=false)
 })
 public class CeliLanguageIdentifierEnhancementEngine extends 
AbstractEnhancementEngine<IOException, RuntimeException> implements 
EnhancementEngine, ServiceProperties {
        /**
@@ -118,13 +120,7 @@ public class CeliLanguageIdentifierEnhan
        public void activate(ComponentContext ctx) throws IOException, 
ConfigurationException {
                super.activate(ctx);
                Dictionary<String, Object> properties = ctx.getProperties();
-               this.licenseKey = (String) 
properties.get(CeliConstants.CELI_LICENSE);
-        if (licenseKey == null || licenseKey.isEmpty()) {
-            this.licenseKey = 
ctx.getBundleContext().getProperty(CeliConstants.CELI_LICENSE);
-        }
-               if (licenseKey == null || licenseKey.isEmpty()) {
-                       log.warn("no CELI license key configured for this 
Engine, a guest account will be used (max 100 requests per day). Go on 
http://linguagrid.org for getting a proper license key.");
-               }
+        this.licenseKey = 
Utils.getLicenseKey(properties,ctx.getBundleContext());
                String url = (String) properties.get(SERVICE_URL);
                if (url == null || url.isEmpty()) {
                        throw new ConfigurationException(SERVICE_URL, 

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/lemmatizer/impl/CeliLemmatizerEnhancementEngine.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/lemmatizer/impl/CeliLemmatizerEnhancementEngine.java?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/lemmatizer/impl/CeliLemmatizerEnhancementEngine.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/lemmatizer/impl/CeliLemmatizerEnhancementEngine.java
 Wed Jun  6 11:01:22 2012
@@ -50,6 +50,7 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.stanbol.commons.stanboltools.offline.OnlineMode;
 import org.apache.stanbol.enhancer.engines.celi.CeliConstants;
+import org.apache.stanbol.enhancer.engines.celi.utils.Utils;
 import org.apache.stanbol.enhancer.servicesapi.Blob;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
 import org.apache.stanbol.enhancer.servicesapi.EngineException;
@@ -68,7 +69,8 @@ import org.slf4j.LoggerFactory;
 @Service
 @Properties(value = { 
     @Property(name = EnhancementEngine.PROPERTY_NAME, value = 
"celiLemmatizer"),
-    @Property(name = CeliConstants.CELI_LICENSE)
+    @Property(name = CeliConstants.CELI_LICENSE),
+    @Property(name = CeliConstants.CELI_TEST_ACCOUNT,boolValue=false)
 })
 public class CeliLemmatizerEnhancementEngine extends 
AbstractEnhancementEngine<IOException, RuntimeException> implements 
EnhancementEngine, ServiceProperties {
        
@@ -133,13 +135,7 @@ public class CeliLemmatizerEnhancementEn
        protected void activate(ComponentContext ctx) throws IOException, 
ConfigurationException {
                super.activate(ctx);
                Dictionary<String, Object> properties = ctx.getProperties();
-        this.licenseKey = (String) properties.get(CeliConstants.CELI_LICENSE);
-        if (licenseKey == null || licenseKey.isEmpty()) {
-            this.licenseKey = 
ctx.getBundleContext().getProperty(CeliConstants.CELI_LICENSE);
-        }
-               if (licenseKey == null || licenseKey.isEmpty()) {
-                       log.warn("no CELI license key configured for this 
Engine, a guest account will be used (max 100 requests per day). Go on 
http://linguagrid.org for getting a proper license key.");
-               }
+        this.licenseKey = 
Utils.getLicenseKey(properties,ctx.getBundleContext());
                String url = (String) properties.get(SERVICE_URL);
                if (url == null || url.isEmpty()) {
                        throw new ConfigurationException(SERVICE_URL, 
String.format("%s : please configure the URL of the CELI Web Service (e.g. by" 
+ "using the 'Configuration' tab of the Apache Felix Web Console).", 
getClass().getSimpleName()));

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/ner/impl/CeliNamedEntityExtractionEnhancementEngine.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/ner/impl/CeliNamedEntityExtractionEnhancementEngine.java?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/ner/impl/CeliNamedEntityExtractionEnhancementEngine.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/ner/impl/CeliNamedEntityExtractionEnhancementEngine.java
 Wed Jun  6 11:01:22 2012
@@ -56,6 +56,7 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.stanbol.commons.stanboltools.offline.OnlineMode;
 import org.apache.stanbol.enhancer.engines.celi.CeliConstants;
+import org.apache.stanbol.enhancer.engines.celi.utils.Utils;
 import org.apache.stanbol.enhancer.servicesapi.Blob;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
 import org.apache.stanbol.enhancer.servicesapi.EngineException;
@@ -66,6 +67,7 @@ import org.apache.stanbol.enhancer.servi
 import org.apache.stanbol.enhancer.servicesapi.helper.EnhancementEngineHelper;
 import org.apache.stanbol.enhancer.servicesapi.impl.AbstractEnhancementEngine;
 import org.apache.stanbol.enhancer.servicesapi.rdf.OntologicalClasses;
+import org.osgi.framework.BundleContext;
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
@@ -75,7 +77,8 @@ import org.slf4j.LoggerFactory;
 @Service
 @Properties(value = { 
     @Property(name = EnhancementEngine.PROPERTY_NAME, value = "celiNer"),
-    @Property(name = CeliConstants.CELI_LICENSE)
+    @Property(name = CeliConstants.CELI_LICENSE),
+    @Property(name = CeliConstants.CELI_TEST_ACCOUNT,boolValue=false)
 })
 public class CeliNamedEntityExtractionEnhancementEngine extends 
AbstractEnhancementEngine<IOException, RuntimeException> implements 
EnhancementEngine, ServiceProperties {
        
@@ -114,7 +117,7 @@ public class CeliNamedEntityExtractionEn
         */
        public static final Integer defaultOrder = ORDERING_CONTENT_EXTRACTION;
 
-       private Logger log = LoggerFactory.getLogger(getClass());
+       private static final Logger log = 
LoggerFactory.getLogger(CeliNamedEntityExtractionEnhancementEngine.class);
 
        /**
         * This contains the only MIME type directly supported by this 
enhancement
@@ -147,13 +150,7 @@ public class CeliNamedEntityExtractionEn
         Dictionary<String, Object> properties = ctx.getProperties();
         log.info("Activate CELI NER engine:");
         log.info(" > name: {}",getName());
-        this.licenseKey = (String) properties.get(CeliConstants.CELI_LICENSE);
-        if (licenseKey == null || licenseKey.isEmpty()) {
-            this.licenseKey = 
ctx.getBundleContext().getProperty(CeliConstants.CELI_LICENSE);
-        }
-               if (licenseKey == null || licenseKey.isEmpty()) {
-                       log.warn("no CELI license key configured for this 
Engine, a guest account will be used (max 100 requests per day). Go on 
http://linguagrid.org for getting a proper license key.");
-               }
+        this.licenseKey = 
Utils.getLicenseKey(properties,ctx.getBundleContext());
                String url = (String) properties.get(SERVICE_URL);
                if (url == null || url.isEmpty()) {
                        throw new ConfigurationException(SERVICE_URL, 
String.format("%s : please configure the URL of the CELI Web Service (e.g. by" 
+ "using the 'Configuration' tab of the Apache Felix Web Console).", 
getClass().getSimpleName()));

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/utils/Utils.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/utils/Utils.java?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/utils/Utils.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/utils/Utils.java
 Wed Jun  6 11:01:22 2012
@@ -19,11 +19,20 @@ package org.apache.stanbol.enhancer.engi
 import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.net.URL;
+import java.util.Dictionary;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import org.apache.stanbol.enhancer.engines.celi.CeliConstants;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.cm.ConfigurationException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public final class Utils {
     
+    private static final Logger log = LoggerFactory.getLogger(Utils.class);
+    
     private Utils(){}
     
     /**
@@ -86,5 +95,39 @@ public final class Utils {
         }
         return urlConn;
     }
-
+    /**
+     * Parses the {@link CeliConstants#CELI_LICENSE} form the configuration and
+     * the Environment. Also checks for {@link CeliConstants#CELI_TEST_ACCOUNT}
+     * if no license key is configured.
+     * @param configuration the configuration of the CELI engine
+     * @param ctx the {@link BundleContext} used to read the configuration of
+     * the environment.
+     * @return The license key or <code>null</code> if no license key is 
configured
+     * but <code>{@link CeliConstants#CELI_TEST_ACCOUNT}=true</code>.
+     * @throws ConfigurationException if no {@link CeliConstants#CELI_LICENSE} 
+     * is configured and {@link CeliConstants#CELI_TEST_ACCOUNT} is not present
+     * or not set to <code>true</code>.
+     */
+    public static String getLicenseKey(Dictionary<String,Object> 
configuration,BundleContext ctx) throws ConfigurationException {
+        String licenseKey = (String) 
configuration.get(CeliConstants.CELI_LICENSE);
+        if (licenseKey == null || licenseKey.isEmpty()) {
+            licenseKey = ctx.getProperty(CeliConstants.CELI_LICENSE);
+        }
+        if (licenseKey == null || licenseKey.isEmpty()) {
+            Object value = configuration.get(CeliConstants.CELI_TEST_ACCOUNT);
+            if(value == null){
+                value = ctx.getProperty(CeliConstants.CELI_TEST_ACCOUNT);
+            }
+            if(value == null || !Boolean.parseBoolean(value.toString())){
+                throw new ConfigurationException(CeliConstants.CELI_LICENSE,
+                    "The CELI License Key is a required configuration. To test 
the "
+                    + "CELI engines you can also activate the test account by 
setting '"
+                    + CeliConstants.CELI_TEST_ACCOUNT+"=true'. This account is 
limited "
+                    +"to 100 requests pre day and IP address.");
+            } else {
+                log.warn("no CELI license key configured for this Engine, a 
guest account will be used (max 100 requests per day). Go on 
http://linguagrid.org for getting a proper license key.");
+            }
+        }
+        return licenseKey;
+    }
 }

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/resources/OSGI-INF/metatype/metatype.properties
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/main/resources/OSGI-INF/metatype/metatype.properties
 Wed Jun  6 11:01:22 2012
@@ -39,38 +39,62 @@ celi.license.description=The "{user}:{pa
 This can be also set as OSGI framework or system property. An engine \
 specific configuration will override a framework/system wide configuration.
 
+celi.testaccount.name=Enable Test Account
+celi.testaccount.description=If enabled it allows to test the CELI Engines 
without \
+an License Key. Requests are limited to 100 per day and IP address.
+
 #NER
 
-org.apache.stanbol.enhancer.engines.celi.ner.impl.CeliNamedEntityExtractionEnhancementEngine.name=Apache
 Stanbol Enhancer Engine: CELI Named Entity Recognizer
-org.apache.stanbol.enhancer.engines.celi.ner.impl.CeliNamedEntityExtractionEnhancementEngine.description=An
 Enhancement Engine that sends ContentItems to CELI Named Entity Recognizer Web 
Service and converts the results to the Stanbol Enhancement Structure
+org.apache.stanbol.enhancer.engines.celi.ner.impl.CeliNamedEntityExtractionEnhancementEngine.name=Apache
 \
+Stanbol Enhancer Engine: CELI Named Entity Recognizer
+org.apache.stanbol.enhancer.engines.celi.ner.impl.CeliNamedEntityExtractionEnhancementEngine.description=An
 \
+Enhancement Engine that sends ContentItems to CELI Named Entity Recognizer \
+Web Service and converts the results to the Stanbol Enhancement Structure
 
 org.apache.stanbol.enhancer.engines.celi.ner.url.name=Service URL
-org.apache.stanbol.enhancer.engines.celi.ner.url.description=The URL of the 
CELI Named Entity Recognizer Web Service
+org.apache.stanbol.enhancer.engines.celi.ner.url.description=The URL of the 
CELI \
+Named Entity Recognizer Web Service
 
 org.apache.stanbol.enhancer.engines.celi.ner.languages.name=Supported languages
-org.apache.stanbol.enhancer.engines.celi.ner.languages.description=The 
language(s) supported by the configured Named Entity Recognizer Web Service
+org.apache.stanbol.enhancer.engines.celi.ner.languages.description=The 
language(s) \
+supported by the configured Named Entity Recognizer Web Service
 
 #CLASSIFICATION
-org.apache.stanbol.enhancer.engines.celi.classification.impl.CeliClassificationEnhancementEngine.name=Apache
 Stanbol Enhancer Engine: CELI Document Classification
-org.apache.stanbol.enhancer.engines.celi.classification.impl.CeliClassificationEnhancementEngine.description=An
 Enhancement Engine that sends ContentItems to CELI Document Classification Web 
Service and converts the results to the Stanbol Enhancement Structure
+org.apache.stanbol.enhancer.engines.celi.classification.impl.CeliClassificationEnhancementEngine.name=Apache
 \
+Stanbol Enhancer Engine: CELI Document Classification
+org.apache.stanbol.enhancer.engines.celi.classification.impl.CeliClassificationEnhancementEngine.description=An
 \
+Enhancement Engine that sends ContentItems to CELI Document Classification Web 
\
+Service and converts the results to the Stanbol Enhancement Structure
 
 org.apache.stanbol.enhancer.engines.celi.classification.url.name=Service URL
-org.apache.stanbol.enhancer.engines.celi.classification.url.description=The 
URL of the CELI Document Classification Web Service
+org.apache.stanbol.enhancer.engines.celi.classification.url.description=The \
+URL of the CELI Document Classification Web Service
 
 
 #LID
-org.apache.stanbol.enhancer.engines.celi.langid.impl.CeliLanguageIdentifierEnhancementEngine.name=Apache
 Stanbol Enhancer Engine: CELI Language Identifier
-org.apache.stanbol.enhancer.engines.celi.langid.impl.CeliLanguageIdentifierEnhancementEngine.description=An
 Enhancement Engine that sends ContentItems to Language Identifier Web Service 
and converts the results to the Stanbol Enhancement Structure
+org.apache.stanbol.enhancer.engines.celi.langid.impl.CeliLanguageIdentifierEnhancementEngine.name=Apache
 \
+Stanbol Enhancer Engine: CELI Language Identifier
+org.apache.stanbol.enhancer.engines.celi.langid.impl.CeliLanguageIdentifierEnhancementEngine.description=An
 \
+Enhancement Engine that sends ContentItems to Language Identifier Web Service \
+and converts the results to the Stanbol Enhancement Structure
 
 org.apache.stanbol.enhancer.engines.celi.langid.url.name=Service URL
-org.apache.stanbol.enhancer.engines.celi.langid.url.description=The URL of the 
CELI Language Identifier Web Service
+org.apache.stanbol.enhancer.engines.celi.langid.url.description=The URL of the 
\
+CELI Language Identifier Web Service
 
 #LEMM
-org.apache.stanbol.enhancer.engines.celi.lemmatizer.impl.CeliLemmatizerEnhancementEngine.name=Apache
 Stanbol Enhancer Engine: CELI Lemmatizer
-org.apache.stanbol.enhancer.engines.celi.lemmatizer.impl.CeliLemmatizerEnhancementEngine.description=An
 Enhancement Engine that sends ContentItems to OpenCalais and converts the 
results to the Stanbol Enhancement Structure
+org.apache.stanbol.enhancer.engines.celi.lemmatizer.impl.CeliLemmatizerEnhancementEngine.name=Apache
 \
+Stanbol Enhancer Engine: CELI Lemmatizer
+org.apache.stanbol.enhancer.engines.celi.lemmatizer.impl.CeliLemmatizerEnhancementEngine.description=An
 \
+Enhancement Engine that sends ContentItems to OpenCalais and converts the \
+results to the Stanbol Enhancement Structure
 
 org.apache.stanbol.enhancer.engines.celi.lemmatizer.url.name=Service URL
-org.apache.stanbol.enhancer.engines.celi.lemmatizer.url.description=The URL of 
the CELI Lemmatizer Web Service
+org.apache.stanbol.enhancer.engines.celi.lemmatizer.url.description=The URL of 
\
+the CELI Lemmatizer Web Service
 
-org.apache.stanbol.enhancer.engines.celi.lemmatizer.morphoAnalysis.name=Full 
Morphological Analysis
-org.apache.stanbol.enhancer.engines.celi.lemmatizer.morphoAnalysis.description=Boolean
 value that sets the Engine to full morphological analysis working mode (true) 
or to textual contents lemmatization (false)
\ No newline at end of file
+org.apache.stanbol.enhancer.engines.celi.lemmatizer.morphoAnalysis.name=Full \
+Morphological Analysis
+org.apache.stanbol.enhancer.engines.celi.lemmatizer.morphoAnalysis.description=Boolean
 \
+value that sets the Engine to full morphological analysis working mode (true) \
+or to textual contents lemmatization (false)
\ No newline at end of file

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/classification/impl/CeliClassificationEnhancementEngineTest.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/classification/impl/CeliClassificationEnhancementEngineTest.java?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/classification/impl/CeliClassificationEnhancementEngineTest.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/classification/impl/CeliClassificationEnhancementEngineTest.java
 Wed Jun  6 11:01:22 2012
@@ -33,6 +33,7 @@ import org.apache.clerezza.rdf.core.UriR
 import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
 import org.apache.clerezza.rdf.core.impl.TripleImpl;
 import 
org.apache.stanbol.enhancer.contentitem.inmemory.InMemoryContentItemFactory;
+import org.apache.stanbol.enhancer.engines.celi.CeliConstants;
 import org.apache.stanbol.enhancer.engines.celi.testutils.MockComponentContext;
 import org.apache.stanbol.enhancer.engines.celi.testutils.TestUtils;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
@@ -65,6 +66,7 @@ public class CeliClassificationEnhanceme
        public static void setUpServices() throws IOException, 
ConfigurationException {
                Dictionary<String, Object> properties = new Hashtable<String, 
Object>();
                properties.put(EnhancementEngine.PROPERTY_NAME, 
"celiClassification");
+               properties.put(CeliConstants.CELI_TEST_ACCOUNT, "true");
            properties.put(CeliClassificationEnhancementEngine.SERVICE_URL, 
"http://linguagrid.org/LSGrid/ws/dbpedia-classification";);
                
                MockComponentContext context = new 
MockComponentContext(properties);

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/langid/impl/CeliLanguageIdentifierEnhancementEngineTest.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/langid/impl/CeliLanguageIdentifierEnhancementEngineTest.java?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/langid/impl/CeliLanguageIdentifierEnhancementEngineTest.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/langid/impl/CeliLanguageIdentifierEnhancementEngineTest.java
 Wed Jun  6 11:01:22 2012
@@ -30,6 +30,7 @@ import org.apache.clerezza.rdf.core.Lite
 import org.apache.clerezza.rdf.core.Resource;
 import org.apache.clerezza.rdf.core.UriRef;
 import 
org.apache.stanbol.enhancer.contentitem.inmemory.InMemoryContentItemFactory;
+import org.apache.stanbol.enhancer.engines.celi.CeliConstants;
 import org.apache.stanbol.enhancer.engines.celi.testutils.MockComponentContext;
 import org.apache.stanbol.enhancer.engines.celi.testutils.TestUtils;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
@@ -63,6 +64,7 @@ public class CeliLanguageIdentifierEnhan
        public static void setUpServices() throws IOException, 
ConfigurationException {
                Dictionary<String, Object> properties = new Hashtable<String, 
Object>();
                properties.put(EnhancementEngine.PROPERTY_NAME, 
"celiLangIdentifier");
+        properties.put(CeliConstants.CELI_TEST_ACCOUNT, "true");
            properties.put(CeliLanguageIdentifierEnhancementEngine.SERVICE_URL, 
CELI_LANGID_SERVICE_URL);
            
                MockComponentContext context = new 
MockComponentContext(properties);

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/lemmatizer/impl/CeliLemmatizerEnhancementEngineTest.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/lemmatizer/impl/CeliLemmatizerEnhancementEngineTest.java?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/lemmatizer/impl/CeliLemmatizerEnhancementEngineTest.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/lemmatizer/impl/CeliLemmatizerEnhancementEngineTest.java
 Wed Jun  6 11:01:22 2012
@@ -51,6 +51,7 @@ import org.apache.clerezza.rdf.core.impl
 import org.apache.clerezza.rdf.core.impl.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.XSD;
 import 
org.apache.stanbol.enhancer.contentitem.inmemory.InMemoryContentItemFactory;
+import org.apache.stanbol.enhancer.engines.celi.CeliConstants;
 import org.apache.stanbol.enhancer.engines.celi.testutils.MockComponentContext;
 import org.apache.stanbol.enhancer.engines.celi.testutils.TestUtils;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
@@ -77,6 +78,7 @@ public class CeliLemmatizerEnhancementEn
        public CeliLemmatizerEnhancementEngine initEngine(boolean 
completeMorphoAnalysis) throws IOException, ConfigurationException {
                Dictionary<String, Object> properties = new Hashtable<String, 
Object>();
                properties.put(EnhancementEngine.PROPERTY_NAME, 
"celiLemmatizer");
+        properties.put(CeliConstants.CELI_TEST_ACCOUNT, "true");
            properties.put(SERVICE_URL, 
"http://linguagrid.org/LSGrid/ws/morpho-analyser";);
            properties.put(MORPHOLOGICAL_ANALYSIS, completeMorphoAnalysis);
                MockComponentContext context = new 
MockComponentContext(properties);

Modified: 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/ner/impl/CeliNamedEntityExtractionEnhancementEngineTest.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/ner/impl/CeliNamedEntityExtractionEnhancementEngineTest.java?rev=1346822&r1=1346821&r2=1346822&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/ner/impl/CeliNamedEntityExtractionEnhancementEngineTest.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/engines/celi/src/test/java/org/apache/stanbol/enhancer/engines/celi/ner/impl/CeliNamedEntityExtractionEnhancementEngineTest.java
 Wed Jun  6 11:01:22 2012
@@ -31,6 +31,7 @@ import org.apache.clerezza.rdf.core.UriR
 import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
 import org.apache.clerezza.rdf.core.impl.TripleImpl;
 import 
org.apache.stanbol.enhancer.contentitem.inmemory.InMemoryContentItemFactory;
+import org.apache.stanbol.enhancer.engines.celi.CeliConstants;
 import 
org.apache.stanbol.enhancer.engines.celi.classification.impl.CeliClassificationEnhancementEngine;
 import org.apache.stanbol.enhancer.engines.celi.testutils.MockComponentContext;
 import org.apache.stanbol.enhancer.engines.celi.testutils.TestUtils;
@@ -75,6 +76,7 @@ public class CeliNamedEntityExtractionEn
        public static void setUpServices() throws IOException, 
ConfigurationException {
                Dictionary<String, Object> properties = new Hashtable<String, 
Object>();
                properties.put(EnhancementEngine.PROPERTY_NAME, "celiNer");
+        properties.put(CeliConstants.CELI_TEST_ACCOUNT, "true");
            
properties.put(CeliNamedEntityExtractionEnhancementEngine.SERVICE_URL, 
"http://linguagrid.org/LSGrid/ws/com.celi-france.linguagrid.namedentityrecognition.v0u0.demo";);
            
properties.put(CeliNamedEntityExtractionEnhancementEngine.SUPPORTED_LANGUAGES, 
"fr;it");
            MockComponentContext context = new MockComponentContext(properties);


Reply via email to