manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1451313 - in /manifoldcf/trunk: CHANGES.txt connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Date Thu, 28 Feb 2013 19:45:35 GMT
Author: kwright
Date: Thu Feb 28 19:45:35 2013
New Revision: 1451313

URL: http://svn.apache.org/r1451313
Log:
Fix for CONNECTORS-653.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1451313&r1=1451312&r2=1451313&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Feb 28 19:45:35 2013
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 1.2-dev =====================
 
+CONNECTORS-653: Include filename in SharePoint connector.
+(Mark Lugert, Karl Wright)
+
 CONNECTORS-652: Add documentation for new script client and API
 features.
 (Karl Wright)

Modified: manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1451313&r1=1451312&r2=1451313&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
(original)
+++ manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Thu Feb 28 19:45:35 2013
@@ -1523,6 +1523,8 @@ public class SharePointRepository extend
                       RepositoryDocument data = new RepositoryDocument();
                       data.setBinary( is, documentLength );
 
+                      data.setFileName(mapToFileName(documentIdentifier));
+                      
 		      data.setMimeType(mapExtensionToMimeType(documentIdentifier));
 		      
                       setDataACLs(data,acls,denyAcl);
@@ -1736,6 +1738,15 @@ public class SharePointRepository extend
     return mimeMap.get(fileName.substring(dotIndex+1).toLowerCase(java.util.Locale.ROOT));
   }
 
+  /** Map document identifier to file name */
+  protected static String mapToFileName(String fileName)
+  {
+    int slashIndex = fileName.lastIndexOf("/");
+    if (slashIndex != -1)
+      fileName = fileName.substring(slashIndex+1);
+    return fileName;
+  }
+  
   protected static void setDataACLs(RepositoryDocument data, ArrayList acls, String denyAcl)
   {
     if (acls != null)



Mime
View raw message