Study owner = dprop.getOwner().getOwnerStudy();
// Synchronize the object with the current Hibernate session.
- //owner = getStudyDAO().merge(owner);
+ // owner = getStudyDAO().merge(owner);
SimpleDateFormat tostring = new SimpleDateFormat("yyyy"); // RKV: NOPMD: TODO: Use locale here?
String year = tostring.format(owner.getDate());
.toString();
aDoc.getFile().changePath(path);
owner = getStudyDAO().merge(owner);
-// getStudyDAO().update(owner);
+ // getStudyDAO().update(owner);
}
/**
encoding.append(scope.getReference()).append("_").append(
tostring.format(number));
} else { // title and (temporarily) asis
- encoding.append(aDoc.getTitle()).append("_").append(
- tostring.format(number));
+ encoding.append("_").append(tostring.format(number)).append(
+ aDoc.getFile().getName());
}
return encoding.toString();
}
aDoc.getAllRelations().add(attach);
getDocumentDAO().merge(aDoc);
-
+
return attach;
}
/**
* Get the relationDAO.
+ *
* @return the relationDAO
*/
public RelationDAO getRelationDAO() {
/**
* Set the relationDAO.
- * @param relationDAO the relationDAO to set
+ *
+ * @param relationDAO
+ * the relationDAO to set
*/
public void setRelationDAO(final RelationDAO relationDAO) {
_relationDAO = relationDAO;
- Whatever is the naming scheme used, in order to avoid name clashes, file names are anyway suffixed by an index
unique in the scope of the owner study.
-->
- <files name="encoded"/>
+ <files name="asis"/>
<!-- 2.3 Document versions format
-->
- Whatever is the naming scheme used, in order to avoid name clashes, file names are anyway suffixed by an index
unique in the scope of the owner study.
-->
- <files name="encoded"/>
+ <files name="asis"/>
<!-- 2.3 Document versions format
-->