manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1809879 - /manifoldcf/branches/CONNECTORS-1356-2.7.1/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/RepositoryDocument.java
Date Wed, 27 Sep 2017 16:25:15 GMT
Author: kwright
Date: Wed Sep 27 16:25:15 2017
New Revision: 1809879

URL: http://svn.apache.org/viewvc?rev=1809879&view=rev
Log:
Add source path as a prime field

Modified:
    manifoldcf/branches/CONNECTORS-1356-2.7.1/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/RepositoryDocument.java

Modified: manifoldcf/branches/CONNECTORS-1356-2.7.1/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/RepositoryDocument.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1356-2.7.1/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/RepositoryDocument.java?rev=1809879&r1=1809878&r2=1809879&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1356-2.7.1/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/RepositoryDocument.java
(original)
+++ manifoldcf/branches/CONNECTORS-1356-2.7.1/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/RepositoryDocument.java
Wed Sep 27 16:25:15 2017
@@ -52,6 +52,7 @@ public class RepositoryDocument
   protected final Map<String,Reader[]> readerFields = new HashMap<String,Reader[]>();
   protected final Map<String,Date[]> dateFields = new HashMap<String,Date[]>();
   protected final Map<String,Security> securityLevels = new HashMap<String,Security>();
+  protected final List<String> sourcePath = new ArrayList<String>();
   protected String fileName = "docname";
   protected String contentMimeType = "application/octet-stream";
   protected Date createdDate = null;
@@ -106,6 +107,10 @@ public class RepositoryDocument
     {
       rval.securityLevels.put(key,securityLevels.get(key));
     }
+    for (String pathElement : sourcePath)
+    {
+      rval.sourcePath.add(pathElement);
+    }
     return rval;
   }
   
@@ -120,6 +125,23 @@ public class RepositoryDocument
     readerFields.clear();
   }
   
+  /** Set the source path for the document.
+  *@param sourcePath is the path.
+  */
+  public void setSourcePath(final List<String> sourcePath) {
+    sourcePath.clear();
+    for (final String pathElement : sourcePath) {
+      sourcePath.add(pathElement);
+    }
+  }
+
+  /** Get the source path for the document.
+  *@return the source path.
+  */
+  public List<String> getSourcePath() {
+    return sourcePath;
+  }
+  
   /** Set the document's original (repository) size.  Use null to indicate that the size
is
   * unknown.
   *@param size is the size.



Mime
View raw message