Revision: 16571
          http://sourceforge.net/p/gate/code/16571
Author:   markagreenwood
Date:     2013-03-07 19:37:38 +0000 (Thu, 07 Mar 2013)
Log Message:
-----------
clean up the mime type data when the plugin is unloaded

Modified Paths:
--------------
    gate/trunk/plugins/Format_Twitter/src/gate/corpora/JSONTweetFormat.java

Modified: 
gate/trunk/plugins/Format_Twitter/src/gate/corpora/JSONTweetFormat.java
===================================================================
--- gate/trunk/plugins/Format_Twitter/src/gate/corpora/JSONTweetFormat.java     
2013-03-07 17:38:30 UTC (rev 16570)
+++ gate/trunk/plugins/Format_Twitter/src/gate/corpora/JSONTweetFormat.java     
2013-03-07 19:37:38 UTC (rev 16571)
@@ -64,6 +64,17 @@
     setMimeType(mime);
     return this;
   }
+  
+  @Override
+  public void cleanup() {
+    super.cleanup();
+    
+    MimeType mime = getMimeType();
+    
+    mimeString2ClassHandlerMap.remove(mime.getType()+ "/" + mime.getSubtype());
+    mimeString2mimeTypeMap.remove(mime.getType() + "/" + mime.getSubtype());
+    suffixes2mimeTypeMap.remove("json");
+  }
 
   public void unpackMarkup(gate.Document doc) throws DocumentFormatException{
     if ( (doc == null) || (doc.getSourceUrl() == null && doc.getContent() == 
null) ) {

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


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to