@Override
@Transactional(propagation = Propagation.REQUIRED)
public void initProfile(URI signatureFileUri) throws SignatureFileException {
// pre-populate with available file formats
SignatureParser sigParser = new SaxSignatureFileParser(signatureFileUri);
// Dummy format for 'no id'
profileDao.saveFormat(Format.NULL);
FormatCallback callback = new FormatCallback() {
@Override
public void onFormat(Format format) {
profileDao.saveFormat(format);
}
};
sigParser.formats(callback);
}