manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1647438 - in /manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email: EmailConfig.java EmailConnector.java
Date Mon, 22 Dec 2014 22:58:37 GMT
Author: kwright
Date: Mon Dec 22 22:58:37 2014
New Revision: 1647438

URL: http://svn.apache.org/r1647438
Log:
Define nodes that will contain specification info

Modified:
    manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConfig.java
    manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java

Modified: manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConfig.java?rev=1647438&r1=1647437&r2=1647438&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConfig.java
(original)
+++ manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConfig.java
Mon Dec 22 22:58:37 2014
@@ -71,40 +71,16 @@ public class EmailConfig {
   
   public static final String PROTOCOL_DEFAULT_VALUE = "IMAP";
   public static final String PORT_DEFAULT_VALUE = "";
-  public static final String[] BASIC_METADATA = {"To","From","Subject","Body","Date","Encoding
of Attachment","MIME type of attachment"};
-  public static final String[] BASIC_SEARCHABLE_ATTRIBUTES = {"To","From","Subject","Body","Date"};
 
   // Specification nodes
   
+  public static final String NODE_TO = "to";
+  public static final String NODE_FROM = "from";
+  public static final String NODE_SUBJECT = "subject";
+  public static final String NODE_BODY = "body";
   public static final String NODE_PROPERTIES = "properties";
-  public static final String NODE_METADATA = "metadata";
-  public static final String NODE_FILTER = "filter";
-  public static final String NODE_FOLDER = "folder";
-  
   public static final String ATTRIBUTE_NAME = "name";
   public static final String ATTRIBUTE_VALUE = "value";
 
-  // Metadata field names
-  
-  public static final String EMAIL_SUBJECT = "subject";
-  public static final String EMAIL_FROM = "from";
-  public static final String EMAIL_TO = "to";
-  public static final String EMAIL_BODY = "body";
-  public static final String EMAIL_DATE = "date";
-  public static final String EMAIL_ATTACHMENT_ENCODING = "encoding of attachment";
-  public static final String EMAIL_ATTACHMENT_MIMETYPE = "mime type of attachment";
-  public static final String EMAIL_VERSION = "1.0";
-  
-  // Mime types
-  
-  public static final String MIMETYPE_TEXT_PLAIN = "text/plain";
-  public static final String MIMETYPE_HTML = "text/html";
-  
-  // Fields
-  
-  public static final String ENCODING_FIELD = "encoding";
-  public static final String MIMETYPE_FIELD = "mimetype";
-  //public static final String TO = "To";
-  
 
 }
\ No newline at end of file

Modified: manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java?rev=1647438&r1=1647437&r2=1647438&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java
Mon Dec 22 22:58:37 2014
@@ -611,30 +611,6 @@ public class EmailConnector extends org.
     }
   }
 
-  protected static void addIncludedMetadataNode(Specification ds,
-                          String metadataName) {
-    // Build the proper node
-    SpecificationNode sn = new SpecificationNode(EmailConfig.NODE_METADATA);
-    sn.setAttribute(EmailConfig.ATTRIBUTE_NAME, metadataName);
-    // Add to the end
-    ds.addChild(ds.getChildCount(), sn);
-  }
-
-  protected static void addFindParameterNode(Specification ds, String findParameterName,
String findParameterValue) {
-    SpecificationNode sn = new SpecificationNode(EmailConfig.NODE_FILTER);
-    sn.setAttribute(EmailConfig.ATTRIBUTE_NAME, findParameterName);
-    sn.setAttribute(EmailConfig.ATTRIBUTE_VALUE, findParameterValue);
-    // Add to the end
-    ds.addChild(ds.getChildCount(), sn);
-  }
-
-  protected static void addFolderNode(Specification ds, String folderName)
-  {
-    SpecificationNode sn = new SpecificationNode(EmailConfig.NODE_FOLDER);
-    sn.setAttribute(EmailConfig.ATTRIBUTE_NAME, folderName);
-    ds.addChild(ds.getChildCount(), sn);
-  }
-  
   /** Handle Messaging exceptions in a consistent global manner */
   protected static void handleMessagingException(MessagingException e, String context)
     throws ManifoldCFException, ServiceInterruption



Mime
View raw message