You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2017/06/01 20:06:32 UTC

svn commit: r1797258 - in /manifoldcf/trunk: ./ connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/ connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/ connectors/tika/...

Author: kwright
Date: Thu Jun  1 20:06:31 2017
New Revision: 1797258

URL: http://svn.apache.org/viewvc?rev=1797258&view=rev
Log:
Fix for CONNECTORS-1428.

Added:
    manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editConfiguration.js
    manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editConfiguration_TikaConfig.html
    manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/viewConfiguration.html
Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaConfig.java
    manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java
    manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaParser.java
    manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_en_US.properties
    manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_es_ES.properties
    manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_ja_JP.properties
    manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_zh_CN.properties

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1797258&r1=1797257&r2=1797258&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Jun  1 20:06:31 2017
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 2.8-dev =====================
 
+CONNECTORS-1428: Add support for configuring Tika extractor.
+(Julien Massiera, Karl Wright)
+
 CONNECTORS-1426: Fix New UI to prevent Bootstrap tab click event.
 (Karl Wright, Kishore Kumar)
 

Modified: manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaConfig.java?rev=1797258&r1=1797257&r2=1797258&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaConfig.java (original)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaConfig.java Thu Jun  1 20:06:31 2017
@@ -19,7 +19,8 @@
 
 package org.apache.manifoldcf.agents.transformation.tika;
 
