@Test public void convert_with_undefined_language() throws IOException { Publication publication = minimalEntityBuilder(ID, InfoSpaceConstants.SEMANTIC_CLASS_INSTANCE_TYPE_ARTICLE); setLanguage(publication, "und"); DocumentMetadata metadata = converter.convert(publication); assertEquals(null, metadata.getLanguage()); }
@Override public DocumentMetadata convert(Result result) throws IOException { Preconditions.checkNotNull(result); DocumentMetadata.Builder builder = DocumentMetadata.newBuilder(); builder.setId(result.getId()); createBasicMetadata(result, builder); handleAdditionalIds(result, builder); handleDatasourceIds(result, builder); handlePersons(result, builder); return builder.build(); }
DocumentMetadataConverter implements OafEntityToAvroConverter<Result, DocumentMetadata> { @Override public DocumentMetadata convert(Result result) throws IOException { Preconditions.checkNotNull(result); DocumentMetadata.Builder builder = DocumentMetadata.newBuilder(); builder.setId(result.getId()); createBasicMetadata(result, builder); handleAdditionalIds(result, builder); handleDatasourceIds(result, builder); handlePersons(result, builder); return builder.build(); } }
DocumentMetadataConverter implements OafEntityToAvroConverter<Result, DocumentMetadata> { @Override public DocumentMetadata convert(Result result) throws IOException { Preconditions.checkNotNull(result); DocumentMetadata.Builder builder = DocumentMetadata.newBuilder(); builder.setId(result.getId()); createBasicMetadata(result, builder); handleAdditionalIds(result, builder); handleDatasourceIds(result, builder); handlePersons(result, builder); return builder.build(); } DocumentMetadataConverter(FieldApprover fieldApprover); }
DocumentMetadataConverter implements OafEntityToAvroConverter<Result, DocumentMetadata> { @Override public DocumentMetadata convert(Result result) throws IOException { Preconditions.checkNotNull(result); DocumentMetadata.Builder builder = DocumentMetadata.newBuilder(); builder.setId(result.getId()); createBasicMetadata(result, builder); handleAdditionalIds(result, builder); handleDatasourceIds(result, builder); handlePersons(result, builder); return builder.build(); } DocumentMetadataConverter(FieldApprover fieldApprover); @Override DocumentMetadata convert(Result result); }
DocumentMetadataConverter implements OafEntityToAvroConverter<Result, DocumentMetadata> { @Override public DocumentMetadata convert(Result result) throws IOException { Preconditions.checkNotNull(result); DocumentMetadata.Builder builder = DocumentMetadata.newBuilder(); builder.setId(result.getId()); createBasicMetadata(result, builder); handleAdditionalIds(result, builder); handleDatasourceIds(result, builder); handlePersons(result, builder); return builder.build(); } DocumentMetadataConverter(FieldApprover fieldApprover); @Override DocumentMetadata convert(Result result);  }