try {
// If the inserted Document doesn't use this Collection's
// SymbolTable, then it will have to be copied into a
// conformant TableBuilder. This is slower than doing it
// correctly in the first place, but it isn't too bad.
CompressedTable ct;
if ( document.getSymbolTable() != symbols )
ct = DTSMHelper.compressTable(DTSMHelper.copyTable(document, symbols));
else
ct = DTSMHelper.compressTable(document);
value = new Value(ct.getData());
document = ct;
}
catch ( Exception e ) {
throw new DBException(FaultCodes.COL_CANNOT_STORE, "Error storing Document '" + key + "'", e);
}