-/** Parameters for Tika transformation connector.
+/**
+ * Parameters for Tika transformation connector.
  */
 public class TikaConfig {
 
@@ -27,6 +28,7 @@ public class TikaConfig {
   // None
 
   // Specification nodes and values
+  public static final String PARAM_TIKACONFIG = "tikaconfig";
   public static final String NODE_FIELDMAP = "fieldmap";
   public static final String NODE_KEEPMETADATA = "keepAllMetadata";
   public static final String NODE_LOWERNAMES = "lowerNames";
@@ -37,5 +39,5 @@ public class TikaConfig {
   public static final String ATTRIBUTE_SOURCE = "source";
   public static final String ATTRIBUTE_TARGET = "target";
   public static final String ATTRIBUTE_VALUE = "value";
-  
+
 }

Modified: manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java?rev=1797258&r1=1797257&r2=1797258&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java (original)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java Thu Jun  1 20:06:31 2017
@@ -43,10 +43,13 @@ public class TikaExtractor extends org.a
   public static final String _rcsid = "@(#)$Id$";
 
   private static final String EDIT_SPECIFICATION_JS = "editSpecification.js";
+  private static final String EDIT_CONFIGURATION_JS = "editConfiguration.js";
+  private static final String EDIT_CONFIGURATION_TIKACONFIG_HTML = "editConfiguration_TikaConfig.html";
   private static final String EDIT_SPECIFICATION_FIELDMAPPING_HTML = "editSpecification_FieldMapping.html";
   private static final String EDIT_SPECIFICATION_EXCEPTIONS_HTML = "editSpecification_Exceptions.html";
   private static final String EDIT_SPECIFICATION_BOILERPLATE_HTML = "editSpecification_Boilerplate.html";
   private static final String VIEW_SPECIFICATION_HTML = "viewSpecification.html";
+  private static final String VIEW_CONFIGURATION_HTML = "viewConfiguration.html";
 
   protected static final String ACTIVITY_EXTRACT = "extract";
 
@@ -54,6 +57,9 @@ public class TikaExtractor extends org.a
   
   /** We handle up to 64K in memory; after that we go to disk. */
   protected static final long inMemoryMaximumFile = 65536;
+
+  protected String tikaConfig = null;
+  protected TikaParser tikaParser = null;
   
   /** Return a list of activities that this connector generates.
   * The connector does NOT need to be connected before this method is called.
@@ -155,6 +161,8 @@ public class TikaExtractor extends org.a
   public int addOrReplaceDocumentWithException(String documentURI, VersionContext pipelineDescription, RepositoryDocument document, String authorityNameString, IOutputAddActivity activities)
     throws ManifoldCFException, ServiceInterruption, IOException
   {
+    initializeTikaParser();
+
     // First, make sure downstream pipeline will now accept text/plain;charset=utf-8
     if (!activities.checkMimeTypeIndexable("text/plain;charset=utf-8"))
     {
@@ -219,12 +227,12 @@ public class TikaExtractor extends org.a
           try
           {
             // Use tika to parse stuff
-            ContentHandler handler = TikaParser.newWriteOutBodyContentHandler(w, sp.writeLimit());
+            ContentHandler handler = tikaParser.newWriteOutBodyContentHandler(w, sp.writeLimit());
             if (extractorClassInstance != null)
               handler = new BoilerpipeContentHandler(handler, extractorClassInstance);
             try
             {
-              TikaParser.parse(document.getBinaryStream(), metadata, handler);
+              tikaParser.parse(document.getBinaryStream(), metadata, handler);
             }
             catch (TikaException e)
             {
@@ -362,6 +370,119 @@ public class TikaExtractor extends org.a
   {
     return "s"+connectionSequenceNumber+"_checkSpecificationForSave";
   }
+  
+  
+
+  /** Output the configuration header section.
+   * This method is called in the head section of the connector's configuration page.  Its purpose is to add the required tabs to the list, and to output any
+   * javascript methods that might be needed by the configuration editing HTML.
+   *@param threadContext is the local thread context.
+   *@param out is the output to which any HTML should be sent.
+   *@param parameters are the configuration parameters, as they currently exist, for this connection being configured.
+   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
+   */
+  @Override
+  public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, Locale locale,
+      ConfigParams parameters, List<String> tabsArray) throws ManifoldCFException, IOException {
+    tabsArray.add(Messages.getString(locale, "TikaExtractor.TikaConfigTabName"));
+
+    final Map<String,Object> paramMap = new HashMap<String,Object>();
+    fillInTikaConfigTab(paramMap, out, parameters);
+    Messages.outputResourceWithVelocity(out, locale, EDIT_CONFIGURATION_JS, paramMap);  
+  }
+
+  /** Output the configuration body section.
+   * This method is called in the body section of the connector's configuration page.  Its purpose is to present the required form elements for editing.
+   * The coder can presume that the HTML that is output from this configuration will be within appropriate <html>, <body>, and <form> tags.  The name of the
+   * form is "editconnection".
+   *@param threadContext is the local thread context.
+   *@param out is the output to which any HTML should be sent.
+   *@param parameters are the configuration parameters, as they currently exist, for this connection being configured.
+   *@param tabName is the current tab name.
+   */
+  @Override
+  public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, Locale locale,
+      ConfigParams parameters, String tabName) throws ManifoldCFException, IOException {
+    final Map<String,Object> paramMap = new HashMap<String,Object>();
+    paramMap.put("TABNAME",tabName);
+    fillInTikaConfigTab(paramMap, out, parameters);
+    Messages.outputResourceWithVelocity(out, locale, EDIT_CONFIGURATION_TIKACONFIG_HTML, paramMap);    
+  }
+  
+  
+  /**
+   * Process a configuration post. This method is called at the start of the
+   * authority connector's configuration page, whenever there is a possibility
+   * that form data for a connection has been posted. Its purpose is to gather
+   * form information and modify the configuration parameters accordingly. The
+   * name of the posted form is "editconnection".
+   *
+   * @param threadContext is the local thread context.
+   * @param variableContext is the set of variables available from the post,
+   * including binary file post information.
+   * @param parameters are the configuration parameters, as they currently
+   * exist, for this connection being configured.
+   * @return null if all is well, or a string error message if there is an error
+   * that should prevent saving of the connection (and cause a redirection to an
+   * error page).
+   */
+  @Override
+  public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, Locale locale,
+      ConfigParams parameters) throws ManifoldCFException {
+    
+    String tikaConfigValue = "";
+    if (variableContext.getParameter(TikaConfig.PARAM_TIKACONFIG) != null)
+    {
+      tikaConfigValue = variableContext.getParameter(TikaConfig.PARAM_TIKACONFIG);
+    }
+    parameters.setParameter(TikaConfig.PARAM_TIKACONFIG, tikaConfigValue);
+    
+    return null;
+  }
+  
+  /**
+   * Connect. The configuration parameters are included.
+   *
+   * @param configParams are the configuration parameters for this connection.
+   */
+  @Override
+  public void connect(ConfigParams configParams) {
+    super.connect(configParams);
+    tikaConfig = configParams.getParameter(TikaConfig.PARAM_TIKACONFIG);
+  }
+
+  @Override
+  public void disconnect() throws ManifoldCFException {
+    super.disconnect();
+    tikaConfig = null;
+    tikaParser = null;
+  }
+
+  protected void initializeTikaParser() throws ManifoldCFException {
+    if (tikaParser == null) {
+      tikaParser = new TikaParser(tikaConfig);
+    }
+  }
+  
+  /**
+   * View configuration. This method is called in the body section of the
+   * authority connector's view configuration page. Its purpose is to present
+   * the connection information to the user. The coder can presume that the HTML
+   * that is output from this configuration will be within appropriate <html>
+   * and <body> tags.
+   *
+   * @param threadContext is the local thread context.
+   * @param out is the output to which any HTML should be sent.
+   * @param parameters are the configuration parameters, as they currently
+   * exist, for this connection being configured.
+   */
+  @Override
+  public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters)
+      throws ManifoldCFException, IOException {
+    final Map<String,Object> paramMap = new HashMap<String,Object>();
+    fillInTikaConfigTab(paramMap, out, parameters);
+    Messages.outputResourceWithVelocity(out, locale, VIEW_CONFIGURATION_HTML, paramMap);
+  }
 
   /** Output the specification header section.
   * This method is called in the head section of a job page which has selected a pipeline connection of the current type.  Its purpose is to add the required tabs
@@ -441,9 +562,7 @@ public class TikaExtractor extends org.a
     throws ManifoldCFException {
     String seqPrefix = "s"+connectionSequenceNumber+"_";
 
-    String x;
-        
-    x = variableContext.getParameter(seqPrefix+"fieldmapping_count");
+    String x = variableContext.getParameter(seqPrefix+"fieldmapping_count");
     if (x != null && x.length() > 0)
     {
       // About to gather the fieldmapping nodes, so get rid of the old ones.
@@ -603,6 +722,16 @@ public class TikaExtractor extends org.a
     Messages.outputResourceWithVelocity(out,locale,VIEW_SPECIFICATION_HTML,paramMap);
     
   }
+  
+  protected static void fillInTikaConfigTab(Map<String,Object> velocityContext, IHTTPOutput out, ConfigParams parameters)
+  {
+    String tikaConfigValue = parameters.getParameter(TikaConfig.PARAM_TIKACONFIG);
+    if(tikaConfigValue == null) {
+      tikaConfigValue = "";
+    }
+    velocityContext.put("TIKACONFIG", tikaConfigValue); 
+    
+  }
 
   protected static void fillInFieldMappingSpecificationMap(Map<String,Object> paramMap, Specification os)
   {
@@ -949,7 +1078,7 @@ public class TikaExtractor extends org.a
       
       return sb.toString();
     }
-    
+
     public String getMapping(String source) {
       return sourceTargets.get(source);
     }

Modified: manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaParser.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaParser.java?rev=1797258&r1=1797257&r2=1797258&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaParser.java (original)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaParser.java Thu Jun  1 20:06:31 2017
@@ -16,32 +16,58 @@
 */
 package org.apache.manifoldcf.agents.transformation.tika;
 
