package de.ddb.pdc.metadata;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;

@JsonIgnoreProperties(ignoreUnknown = true)
class EntitiesResult {

  @JsonProperty
  private ArrayList<EntitiesResultList> results;

  public EntitiesResultItem getResultItem() {
    return results.get(0).getDocs().get(0);
  }
}

@@ -349,16 +349,122 @@
 tem() %7B%0A
+%0A    if (results.size() == 0 %7C%7C results.get(0).getDocs().size() == 0) %7B%0A      return null;%0A    %7D else %7B%0A  
     retu
@@ -499,14 +499,20 @@
 get(0);%0A
+    %7D%0A
   %7D%0A%7D%0A

check if size == 0, return null