Loading src/main/java/org/gesis/dda/publishing/domain/impl/ContentResolver.java +8 −7 Original line number Diff line number Diff line Loading @@ -126,13 +126,13 @@ public class ContentResolver { if ( possibleContentType.equals(ContentType.PDF) ) { content = ContentHelpers.getTimeoutBackoffRetryAwareURLInputStream( new URL(url) ); } else if (url.contains("10.1177/")) { // GIGA journals special String sageUrl = url; String sageRedirectURLToPdf = sageUrl.replace("doi/10.1177", "doi/pdf/10.1177").replace("http://", "https://") + "?cookieSet=1"; URL sageURL = new URL(sageRedirectURLToPdf); content = ContentHelpers.getTimeoutBackoffRetryAwareURLInputStream( sageURL ); } // else if (url.contains("10.1177/")) { // // GIGA journals special // String sageUrl = url; // String sageRedirectURLToPdf = sageUrl.replace("doi/10.1177", "doi/pdf/10.1177").replace("http://", "https://") + "?cookieSet=1"; // URL sageURL = new URL(sageRedirectURLToPdf); // content = ContentHelpers.getTimeoutBackoffRetryAwareURLInputStream( sageURL ); // } else if ( possibleContentType.equals(ContentType.HTML) || possibleContentType.equals(ContentType.XHTML) || possibleContentType.equals(ContentType.XML) ) { Loading Loading @@ -297,6 +297,7 @@ public class ContentResolver { String resolvedUrlString = ContentHelpers.resolvePossibleRedirects(urlString); // BEGIN detect content type log.info(""); URL resolvedUrl = new URL(resolvedUrlString); InputStream possibleContent = ContentHelpers.getTimeoutBackoffRetryAwareURLInputStream(resolvedUrl); ContentInfo possibleContentInfo = ContentHelpers.CONTENT_INFO_UTIL.findMatch(possibleContent); Loading src/main/java/org/gesis/dda/publishing/domain/impl/SmartExcelSheetBundlesSetSource.java +4 −2 Original line number Diff line number Diff line Loading @@ -178,6 +178,7 @@ public class SmartExcelSheetBundlesSetSource implements BundlesSetSource { case "ssoar.licence.dfg": result = extractBinaryMetadatum(metadatumKey, cell, "true", null); break; case "ssoar.wgl.collection": result = extractBinaryMetadatum(metadatumKey, cell, "true", null); break; case "ssoar.urn.registration": result = extractCleanedMetadatum(metadatumKey, cell); break; case "internal.status": result = extractIntegerMetadatum(metadatumKey, cell); break; default: result = new HashSet<>(); } } Loading Loading @@ -258,8 +259,9 @@ public class SmartExcelSheetBundlesSetSource implements BundlesSetSource { Metadatum metadatum; try { //int intValue = (int) Double.parseDouble(rawValue); int intValue = Integer.parseInt(rawValue.trim()); String intString = Integer.toString(intValue); double dblValue= Double.parseDouble(rawValue.trim()); //int intValue = Integer.parseInt(rawValue.trim()); String intString = Double.toString(dblValue); if (intString.contains(".0")) { intString = intString.replace(".0", ""); } Loading Loading
src/main/java/org/gesis/dda/publishing/domain/impl/ContentResolver.java +8 −7 Original line number Diff line number Diff line Loading @@ -126,13 +126,13 @@ public class ContentResolver { if ( possibleContentType.equals(ContentType.PDF) ) { content = ContentHelpers.getTimeoutBackoffRetryAwareURLInputStream( new URL(url) ); } else if (url.contains("10.1177/")) { // GIGA journals special String sageUrl = url; String sageRedirectURLToPdf = sageUrl.replace("doi/10.1177", "doi/pdf/10.1177").replace("http://", "https://") + "?cookieSet=1"; URL sageURL = new URL(sageRedirectURLToPdf); content = ContentHelpers.getTimeoutBackoffRetryAwareURLInputStream( sageURL ); } // else if (url.contains("10.1177/")) { // // GIGA journals special // String sageUrl = url; // String sageRedirectURLToPdf = sageUrl.replace("doi/10.1177", "doi/pdf/10.1177").replace("http://", "https://") + "?cookieSet=1"; // URL sageURL = new URL(sageRedirectURLToPdf); // content = ContentHelpers.getTimeoutBackoffRetryAwareURLInputStream( sageURL ); // } else if ( possibleContentType.equals(ContentType.HTML) || possibleContentType.equals(ContentType.XHTML) || possibleContentType.equals(ContentType.XML) ) { Loading Loading @@ -297,6 +297,7 @@ public class ContentResolver { String resolvedUrlString = ContentHelpers.resolvePossibleRedirects(urlString); // BEGIN detect content type log.info(""); URL resolvedUrl = new URL(resolvedUrlString); InputStream possibleContent = ContentHelpers.getTimeoutBackoffRetryAwareURLInputStream(resolvedUrl); ContentInfo possibleContentInfo = ContentHelpers.CONTENT_INFO_UTIL.findMatch(possibleContent); Loading
src/main/java/org/gesis/dda/publishing/domain/impl/SmartExcelSheetBundlesSetSource.java +4 −2 Original line number Diff line number Diff line Loading @@ -178,6 +178,7 @@ public class SmartExcelSheetBundlesSetSource implements BundlesSetSource { case "ssoar.licence.dfg": result = extractBinaryMetadatum(metadatumKey, cell, "true", null); break; case "ssoar.wgl.collection": result = extractBinaryMetadatum(metadatumKey, cell, "true", null); break; case "ssoar.urn.registration": result = extractCleanedMetadatum(metadatumKey, cell); break; case "internal.status": result = extractIntegerMetadatum(metadatumKey, cell); break; default: result = new HashSet<>(); } } Loading Loading @@ -258,8 +259,9 @@ public class SmartExcelSheetBundlesSetSource implements BundlesSetSource { Metadatum metadatum; try { //int intValue = (int) Double.parseDouble(rawValue); int intValue = Integer.parseInt(rawValue.trim()); String intString = Integer.toString(intValue); double dblValue= Double.parseDouble(rawValue.trim()); //int intValue = Integer.parseInt(rawValue.trim()); String intString = Double.toString(dblValue); if (intString.contains(".0")) { intString = intString.replace(".0", ""); } Loading