@Test public void convert_NULL_REFERENCES_EXTERNAL_IDS() { ExtractedDocumentMetadataMergedWithOriginal docMetadata = baseDocMetadataBuilder .setReferences(Lists.newArrayList(buildReferenceMetadata(24, null))) .build(); DocumentMetadata retDocDirectCitationMetadata = converter.convert(docMetadata); DocumentMetadata expectedDocDirectCitationMetadata = baseDocDirectCitationMetadataBuilder .setReferences(Lists.newArrayList()) .build(); assertEquals(expectedDocDirectCitationMetadata, retDocDirectCitationMetadata); }
public DocumentMetadata convert(ExtractedDocumentMetadataMergedWithOriginal document) { Preconditions.checkNotNull(document); List<ReferenceMetadata> citationReferencesMetadata = convertReferences(document.getReferences()); return new DocumentMetadata(document.getId(), document.getExternalIdentifiers(), document.getPublicationTypeName(), citationReferencesMetadata); }
DocumentToDirectCitationMetadataConverter implements Serializable { public DocumentMetadata convert(ExtractedDocumentMetadataMergedWithOriginal document) { Preconditions.checkNotNull(document); List<ReferenceMetadata> citationReferencesMetadata = convertReferences(document.getReferences()); return new DocumentMetadata(document.getId(), document.getExternalIdentifiers(), document.getPublicationTypeName(), citationReferencesMetadata); } }
DocumentToDirectCitationMetadataConverter implements Serializable { public DocumentMetadata convert(ExtractedDocumentMetadataMergedWithOriginal document) { Preconditions.checkNotNull(document); List<ReferenceMetadata> citationReferencesMetadata = convertReferences(document.getReferences()); return new DocumentMetadata(document.getId(), document.getExternalIdentifiers(), document.getPublicationTypeName(), citationReferencesMetadata); }  }
DocumentToDirectCitationMetadataConverter implements Serializable { public DocumentMetadata convert(ExtractedDocumentMetadataMergedWithOriginal document) { Preconditions.checkNotNull(document); List<ReferenceMetadata> citationReferencesMetadata = convertReferences(document.getReferences()); return new DocumentMetadata(document.getId(), document.getExternalIdentifiers(), document.getPublicationTypeName(), citationReferencesMetadata); }  DocumentMetadata convert(ExtractedDocumentMetadataMergedWithOriginal document); }
DocumentToDirectCitationMetadataConverter implements Serializable { public DocumentMetadata convert(ExtractedDocumentMetadataMergedWithOriginal document) { Preconditions.checkNotNull(document); List<ReferenceMetadata> citationReferencesMetadata = convertReferences(document.getReferences()); return new DocumentMetadata(document.getId(), document.getExternalIdentifiers(), document.getPublicationTypeName(), citationReferencesMetadata); }  DocumentMetadata convert(ExtractedDocumentMetadataMergedWithOriginal document);  }