Author: kwright
Date: Wed Jan 27 14:55:49 2016
New Revision: 1727072
URL: http://svn.apache.org/viewvc?rev=1727072&view=rev
Log:
Add file-resources support generally.
Added:
manifoldcf/branches/CONNECTORS-1270/framework/example-file-resources/
manifoldcf/branches/CONNECTORS-1270/framework/example-file-resources/README.txt
(with props)
Modified:
manifoldcf/branches/CONNECTORS-1270/build.xml
manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractor.java
manifoldcf/branches/CONNECTORS-1270/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java
manifoldcf/branches/CONNECTORS-1270/framework/build.xml
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-file-proprietary/properties.xml
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-file/properties.xml
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-zk-proprietary/properties.xml
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-zk/properties.xml
manifoldcf/branches/CONNECTORS-1270/framework/example-singleprocess-proprietary/properties.xml
manifoldcf/branches/CONNECTORS-1270/framework/example-singleprocess/properties.xml
Modified: manifoldcf/branches/CONNECTORS-1270/build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/build.xml?rev=1727072&r1=1727071&r2=1727072&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1270/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-1270/build.xml Wed Jan 27 14:55:49 2016
@@ -292,6 +292,10 @@
<copy todir="dist/lib-proprietary">
<fileset dir="framework/dist/lib-proprietary"/>
</copy>
+ <mkdir dir="dist/file-resources"/>
+ <copy todir="dist/file-resources">
+ <fileset dir="framework/dist/file-resources"/>
+ </copy>
<mkdir dir="dist/multiprocess-file-example"/>
<copy todir="dist/multiprocess-file-example">
<fileset dir="framework/dist/multiprocess-file-example"/>
Modified:
manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractor.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractor.java?rev=1727072&r1=1727071&r2=1727072&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractor.java
(original)
+++
manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractor.java
Wed Jan 27 14:55:49 2016
@@ -53,6 +53,8 @@ public class OpenNlpExtractor extends Ba
private static final String EDIT_SPECIFICATION_FIELDMAPPING_HTML =
"editSpecification_FieldMapping.html";
private static final String VIEW_SPECIFICATION_HTML =
"viewSpecification.html";
+ protected static int maximumExtractionCharacters = 524288;
+
// Meta-data fields added by this connector
private static final String PERSONS = "ner_people";
private static final String LOCATIONS = "ner_locations";
@@ -528,8 +530,6 @@ public class OpenNlpExtractor extends Ba
throw new ManifoldCFException(e.getMessage(),e);
}
- protected static int maximumExtractionCharacters = 524288;
-
/** An instance of this class receives characters in 64K chunks, and needs
to accumulate
* extracted metadata that this transformer will pass down.
*/
Modified:
manifoldcf/branches/CONNECTORS-1270/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java?rev=1727072&r1=1727071&r2=1727072&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-1270/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java
(original)
+++
manifoldcf/branches/CONNECTORS-1270/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java
Wed Jan 27 14:55:49 2016
@@ -93,6 +93,7 @@ public class TikaExtractor extends org.a
*@param checkActivity is an object including the activities that can be
performed by this method.
*@return true if the mime type can be accepted by this connector.
*/
+ @Override
public boolean checkMimeTypeIndexable(VersionContext pipelineDescription,
String mimeType, IOutputCheckActivity checkActivity)
throws ManifoldCFException, ServiceInterruption
{
Modified: manifoldcf/branches/CONNECTORS-1270/framework/build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/framework/build.xml?rev=1727072&r1=1727071&r2=1727072&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1270/framework/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-1270/framework/build.xml Wed Jan 27 14:55:49
2016
@@ -153,6 +153,15 @@
<include name="activation*.jar"/>
</fileset>
</path>
+
+ <target name="file-resources">
+ <mkdir dir="dist/file-resources"/>
+ <copy todir="dist/file-resources">
+ <fileset dir="example-file-resources">
+ <include name="README.txt"/>
+ </fileset>
+ </copy>
+ </target>
<target name="doc">
<mkdir dir="dist/doc"/>
@@ -1998,7 +2007,7 @@
</java>
</target>
- <target name="build"
depends="multi-process-zk-example,multi-process-zk-example-proprietary,multi-process-file-example,multi-process-file-example-proprietary,single-process-example,single-process-example-proprietary,example-common,script-engine,obfuscation-utility,buildfiles,test-lib"/>
+ <target name="build"
depends="multi-process-zk-example,multi-process-zk-example-proprietary,multi-process-file-example,multi-process-file-example-proprietary,single-process-example,single-process-example-proprietary,example-common,script-engine,obfuscation-utility,file-resources,buildfiles,test-lib"/>
<target name="all"
depends="build,doc,build-tests,run-tests,run-tests-HSQLDB,run-tests-HSQLDBext"/>
Added:
manifoldcf/branches/CONNECTORS-1270/framework/example-file-resources/README.txt
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/framework/example-file-resources/README.txt?rev=1727072&view=auto
==============================================================================
---
manifoldcf/branches/CONNECTORS-1270/framework/example-file-resources/README.txt
(added)
+++
manifoldcf/branches/CONNECTORS-1270/framework/example-file-resources/README.txt
Wed Jan 27 14:55:49 2016
@@ -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.
+
+This directory is meant to contain file resources that your connectors may
need.
+It is referenced by the org.apache.manifoldcf.fileresources property in all of
the
+distributed examples. The kinds of resources that go here are common files,
+such as OpenNLP model files.
+
+Read more about how to populate this directory on the
"how-to-build-and-deploy.html"
+documentation page.
+
+
+
Propchange:
manifoldcf/branches/CONNECTORS-1270/framework/example-file-resources/README.txt
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-file-proprietary/properties.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-file-proprietary/properties.xml?rev=1727072&r1=1727071&r2=1727072&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-file-proprietary/properties.xml
(original)
+++
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-file-proprietary/properties.xml
Wed Jan 27 14:55:49 2016
@@ -38,6 +38,8 @@
<property name="org.apache.manifoldcf.logconfigfile" value="./logging.ini"/>
<!-- Specify the connectors to be loaded -->
<property name="org.apache.manifoldcf.connectorsconfigurationfile"
value="../connectors-proprietary.xml"/>
+ <!-- Specify the path to the file resources directory -->
+ <property name="org.apache.manifoldcf.fileresources"
value="../file-resources"/>
<!-- Tell MCF where to find the connector jars -->
<libdir path="../connector-lib"/>
<libdir path="../connector-common-lib"/>
Modified:
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-file/properties.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-file/properties.xml?rev=1727072&r1=1727071&r2=1727072&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-file/properties.xml
(original)
+++
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-file/properties.xml
Wed Jan 27 14:55:49 2016
@@ -38,6 +38,8 @@
<property name="org.apache.manifoldcf.logconfigfile" value="./logging.ini"/>
<!-- Specify the connectors to be loaded -->
<property name="org.apache.manifoldcf.connectorsconfigurationfile"
value="../connectors.xml"/>
+ <!-- Specify the path to the file resources directory -->
+ <property name="org.apache.manifoldcf.fileresources"
value="../file-resources"/>
<!-- Tell MCF where to find the connector jars -->
<libdir path="../connector-lib"/>
<libdir path="../connector-common-lib"/>
Modified:
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-zk-proprietary/properties.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-zk-proprietary/properties.xml?rev=1727072&r1=1727071&r2=1727072&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-zk-proprietary/properties.xml
(original)
+++
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-zk-proprietary/properties.xml
Wed Jan 27 14:55:49 2016
@@ -33,6 +33,8 @@
<property name="org.apache.manifoldcf.logconfigfile" value="./logging.ini"/>
<!-- Specify the connectors to be loaded -->
<property name="org.apache.manifoldcf.connectorsconfigurationfile"
value="../connectors-proprietary.xml"/>
+ <!-- Specify the path to the file resources directory -->
+ <property name="org.apache.manifoldcf.fileresources"
value="../file-resources"/>
<!-- Tell MCF where to find the connector jars -->
<libdir path="../connector-lib"/>
<libdir path="../connector-common-lib"/>
Modified:
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-zk/properties.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-zk/properties.xml?rev=1727072&r1=1727071&r2=1727072&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-zk/properties.xml
(original)
+++
manifoldcf/branches/CONNECTORS-1270/framework/example-multiprocess-zk/properties.xml
Wed Jan 27 14:55:49 2016
@@ -33,6 +33,8 @@
<property name="org.apache.manifoldcf.logconfigfile" value="./logging.ini"/>
<!-- Specify the connectors to be loaded -->
<property name="org.apache.manifoldcf.connectorsconfigurationfile"
value="../connectors.xml"/>
+ <!-- Specify the path to the file resources directory -->
+ <property name="org.apache.manifoldcf.fileresources"
value="../file-resources"/>
<!-- Tell MCF where to find the connector jars -->
<libdir path="../connector-lib"/>
<libdir path="../connector-common-lib"/>
Modified:
manifoldcf/branches/CONNECTORS-1270/framework/example-singleprocess-proprietary/properties.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/framework/example-singleprocess-proprietary/properties.xml?rev=1727072&r1=1727071&r2=1727072&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-1270/framework/example-singleprocess-proprietary/properties.xml
(original)
+++
manifoldcf/branches/CONNECTORS-1270/framework/example-singleprocess-proprietary/properties.xml
Wed Jan 27 14:55:49 2016
@@ -35,6 +35,8 @@
<property name="org.apache.manifoldcf.logconfigfile" value="./logging.ini"/>
<!-- Specify the connectors to be loaded -->
<property name="org.apache.manifoldcf.connectorsconfigurationfile"
value="../connectors-proprietary.xml"/>
+ <!-- Specify the path to the file resources directory -->
+ <property name="org.apache.manifoldcf.fileresources"
value="../file-resources"/>
<!-- Tell MCF where to find the connector jars -->
<libdir path="../connector-lib"/>
<libdir path="../connector-common-lib"/>
Modified:
manifoldcf/branches/CONNECTORS-1270/framework/example-singleprocess/properties.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/framework/example-singleprocess/properties.xml?rev=1727072&r1=1727071&r2=1727072&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-1270/framework/example-singleprocess/properties.xml
(original)
+++
manifoldcf/branches/CONNECTORS-1270/framework/example-singleprocess/properties.xml
Wed Jan 27 14:55:49 2016
@@ -35,6 +35,8 @@
<property name="org.apache.manifoldcf.logconfigfile" value="./logging.ini"/>
<!-- Specify the connectors to be loaded -->
<property name="org.apache.manifoldcf.connectorsconfigurationfile"
value="../connectors.xml"/>
+ <!-- Specify the path to the file resources directory -->
+ <property name="org.apache.manifoldcf.fileresources"
value="../file-resources"/>
<!-- Tell MCF where to find the connector jars -->
<libdir path="../connector-lib"/>
<libdir path="../connector-common-lib"/>