use of org.apache.uima.cas.impl.CASCompleteSerializer in project webanno by webanno.
the class CasPersistenceUtils method readSerializedCas.
public static void readSerializedCas(JCas aJCas, File aFile) throws IOException {
try (ObjectInputStream is = new ObjectInputStream(new FileInputStream(aFile))) {
CASCompleteSerializer serializer = (CASCompleteSerializer) is.readObject();
deserializeCASComplete(serializer, aJCas.getCasImpl());
// Initialize the JCas sub-system which is the most often used API in DKPro Core
// components
aJCas.getCas().getJCas();
} catch (CASException | ClassNotFoundException e) {
throw new IOException(e);
}
}
Aggregations