manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From min...@apache.org
Subject svn commit: r1492539 - /manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
Date Thu, 13 Jun 2013 06:51:14 GMT
Author: minoru
Date: Thu Jun 13 06:51:13 2013
New Revision: 1492539

URL: http://svn.apache.org/r1492539
Log: (empty)

Modified:
    manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java

Modified: manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java?rev=1492539&r1=1492538&r2=1492539&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
Thu Jun 13 06:51:13 2013
@@ -223,8 +223,22 @@ public class FileConnector extends org.a
     DocumentSpecification spec, int jobMode, boolean usesDefaultAuthority)
     throws ManifoldCFException, ServiceInterruption
   {
-    String[] rval = new String[documentIdentifiers.length];
     int i = 0;
+    
+    /*
+     * get filepathtouri value
+     */
+    boolean filePathToUri = false;
+    i = 0;
+    while (i < spec.getChildCount()) {
+      SpecificationNode sn = spec.getChild(i++);
+      if (sn.getType().equals("filepathtouri")) {
+        filePathToUri = Boolean.valueOf(sn.getValue());
+      }
+    }
+
+    String[] rval = new String[documentIdentifiers.length];
+    i = 0;
     while (i < rval.length)
     {
       File file = new File(documentIdentifiers[i]);
@@ -249,7 +263,7 @@ public class FileConnector extends org.a
             // Get the file's modified date.
             long lastModified = file.lastModified();
             StringBuilder sb = new StringBuilder();
-            sb.append(new Long(lastModified).toString()).append(":").append(new Long(fileLength).toString());
+            sb.append(new Long(lastModified).toString()).append(":").append(new Long(fileLength).toString()).append(":").append(filePathToUri);
             rval[i] = sb.toString();
           }
           else



Mime
View raw message