return null;
}
changed = "true";
SampleObject record = new SampleObject();
String fullName = new File(sampleRecordToUpload.getFullname()).getName();
record.setFullname(fullName);
record.setShortName(record.getFullname().substring(0,Math.min(20,record.getFullname().length())));
record.setContentType(sampleRecordToUpload.getContentType());
selectedPlan.getSampleRecordsDefinition().addRecord(record);
writeTempFile(sampleRecordToUpload, record);
// identify format of newly uploaded records
if (shouldCharacterise(record)) {
identifyFormat(record);
// describeInXcdl(record);
characteriseFits(record);
}
// need to initialize jhove tree by upload of a new sample record
if (record.getJhoveXMLString() == null || "".equals(record.getJhoveXMLString())) {
record.setJhoveXMLString(jHoveAdaptor.describe(tempDigitalObjects.get(record)));
}
log.debug("Content-Type: " + sampleRecordToUpload.getContentType());
log.debug("Size of Records Array: "
+ selectedPlan.getSampleRecordsDefinition().getRecords()
.size());
log.debug("FileName: " + sampleRecordToUpload.getFullname());
log.debug("Length of File: " + sampleRecordToUpload.getData().getSize());
log.debug("added SampleObject: " + record.getFullname());
log.debug("JHove initialized: " + (record.getJhoveXMLString() != null));
sampleRecordToUpload.setData(new ByteStream());
System.gc();