forked from D-Net/dnet-hadoop
fixed NPE
This commit is contained in:
parent
bc342bf73a
commit
5d0f46651b
|
@ -34,7 +34,9 @@ public class ScholixResource implements Serializable {
|
||||||
|
|
||||||
resource.setObjectType(summary.getTypology().toString());
|
resource.setObjectType(summary.getTypology().toString());
|
||||||
|
|
||||||
resource.setTitle(summary.getTitle().stream().findAny().orElse(null));
|
|
||||||
|
if (summary.getTitle() != null)
|
||||||
|
resource.setTitle(summary.getTitle().stream().findAny().orElse(null));
|
||||||
|
|
||||||
if (summary.getAuthor() != null)
|
if (summary.getAuthor() != null)
|
||||||
resource.setCreator(summary.getAuthor().stream()
|
resource.setCreator(summary.getAuthor().stream()
|
||||||
|
@ -53,8 +55,8 @@ public class ScholixResource implements Serializable {
|
||||||
resource.setCollectedFrom(summary.getDatasources().stream()
|
resource.setCollectedFrom(summary.getDatasources().stream()
|
||||||
.map(d ->
|
.map(d ->
|
||||||
new ScholixCollectedFrom(new ScholixEntityId(d.getDatasourceName(),
|
new ScholixCollectedFrom(new ScholixEntityId(d.getDatasourceName(),
|
||||||
Collections.singletonList(new ScholixIdentifier(d.getDatasourceId(), "dnet_identifier"))
|
Collections.singletonList(new ScholixIdentifier(d.getDatasourceId(), "dnet_identifier"))
|
||||||
), "collected", d.getCompletionStatus()))
|
), "collected", d.getCompletionStatus()))
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
return resource;
|
return resource;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
||||||
<start to="generateSummary"/>
|
<start to="generateScholix"/>
|
||||||
|
|
||||||
<kill name="Kill">
|
<kill name="Kill">
|
||||||
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
<arg>--workingDirPath</arg><arg>${workingDirPath}</arg>
|
<arg>--workingDirPath</arg><arg>${workingDirPath}</arg>
|
||||||
<arg>--graphPath</arg><arg>${graphPath}</arg>
|
<arg>--graphPath</arg><arg>${graphPath}</arg>
|
||||||
</spark>
|
</spark>
|
||||||
<ok to="generateScholix"/>
|
<ok to="indexSummary"/>
|
||||||
<error to="Kill"/>
|
<error to="Kill"/>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue