use of nl.uva.cs.lobcder.resources.LogicalData in project lobcder by skoulouzis.
the class Assimilator method addFile.
private void addFile(Connection connection, VFile f, Long parentRef, long ssID) throws SQLException, VlException, NoSuchAlgorithmException {
long pdriGroupID = addPdrigroupTable(connection);
LogicalData entry = new LogicalData();
entry.setContentTypesAsString(f.getMimeType());
entry.setCreateDate(f.getModificationTime());
entry.setLength(f.getLength());
entry.setModifiedDate(f.getModificationTime());
entry.setName(f.getName());
entry.setOwner("admin");
entry.setParentRef(parentRef);
entry.setType(Constants.LOGICAL_FILE);
entry.setPdriGroupId(pdriGroupID);
// if(f instanceof VChecksum){
// String chs = ((VChecksum) f).getChecksum(VChecksum.MD5);
// entry.setChecksum();
// }
long pdriID = addPDRI(connection, f.getName(), ssID, pdriGroupID, false, DesEncrypter.generateKey());
addLogicalData(connection, entry);
}
Aggregations