Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dda-wizard
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
44
Issues
44
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
DDA
dda-wizard
Commits
10694611
Commit
10694611
authored
Mar 16, 2020
by
Steinberg, Jan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new integer value extraction process
parent
bfd8acb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
ContentResolver.java
...org/gesis/dda/publishing/domain/impl/ContentResolver.java
+8
-7
SmartExcelSheetBundlesSetSource.java
...blishing/domain/impl/SmartExcelSheetBundlesSetSource.java
+4
-2
No files found.
src/main/java/org/gesis/dda/publishing/domain/impl/ContentResolver.java
View file @
10694611
...
...
@@ -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
)
)
{
...
...
@@ -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
);
...
...
src/main/java/org/gesis/dda/publishing/domain/impl/SmartExcelSheetBundlesSetSource.java
View file @
10694611
...
...
@@ -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
<>();
}
}
...
...
@@ -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"
,
""
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment