Revision 49184
Added by Sandro La Bruzzo over 6 years ago
DNGFDLISummaryConverter.java | ||
---|---|---|
47 | 47 |
} |
48 | 48 |
|
49 | 49 |
public String convertAsJson() { |
50 |
return JsonFormat.printToString(convert()); |
|
50 |
final DLIObjectSummary convert = convert(); |
|
51 |
if (convert != null) |
|
52 |
return JsonFormat.printToString(convert); |
|
53 |
return null; |
|
51 | 54 |
} |
52 | 55 |
|
53 | 56 |
public DLIObjectSummary convert() { |
... | ... | |
61 | 64 |
summary.setId(entity.getId()); |
62 | 65 |
final List<FieldTypeProtos.StructuredProperty> identifiers = entity.getExtension(DliProtos.typedIdentifier); |
63 | 66 |
if (identifiers == null || identifiers.isEmpty()) { |
64 |
throw new IllegalStateException(String.format("missing typedIdentifiers on main Entity \n%s", entity)); |
|
65 |
|
|
67 |
this.mainDNGFEntity = null; |
|
68 |
return null; |
|
69 |
// throw new IllegalStateException(String.format("missing typedIdentifiers on main Entity \n%s", entity)); |
|
66 | 70 |
} |
67 | 71 |
|
68 | 72 |
//ADD ALL IDENTIFIERS |
Also available in: Unified diff
Refactored Pid resolver