manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1544614 - in /manifoldcf/trunk: CHANGES.txt connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
Date Fri, 22 Nov 2013 17:47:01 GMT
Author: kwright
Date: Fri Nov 22 17:47:00 2013
New Revision: 1544614

URL: http://svn.apache.org/r1544614
Log:
Fix for CONNECTORS-819.  Committed on behalf of Graeme Seaton.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1544614&r1=1544613&r2=1544614&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Fri Nov 22 17:47:00 2013
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 1.5-dev =====================
 
+CONNECTORS-819: Add missing metadata to JCIFS connector.
+(Graeme Seaton)
+
 CONNECTORS-817: Improve SharePoint logging.
 (Mark Libucha, Karl Wright)
 

Modified: manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java?rev=1544614&r1=1544613&r2=1544614&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
(original)
+++ manifoldcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
Fri Nov 22 17:47:00 2013
@@ -994,6 +994,13 @@ public class SharedDriveConnector extend
   {
     String fileNameString = file.getName();
     Date lastModifiedDate = new Date(file.lastModified());
+    Date creationDate = new Date(file.createTime());
+    //If using the lastAccess patched/Google version of jcifs then this can be uncommented
+    //Date lastAccessDate = new Date(file.lastAccess());
+    Integer attributes = file.getAttributes();
+    String shareName = file.getShare();
+
+    
     String contentType = mapExtensionToMimeType(fileNameString);
 
     rd.setFileName(fileNameString);
@@ -1001,6 +1008,15 @@ public class SharedDriveConnector extend
       rd.setMimeType(contentType);
     rd.addField("lastModified", lastModifiedDate.toString());
     rd.setModifiedDate(lastModifiedDate);
+    
+    // Add extra obtainable fields to the field map
+    rd.addField("createdOn", creationDate.toString());
+    rd.setCreatedDate(creationDate);
+
+    //rd.addField("lastAccess", lastModifiedDate.toString());
+    rd.addField("attributes", Integer.toString(attributes));
+    rd.addField("shareName", shareName);
+
 
     int index = 0;
     index = setDocumentSecurity(rd,version,index);



Mime
View raw message