+import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Writer;
+import java.util.Map;
 
+import org.apache.tika.config.TikaConfig;
 import org.apache.tika.exception.TikaException;
 import org.apache.tika.metadata.Metadata;
+import org.apache.tika.mime.MediaType;
 import org.apache.tika.parser.AutoDetectParser;
 import org.apache.tika.parser.ParseContext;
 import org.apache.tika.parser.Parser;
+import org.apache.tika.parser.html.HtmlParser;
 import org.apache.tika.sax.BodyContentHandler;
 import org.apache.tika.sax.WriteOutContentHandler;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 
+import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
+
 public class TikaParser {
 
-  private static Parser parser = new AutoDetectParser();
+  private final Parser parser;
 
-  private TikaParser() { }
+  public TikaParser(final String tikaConfig)
+    throws ManifoldCFException {
+    if (tikaConfig == null || tikaConfig.length() == 0) {
+      parser = new AutoDetectParser();
+    } else {
+      final InputStream is = new ByteArrayInputStream(tikaConfig.getBytes());
+      try {
+        final TikaConfig conf = new TikaConfig(is);
+        parser = new AutoDetectParser(conf);
+      } catch (TikaException | IOException | SAXException e) {
+        throw new ManifoldCFException(e.getMessage(), e);
+      }
+    }
+  }
+  
+  /*
+      Map<MediaType, Parser> parsers = ((AutoDetectParser) parser).getParsers();
+      parsers.put(MediaType.APPLICATION_XML, new HtmlParser());
+      ((AutoDetectParser) parser).setParsers(parsers);
+  */
 
   public static ContentHandler newWriteOutBodyContentHandler(Writer w, int writeLimit) {
-    ContentHandler writeOutContentHandler = new WriteOutContentHandler(w, writeLimit);
+    final ContentHandler writeOutContentHandler = new WriteOutContentHandler(w, writeLimit);
     return new BodyContentHandler(writeOutContentHandler);
   }
 
-  public static void parse(InputStream stream, Metadata metadata, ContentHandler handler)
+  public void parse(InputStream stream, Metadata metadata, ContentHandler handler)
     throws IOException, SAXException, TikaException {
     ParseContext context = new ParseContext();
     context.set(Parser.class, parser);

Modified: manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_en_US.properties?rev=1797258&r1=1797257&r2=1797258&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_en_US.properties (original)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_en_US.properties Thu Jun  1 20:06:31 2017
@@ -13,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+TikaExtractor.TikaConfigTabName=Tika Config
+TikaExtractor.TikaConfig=Tika config
 TikaExtractor.FieldMappingTabName=Field mapping
 TikaExtractor.ExceptionsTabName=Exceptions
 TikaExtractor.BoilerplateTabName=Boilerplate

Modified: manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_es_ES.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_es_ES.properties?rev=1797258&r1=1797257&r2=1797258&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_es_ES.properties (original)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_es_ES.properties Thu Jun  1 20:06:31 2017
@@ -13,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+TikaExtractor.TikaConfigTabName=Tika Config
+TikaExtractor.TikaConfig=Tika config
 TikaExtractor.FieldMappingTabName=Trazar un mapa de campaña
 TikaExtractor.ExceptionsTabName=excepciones
 TikaExtractor.BoilerplateTabName=repetitivo

Modified: manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_ja_JP.properties?rev=1797258&r1=1797257&r2=1797258&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_ja_JP.properties (original)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_ja_JP.properties Thu Jun  1 20:06:31 2017
@@ -13,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+TikaExtractor.TikaConfigTabName=Tika Config
+TikaExtractor.TikaConfig=Tika config
 TikaExtractor.FieldMappingTabName=フィールドマッピング
 TikaExtractor.ExceptionsTabName=例外
 TikaExtractor.BoilerplateTabName=Boilerplate

Modified: manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_zh_CN.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_zh_CN.properties?rev=1797258&r1=1797257&r2=1797258&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_zh_CN.properties (original)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/tika/common_zh_CN.properties Thu Jun  1 20:06:31 2017
@@ -13,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+TikaExtractor.TikaConfigTabName=Tika Config
+TikaExtractor.TikaConfig=Tika config
 TikaExtractor.FieldMappingTabName=字段映射
 TikaExtractor.ExceptionsTabName=异常
 TikaExtractor.BoilerplateTabName=Boilerplate

Added: manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editConfiguration.js
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editConfiguration.js?rev=1797258&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editConfiguration.js (added)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editConfiguration.js Thu Jun  1 20:06:31 2017
@@ -0,0 +1,23 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<script type="text/javascript">
+<!--
+
+
+//-->
+</script>

Added: manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editConfiguration_TikaConfig.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editConfiguration_TikaConfig.html?rev=1797258&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editConfiguration_TikaConfig.html (added)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/editConfiguration_TikaConfig.html Thu Jun  1 20:06:31 2017
@@ -0,0 +1,33 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+#if($TABNAME == $ResourceBundle.getString('TikaExtractor.TikaConfigTabName'))
+
+<table class="displaytable">
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
+  <tr>
+    <td class="value" colspan="2">
+      <textarea name="tikaconfig" rows="20" cols="120">$Encoder.bodyEscape($TIKACONFIG)</textarea>
+    </td>
+  </tr>
+</table>
+      
+#else
+
+<input type="hidden" name="tikaconfig" value="$Encoder.attributeEscape($TIKACONFIG)"/>
+
+#end
\ No newline at end of file

Added: manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/viewConfiguration.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/viewConfiguration.html?rev=1797258&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/viewConfiguration.html (added)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tika/viewConfiguration.html Thu Jun  1 20:06:31 2017
@@ -0,0 +1,25 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<table class="displaytable">
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('TikaExtractor.TikaConfig'))</nobr></td>
+    <td class="value">$Encoder.bodyEscape($TIKACONFIG)</td>
+  </tr>
+
+</table>