You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2012/07/31 17:02:46 UTC

svn commit: r1367598 - /opennlp/sandbox/corpus-server/src/main/java/org/apache/opennlp/corpus_server/store/MemoryCorpusStore.java

Author: joern
Date: Tue Jul 31 15:02:46 2012
New Revision: 1367598

URL: http://svn.apache.org/viewvc?rev=1367598&view=rev
Log:
OPENNLP-528 Added method to replace the type system of a corpus.

Modified:
    opennlp/sandbox/corpus-server/src/main/java/org/apache/opennlp/corpus_server/store/MemoryCorpusStore.java

Modified: opennlp/sandbox/corpus-server/src/main/java/org/apache/opennlp/corpus_server/store/MemoryCorpusStore.java
URL: http://svn.apache.org/viewvc/opennlp/sandbox/corpus-server/src/main/java/org/apache/opennlp/corpus_server/store/MemoryCorpusStore.java?rev=1367598&r1=1367597&r2=1367598&view=diff
==============================================================================
--- opennlp/sandbox/corpus-server/src/main/java/org/apache/opennlp/corpus_server/store/MemoryCorpusStore.java (original)
+++ opennlp/sandbox/corpus-server/src/main/java/org/apache/opennlp/corpus_server/store/MemoryCorpusStore.java Tue Jul 31 15:02:46 2012
@@ -27,7 +27,7 @@ import java.util.Map;
 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 @@ public class MemoryCorpusStore implement
     casStore.remove(casID);
   }
   
+  @Override
+  public void replaceTypeSystem(byte[] newTypeSystem) throws IOException {
+    typeSystemBytes = newTypeSystem;
+  }
+  
   public byte[] getTypeSystem() {
     return typeSystemBytes;
   }