@Test(expected=NullPointerException.class) public void convert_null_oafEntity() { converter.convert(null); }
@Override public DataSetReference convert(Result dataset) { Objects.requireNonNull(dataset); DataSetReference.Builder builder = DataSetReference.newBuilder(); builder.setId(dataset.getId()); createBasicMetadata(dataset, builder); handleAdditionalIds(dataset, builder); handlePersons(dataset, builder); if (builder.getReferenceType() == null) { builder.setReferenceType(REFERENCE_TYPE_UNSPECIFIED); } if (builder.getIdForGivenType() == null) { builder.setIdForGivenType(""); } return builder.build(); }
DatasetMetadataConverter implements OafEntityToAvroConverter<Result, DataSetReference> { @Override public DataSetReference convert(Result dataset) { Objects.requireNonNull(dataset); DataSetReference.Builder builder = DataSetReference.newBuilder(); builder.setId(dataset.getId()); createBasicMetadata(dataset, builder); handleAdditionalIds(dataset, builder); handlePersons(dataset, builder); if (builder.getReferenceType() == null) { builder.setReferenceType(REFERENCE_TYPE_UNSPECIFIED); } if (builder.getIdForGivenType() == null) { builder.setIdForGivenType(""); } return builder.build(); } }
DatasetMetadataConverter implements OafEntityToAvroConverter<Result, DataSetReference> { @Override public DataSetReference convert(Result dataset) { Objects.requireNonNull(dataset); DataSetReference.Builder builder = DataSetReference.newBuilder(); builder.setId(dataset.getId()); createBasicMetadata(dataset, builder); handleAdditionalIds(dataset, builder); handlePersons(dataset, builder); if (builder.getReferenceType() == null) { builder.setReferenceType(REFERENCE_TYPE_UNSPECIFIED); } if (builder.getIdForGivenType() == null) { builder.setIdForGivenType(""); } return builder.build(); } DatasetMetadataConverter(FieldApprover fieldApprover); }
DatasetMetadataConverter implements OafEntityToAvroConverter<Result, DataSetReference> { @Override public DataSetReference convert(Result dataset) { Objects.requireNonNull(dataset); DataSetReference.Builder builder = DataSetReference.newBuilder(); builder.setId(dataset.getId()); createBasicMetadata(dataset, builder); handleAdditionalIds(dataset, builder); handlePersons(dataset, builder); if (builder.getReferenceType() == null) { builder.setReferenceType(REFERENCE_TYPE_UNSPECIFIED); } if (builder.getIdForGivenType() == null) { builder.setIdForGivenType(""); } return builder.build(); } DatasetMetadataConverter(FieldApprover fieldApprover); @Override DataSetReference convert(Result dataset); }
DatasetMetadataConverter implements OafEntityToAvroConverter<Result, DataSetReference> { @Override public DataSetReference convert(Result dataset) { Objects.requireNonNull(dataset); DataSetReference.Builder builder = DataSetReference.newBuilder(); builder.setId(dataset.getId()); createBasicMetadata(dataset, builder); handleAdditionalIds(dataset, builder); handlePersons(dataset, builder); if (builder.getReferenceType() == null) { builder.setReferenceType(REFERENCE_TYPE_UNSPECIFIED); } if (builder.getIdForGivenType() == null) { builder.setIdForGivenType(""); } return builder.build(); } DatasetMetadataConverter(FieldApprover fieldApprover); @Override DataSetReference convert(Result dataset);  }