Skip to content
Snippets Groups Projects
Commit 0a263435 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- removed superflous code

parent d6ba8fcc
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
*
* @param fixity concrete fixity object
* @param storedEntityIdentifier
* @param is RelativePath
* @param isRelativePath RelativePath
* @param algorithm which algorithm should be used
* @return result
* @throws NoSuchAlgorithmException
......@@ -163,7 +163,6 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
* @param fixity concrete fixity object
* @param storedEntityIdentifier path to file which should be checked
* @param isRelativePath indicates if path is relative
* @param result result is boolean variable to hold states of all fixity checks
* @return result
* @throws Exception
*/
......@@ -424,7 +423,8 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
private File getCanonicalFile(String srcPath)
{
log.info("SLUBStoragePlugin.getCanonicalFile() srcPath='"+ srcPath + "'");
String fileName = srcPath.split("\\" + File.separator)[(srcPath.split("\\" + File.separator).length - 1)];
String backslash = "\\";
String fileName = srcPath.split(backslash + File.separator)[(srcPath.split(backslash + File.separator).length - 1)];
try
{
File canonicalSrcDir = new File(srcPath).getParentFile().getCanonicalFile();
......@@ -502,7 +502,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
throw new Exception("error, no section in entity of type "+entitytype +" with 'internalIdentfier' in associated iedoc found, do you use plugin for others than permanent data (IE and filestream)? You should not! Also do not use it for SIPstoragePermanentGroup!");
}
String iepid = null;
log.debug("SLUBStoragePlugin.getStreamRelativePath iesec=" + iesec.toString());
log.debug("SLUBStoragePlugin.getStreamRelativePath iesec=" + iesec);
List<DnxSectionRecord> records = iesec.getRecordList();
for (DnxSectionRecord element : records) {
if ("PID".equals(element.getKeyById("internalIdentifierType").getValue())) {
......@@ -512,8 +512,8 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
}
// raise Exception if IEPID is null
if (null == iepid) {
log.error ("SLUBStoragePlugin.getStreamRelativePath iesec="+iesec.toString() );
throw new Exception("error, could not get IEPID for storedEntityMetaData:"+storedEntityMetaData.toString() +" of type " + entitytype);
log.error ("SLUBStoragePlugin.getStreamRelativePath iesec="+iesec() );
throw new Exception("error, could not get IEPID for storedEntityMetaData:"+storedEntityMetaData +" of type " + entitytype);
}
log.debug("SLUBStoragePlugin.getStreamRelativePath iepid=" + iepid + " (entitytype=" + entitytype + ")");
// get creationDate of "objectCharacteristics"
......@@ -525,7 +525,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
sdf.setLenient(false); /* if parse errors, do not guess about */
Date d = sdf.parse(datestring);
date.setTime(d);
log.debug("SLUBStoragePlugin.getStreamRelativePath creation Date read=" + datestring + " parsed=" + date.toString());
log.debug("SLUBStoragePlugin.getStreamRelativePath creation Date read=" + datestring + " parsed=" + date);
// now create path in format /yyyy/MM/dd/IEPID/
relativeDirectoryPath = relativeDirectoryPath + new SimpleDateFormat("yyyy").format(d);
relativeDirectoryPath = relativeDirectoryPath + File.separator;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment