OPENNLP-528 Added method to replace the type system of a corpus.
diff --git a/corpus-server/src/main/java/org/apache/opennlp/corpus_server/store/MemoryCorpusStore.java b/corpus-server/src/main/java/org/apache/opennlp/corpus_server/store/MemoryCorpusStore.java
index a871bbc..2deaba0 100644
--- a/corpus-server/src/main/java/org/apache/opennlp/corpus_server/store/MemoryCorpusStore.java
+++ b/corpus-server/src/main/java/org/apache/opennlp/corpus_server/store/MemoryCorpusStore.java
@@ -27,7 +27,7 @@
 public class MemoryCorpusStore implements CorpusStore {
 
   private final String corpusName;
-  private final byte[] typeSystemBytes;
+  private byte[] typeSystemBytes;
   private byte[] indexMapping;
 
   private Map<String, byte[]> casStore = new HashMap<String, byte[]>();
@@ -80,6 +80,11 @@
     casStore.remove(casID);
   }
   
+  @Override
+  public void replaceTypeSystem(byte[] newTypeSystem) throws IOException {
+    typeSystemBytes = newTypeSystem;
+  }
+  
   public byte[] getTypeSystem() {
     return typeSystemBytes;
   }