Esempio n. 1
0
 private static String dto2title(DatasetVersionDTO datasetVersionDTO) {
   for (Map.Entry<String, MetadataBlockDTO> entry :
       datasetVersionDTO.getMetadataBlocks().entrySet()) {
     String key = entry.getKey();
     MetadataBlockDTO value = entry.getValue();
     if ("citation".equals(key)) {
       for (FieldDTO fieldDTO : value.getFields()) {
         if (DatasetFieldConstant.title.equals(fieldDTO.getTypeName())) {
           return fieldDTO.getSinglePrimitive();
         }
       }
     }
   }
   return null;
 }
Esempio n. 2
0
 private static String dto2authors(DatasetVersionDTO datasetVersionDTO) {
   for (Map.Entry<String, MetadataBlockDTO> entry :
       datasetVersionDTO.getMetadataBlocks().entrySet()) {
     String key = entry.getKey();
     MetadataBlockDTO value = entry.getValue();
     if ("citation".equals(key)) {
       for (FieldDTO fieldDTO : value.getFields()) {
         if (DatasetFieldConstant.author.equals(fieldDTO.getTypeName())) {
           for (HashSet<FieldDTO> foo : fieldDTO.getMultipleCompound()) {
             for (Iterator<FieldDTO> iterator = foo.iterator(); iterator.hasNext(); ) {
               FieldDTO next = iterator.next();
               if (DatasetFieldConstant.authorName.equals(next.getTypeName())) {
                 return next.getSinglePrimitive();
               }
             }
           }
         }
       }
     }
   }
   return null;
 }