Revision: 17602
          http://sourceforge.net/p/gate/code/17602
Author:   markagreenwood
Date:     2014-03-08 19:51:20 +0000 (Sat, 08 Mar 2014)
Log Message:
-----------
figured out the type of one of the remaining maps in DocumentFormat

Modified Paths:
--------------
    gate/trunk/src/main/gate/DocumentFormat.java
    gate/trunk/src/main/gate/corpora/EmailDocumentFormat.java
    gate/trunk/src/main/gate/corpora/NekoHtmlDocumentFormat.java
    gate/trunk/src/main/gate/corpora/SgmlDocumentFormat.java
    gate/trunk/src/main/gate/corpora/TextualDocumentFormat.java
    gate/trunk/src/main/gate/corpora/XmlDocumentFormat.java
    gate/trunk/src/main/gate/xml/SimpleErrorHandler.java
    gate/trunk/src/main/gate/xml/XmlDocumentHandler.java

Modified: gate/trunk/src/main/gate/DocumentFormat.java
===================================================================
--- gate/trunk/src/main/gate/DocumentFormat.java        2014-03-08 18:56:22 UTC 
(rev 17601)
+++ gate/trunk/src/main/gate/DocumentFormat.java        2014-03-08 19:51:20 UTC 
(rev 17602)
@@ -51,8 +51,8 @@
   */
 public abstract class DocumentFormat
 extends AbstractLanguageResource implements LanguageResource{
-  /** Debug flag */
-  private static final boolean DEBUG = false;
+  
+  private static final long serialVersionUID = 4147880563349143923L;
 
   /** The MIME type of this format. */
   private MimeType mimeType = null;
@@ -91,7 +91,7 @@
     * When an element from the map is encounted, The corresponding string
     * element is added to the document content
     */
-  protected Map element2StringMap = null;
+  protected Map<String,String> element2StringMap = null;
 
   /** The features of this resource */
   private FeatureMap features = null;
@@ -561,7 +561,7 @@
   public Map getMarkupElementsMap() { return markupElementsMap; }
 
    /** Get the element 2 string map */
-  public Map getElement2StringMap() { return element2StringMap; }
+  public Map<String,String> getElement2StringMap() { return element2StringMap; 
}
 
   /** Set the markup elements map */
   public void setMarkupElementsMap(Map markupElementsMap) {
@@ -569,7 +569,7 @@
   }
 
   /** Set the element 2 string map */
-  public void setElement2StringMap(Map anElement2StringMap) {
+  public void setElement2StringMap(Map<String,String> anElement2StringMap) {
    element2StringMap = anElement2StringMap;
   }
 

Modified: gate/trunk/src/main/gate/corpora/EmailDocumentFormat.java
===================================================================
--- gate/trunk/src/main/gate/corpora/EmailDocumentFormat.java   2014-03-08 
18:56:22 UTC (rev 17601)
+++ gate/trunk/src/main/gate/corpora/EmailDocumentFormat.java   2014-03-08 
19:51:20 UTC (rev 17602)
@@ -43,8 +43,7 @@
     autoinstances = {@AutoInstance(hidden = true)})
 public class EmailDocumentFormat extends TextualDocumentFormat
 {
-  /** Debug flag */
-  private static final boolean DEBUG = false;
+  private static final long serialVersionUID = 5738598679165395119L;
 
   /** Default construction */
   public EmailDocumentFormat() { super();}

Modified: gate/trunk/src/main/gate/corpora/NekoHtmlDocumentFormat.java
===================================================================
--- gate/trunk/src/main/gate/corpora/NekoHtmlDocumentFormat.java        
2014-03-08 18:56:22 UTC (rev 17601)
+++ gate/trunk/src/main/gate/corpora/NekoHtmlDocumentFormat.java        
2014-03-08 19:51:20 UTC (rev 17602)
@@ -56,6 +56,9 @@
 @CreoleResource(name = "GATE HTML Document Format", isPrivate = true,
     autoinstances = {@AutoInstance(hidden = true)})
 public class NekoHtmlDocumentFormat extends TextualDocumentFormat {
+ 
+  private static final long serialVersionUID = -3163147687966075651L;
+ 
   /** Debug flag */
   private static final boolean DEBUG = false;
 

Modified: gate/trunk/src/main/gate/corpora/SgmlDocumentFormat.java
===================================================================
--- gate/trunk/src/main/gate/corpora/SgmlDocumentFormat.java    2014-03-08 
18:56:22 UTC (rev 17601)
+++ gate/trunk/src/main/gate/corpora/SgmlDocumentFormat.java    2014-03-08 
19:51:20 UTC (rev 17602)
@@ -45,8 +45,7 @@
     autoinstances = {@AutoInstance(hidden = true)})
 public class SgmlDocumentFormat extends TextualDocumentFormat
 {
-  /** Debug flag */
-  private static final boolean DEBUG = false;
+  private static final long serialVersionUID = -3596255263987343560L;
 
   /** Default construction */
   public SgmlDocumentFormat() { super(); }

Modified: gate/trunk/src/main/gate/corpora/TextualDocumentFormat.java
===================================================================
--- gate/trunk/src/main/gate/corpora/TextualDocumentFormat.java 2014-03-08 
18:56:22 UTC (rev 17601)
+++ gate/trunk/src/main/gate/corpora/TextualDocumentFormat.java 2014-03-08 
19:51:20 UTC (rev 17602)
@@ -39,10 +39,8 @@
     autoinstances = {@AutoInstance(hidden = true)})
 public class TextualDocumentFormat extends DocumentFormat
 {
+  private static final long serialVersionUID = -5630380244338599927L;
 
-  /** Debug flag */
-  private static final boolean DEBUG = false;
-
   /** Default construction */
   public TextualDocumentFormat() { super(); }
 

Modified: gate/trunk/src/main/gate/corpora/XmlDocumentFormat.java
===================================================================
--- gate/trunk/src/main/gate/corpora/XmlDocumentFormat.java     2014-03-08 
18:56:22 UTC (rev 17601)
+++ gate/trunk/src/main/gate/corpora/XmlDocumentFormat.java     2014-03-08 
19:51:20 UTC (rev 17602)
@@ -60,9 +60,9 @@
 @CreoleResource(name = "GATE XML Document Format", isPrivate = true,
     autoinstances = {@AutoInstance(hidden = true)})
 public class XmlDocumentFormat extends TextualDocumentFormat {
-  /** Debug flag */
-  private static final boolean DEBUG = false;
 
+  private static final long serialVersionUID = 3205973554326782116L;
+
   /**
    * InputFactory for the StAX parser used for GATE format XML.
    */

Modified: gate/trunk/src/main/gate/xml/SimpleErrorHandler.java
===================================================================
--- gate/trunk/src/main/gate/xml/SimpleErrorHandler.java        2014-03-08 
18:56:22 UTC (rev 17601)
+++ gate/trunk/src/main/gate/xml/SimpleErrorHandler.java        2014-03-08 
19:51:20 UTC (rev 17602)
@@ -23,9 +23,6 @@
 
 public class SimpleErrorHandler implements ErrorHandler {
 
-  /** Debug flag */
-  private static final boolean DEBUG = false;
-
   /**
     * SimpleErrorHandler constructor comment.
     */

Modified: gate/trunk/src/main/gate/xml/XmlDocumentHandler.java
===================================================================
--- gate/trunk/src/main/gate/xml/XmlDocumentHandler.java        2014-03-08 
18:56:22 UTC (rev 17601)
+++ gate/trunk/src/main/gate/xml/XmlDocumentHandler.java        2014-03-08 
19:51:20 UTC (rev 17602)
@@ -15,6 +15,7 @@
  */
 package gate.xml;
 
+import gate.AnnotationSet;
 import gate.Factory;
 import gate.FeatureMap;
 import gate.Gate;
@@ -109,7 +110,7 @@
    * added to the text contained by the key element.
    */
   public XmlDocumentHandler(gate.Document aDocument, Map aMarkupElementsMap,
-          Map anElement2StringMap) {
+          Map<String,String> anElement2StringMap) {
     this(aDocument, aMarkupElementsMap, anElement2StringMap, null);
   } // XmlDocumentHandler
 
@@ -125,8 +126,8 @@
    */
   public XmlDocumentHandler(gate.Document aDocument,
           Map aMarkupElementsMap,
-          Map anElement2StringMap,
-          gate.AnnotationSet anAnnotationSet) {
+          Map<String,String> anElement2StringMap,
+          AnnotationSet anAnnotationSet) {
     // init parent
     super();
     // init stack
@@ -392,7 +393,7 @@
 
       // test to see if element is inside the map
       // if it is then get the string value and add it to the document content
-      stringFromMap = (String) element2StringMap.get(elemName);
+      stringFromMap = element2StringMap.get(elemName);
       if (stringFromMap != null) {
         tmpDocContent.append(stringFromMap);
       }
@@ -707,7 +708,7 @@
   // this map contains the string that we want to insert iside the document
   // content, when a certain element is found
   // if the map is null then no string is added
-  private Map element2StringMap = null;
+  private Map<String,String> element2StringMap = null;
   /**This object inducates what to do when the parser encounts an error*/
   private SimpleErrorHandler _seh = new SimpleErrorHandler();
   /**The content of the XML document, without any tag for internal use*/

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to