Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/5972 index downloaded data #162

Merged
merged 16 commits into from
Oct 29, 2024
Merged

Conversation

HavierD
Copy link
Contributor

@HavierD HavierD commented Oct 29, 2024

Doesn't include "indexAll" api yet;
Doesn't have unit tests for new added features yet;

@HavierD HavierD marked this pull request as draft October 29, 2024 00:27
@HavierD HavierD marked this pull request as ready for review October 29, 2024 03:16
@HavierD HavierD requested a review from vietnguyengit October 29, 2024 03:23
Copy link
Contributor

@vietnguyengit vietnguyengit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just naming changes overall, the choice of changes are up to you, must make sure the convention is consistent and clear and be less varied.

@@ -2,6 +2,7 @@

public interface AppConstants {
String PORTAL_RECORDS_MAPPING_JSON_FILE = "portal_records_index_schema.json";
String DTASET_INDEX_MAPPING_JSON_FILE = "dataset_index_schema.json";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling dtaser

@Configuration
public class DatasetAccessConfig {

@Bean(name = "DatasetAccessService")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repo is data-access-service, maybe you call it the same way, DataAccessService, be less varied in names.

public class DatasetAccessConfig {

@Bean(name = "DatasetAccessService")
public DatasetAccessServiceImpl createDatasetAccessService(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, dataset to data.


@Bean(name = "DatasetAccessService")
public DatasetAccessServiceImpl createDatasetAccessService(
@Value("${dataaccess.host:defaulthost}") String serverUrl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataAccessSevice.host.default

Host then also defaultHost, not necessary

@@ -33,6 +38,9 @@ public class IndexerController {
@Autowired
GeoNetworkService geonetworkResourceService;

@Autowired
DatasetAccessService datasetAccessService;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataAccessService


import java.time.LocalDate;

public interface DatasetAccessService {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DataAccessService

// TODO: if more fields are needed to be filtered, please add more columns here
@Getter
@Setter
public class DataRecord{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they all need to reconsider a clearer and consistent name, to be less confusing,

As is growing, the terms
: data record, metadata record, data, dataset etc.

What are they? Are they the same thing or different?

.buildAndExpand(uuid)
.toUriString();

ResponseEntity<DataRecord[]> responseEntity = restTemplate.exchange(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DataRecord is a Dto? Then you should rename the model class to make it clear, with Dto postfix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get....Dto, eg GetDataRecordDto

Create....Dto, e.g CreateDataRecordDto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, it is not a standard DTO. Maybe i should rename DataRecord into AggregatedDatum, to express it is a single datum of a dataset with aggregated count

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe just Datum?

@HavierD HavierD requested a review from vietnguyengit October 29, 2024 04:35
@HavierD HavierD merged commit 9ca28d4 into main Oct 29, 2024
2 checks passed
@HavierD HavierD deleted the feature/5972-index-downloaded-data branch October 29, 2024 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants