> On 11.08.2016, at 10:08, Richard Eckart de Castilho <[email protected]> wrote:
> 
> On 10.08.2016, at 23:29, Richard Eckart de Castilho <[email protected]> wrote:
>> So I had a first look at whether I can replace parts of the DKPro Core 
>> BinaryCasReader/
>> BinaryCasWriter code with calls to CasIoUtils, but so far that doesn't seem 
>> very viable:
>> 
>> - COMPRESSED_FILTERED_TSI missing
>> 
>> - TSI stream passed to load method only used for serialized CASes but not 
>> for 
>> COMPRESSED_FILTERED
>> 
>> - load(InputStream casInputStream, CASMgrSerializer tsi, CAS aCAS, boolean 
>> leniently)
>> missing to avoid having to load the TSI over and over again when it is 
>> stored outside
>> the casInputStream
> 
> Trying to add these back...

Ok, done but no cigar just yet... 

The "leniently" flag is currently only used for XMI/XCAS... I think this flag 
should also be
used for COMPRESSED_FILTERED_TSI and when enabled in other context should throw 
an exception?

I think my changes now still do not add back lenient loading of 
COMPRESSED_FILTERED_TSI because
the loading logic for binary CASes delegates to casImpl.reinit() and never 
passes 
Serialization.deserializeCAS(CAS, InputStream, TypeSystem, ReuseInfo).

So if I am not mistaken, we'll have to further extend CASImpl.reinit(Header h, 
InputStream istream)
with another parameter (leniently) to control whether BinaryCasSerDes6 is 
invoked with the TS
from the target CAS or not...

I implemented TSI storage in a way that doesn't require storing the header 
twice in the stream :)

Cheers,

-- Richard

 

Reply via email to