Closed brunopacheco1 closed 3 weeks ago
This PR adds language resource support to the data model and mapping functionality. The changes include updating OpenAPI specifications to include language fields, enhancing the data mapping logic, and updating tests to cover the new language-related functionality.
erDiagram
CkanValueLabel {
string displayName
string name
}
ValueLabel {
string value
string label
}
CkanResource {
string id
string name
string modified_date
array language
}
CkanResource ||--o{ CkanValueLabel : has
Distribution {
string id
string title
string modified_at
array languages
}
Distribution ||--o{ ValueLabel : has
classDiagram
class PackageShowMapper {
+RetrievedDistribution distribution(CkanResource ckanResource)
}
class RetrievedDistribution {
+OffsetDateTime modifiedAt
+String accessUrl
+String downloadUrl
+List~CkanValueLabel~ languages
}
class CkanResource {
+String modifiedDate
+String accessUrl
+String downloadUrl
+List~CkanValueLabel~ language
}
class CkanValueLabelParser {
+List~CkanValueLabel~ values(List~CkanValueLabel~ language)
}
PackageShowMapper --> RetrievedDistribution
RetrievedDistribution --> CkanValueLabel
CkanResource --> CkanValueLabel
PackageShowMapper --> CkanValueLabelParser
Change | Details | Files |
---|---|---|
Added language support in OpenAPI specifications |
|
src/main/openapi/ckan.yaml src/main/openapi/discovery.yaml |
Enhanced data mapping functionality for language resources |
|
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/utils/PackageShowMapper.java src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/utils/CkanDatetimeParser.java |
Updated test cases to include language resource testing |
|
src/test/java/io/github/genomicdatainfrastructure/discovery/services/PackageShowMapperTest.java |
Summary by Sourcery
Introduce language resource support in the PackageShowMapper and update OpenAPI specifications to handle multilingual data. Enhance tests to ensure correct parsing of language information.
New Features:
Enhancements:
Tests: