Recent Releases of cessda.cmv.core
cessda.cmv.core - 4.0.0
Migration Notes
Due to changes in XML namespace support previous DDI profiles will validate differently. For correct validation, use the following profiles:
- CDC DDI 2.5 profiles - use version 3.0.0 or newer
- CDC DDI 2.6 profiles - use version 2.0.0 or newer
- CDC DDI 3.2 profile - use version 2.0.0 or newer
- CDC DDI 3.3 profile - use version 2.0.0 or newer
- EQB DDI 2.5 profile - use version 1.0.0 or newer
Built-in profiles have been updated accordingly.
Breaking Changes
Before prefixes were not treated separately from the rest of the element's name. Now prefixes are mapped onto namespaces using the mappings defined in the profile.
Prefix-to-namespace mapping is extracted from the DDI profile using XMLPrefixMap elements.
xml
<pr:DDIProfile xmlns:pr="ddi:ddiprofile:3_2">
...
<pr:XMLPrefixMap>
<pr:XMLPrefix>ddi</pr:XMLPrefix>
<pr:XMLNamespace>ddi:codebook:2_5</pr:XMLNamespace>
</pr:XMLPrefixMap>
...
</pr:DDIProfile>
Referencing elements in XPaths that don't have a namespace prefix (e.g. /element) always refers to the empty namespace "". Attempting to map such a prefix will have no effect. This is a limitation of the XPath 1.0 specification.
The JAXBProfile serialisations and corresponding schemas have been updated.
xml
<Profile xmlns="cmv:profile:v0">
...
<PrefixMaps>
<PrefixMap>
<Prefix>ddi</Prefix>
<Namespace>ddi:codebook:2_5</Namespace>
</PrefixMap>
<PrefixMap>
<Prefix>xsi</Prefix>
<Namespace>http://www.w3.org/2001/XMLSchema-instance</Namespace>
</PrefixMap>
</PrefixMaps>
...
</Profile>
Full Changelog: https://github.com/cessda/cessda.cmv.core/compare/3.0.0...4.0.0
- Java
Published by matthew-morris-cessda about 1 year ago
cessda.cmv.core - 3.0.0
Migration Notes
Because org.gesis.commons.resource.Resource can no longer be used as a source for Document and Profile instances, uses of these must be migrated to use another type.
Applications must provide their own SLF4J implementation for logging to work properly. A warning message will be printed if no SLF4J implementation is found.
Added
- Added a public
Nodeinterface - Added the ability to cached parsed
DocumentandProfileinstances by creatingCessdaMetadataValidatorFactory.newDocument()andCessdaMetadataValidatorFactory.newProfile()for common source type - Added implementations for
equals()andhashCode()for profiles and all constraints - Enabled tests for mediatype classes (
ValidationRequestandValidationReport) to ensure that the JSON and XML representations are generated and parsed correctly - Added
Profile.getProfileName()andProfile.getProfileVersion()so that the name and version of a profile can be programatically retrieved
Changed
- Refactored
ConstraintViolation.getMessage()to only return the message without location information- The previous behaviour has been moved to
ConstraintViolation.toString()
- The previous behaviour has been moved to
- Renamed the
Nodeclass toNodeImpl - Optimise parsing documents that are wrapped in an OAI-PMH wrapper by avoiding serializing and parsing the contents of the
<metadata>element
Fixed
- Fixed missing constraints when using
DomSemiStructuredDdiProfile.toJaxbProfile() - Fixed incomplete parsing of
eu.cessda.cmv.core.mediatype.profile.Profile - Fixed
DomProfilemissing constraints
Removed
- Removed the ability to use
org.gesis.commons.resource.Resourceas a source forDocumentandProfileinstances - Removed
ProfileResourceLabelProvider - Removed the direct dependency on Logback
Full Changelog: https://github.com/cessda/cessda.cmv.core/compare/2.0.0...3.0.0
- Java
Published by matthew-morris-cessda almost 2 years ago
cessda.cmv.core - 2.0.0
Added
- Added semantic
equals()andhashcode()methods to MediaType objects
Changed
InMemoryAnalysisUnit10ControlledVocabularyRepositoryandEmptyControlledVocabularyRepositoryhave been refactored to be singletonsCessdaControlledVocabularyRepositoryV2now uses Java URL HTTP methods, removing a dependency on Spring's HTTP client- Many instances of unsafe typecasting have been removed
- The spelling of
MinimumElementOccurrenceValidatorhas been corrected
Removed
- Deprecated public constructors for the various validation gates are now package-private. Accessing the gates from the enum is the only way for API consumers to retrieve them.
- Empty interfaces have been removed, as an interface with no methods isn't particularly useful. The removed interfaces are listed below.
Constraint.V10Document.V10ValidationReportValidationRequest
Interface.Versioninterfaces have been renamed toInterface. Default methods are the recommended method for extending interfaces. The renamed interfaces are listed below.Constraint.V20→ConstraintControlledVocabularyRepository.V11→ControlledVocabularyRepositoryDocument.V11→DocumentValidator.V10→ValidatorProfile.V10→Profile
- Removed redundant class
ControlledVocabularyRepositoryProxy
New Contributors
- @Joshocan made their first contribution in https://github.com/cessda/cessda.cmv.core/pull/157
Full Changelog: https://github.com/cessda/cessda.cmv.core/compare/1.1.0...2.0.0
- Java
Published by matthew-morris-cessda over 2 years ago
cessda.cmv.core - 1.1.0
What's Changed
- Add an API to allow users to define custom validation gates by @matthew-morris-cessda in https://github.com/cessda/cessda.cmv.core/pull/121
Dependency updates
- Bump maven-javadoc-plugin from 3.4.1 to 3.5.0 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/120
- Bump jackson-bom from 2.14.1 to 2.14.2 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/116
- Bump dependency-check-maven from 7.4.4 to 8.1.0 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/119
- Bump commons-test from 0.12.0 to 0.15.0 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/122
- Bump maven-compiler-plugin from 3.10.1 to 3.11.0 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/124
- Bump dependency-check-maven from 8.1.0 to 8.1.2 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/125
- Add the ability to specify a list of constraints to a validation request by @matthew-morris-cessda in https://github.com/cessda/cessda.cmv.core/pull/126
- Bump maven-surefire-plugin from 2.22.2 to 3.0.0 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/129
- Bump commons-test from 0.15.0 to 0.15.1 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/128
- Bump commons-xml from 5.7.0 to 5.7.1 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/127
- Bump dependency-check-maven from 8.1.2 to 8.2.1 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/134
- Bump swagger-annotations from 2.2.8 to 2.2.9 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/133
- Bump maven-resources-plugin from 3.3.0 to 3.3.1 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/132
- Bump json-path from 2.7.0 to 2.8.0 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/131
- Bump maven-release-plugin from 2.5.3 to 3.0.0 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/130
- Bump jackson-bom from 2.14.2 to 2.15.0 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/136
- Bump jacoco-maven-plugin from 0.8.8 to 0.8.9 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/135
- Bump maven-surefire-plugin from 3.0.0 to 3.1.0 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/138
- Bump license-maven-plugin from 2.0.0 to 2.0.1 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/139
- Bump jacoco-maven-plugin from 0.8.9 to 0.8.10 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/137
- Bump swagger-annotations from 2.2.9 to 2.2.10 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/140
- Bump jackson-bom from 2.15.0 to 2.15.1 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/141
- Bump maven-source-plugin from 3.2.1 to 3.3.0 by @dependabot in https://github.com/cessda/cessda.cmv.core/pull/142
Full Changelog: https://github.com/cessda/cessda.cmv.core/compare/v1.0.0...1.1.0
- Java
Published by matthew-morris-cessda almost 3 years ago
cessda.cmv.core - v1.0.0
What's Changed
- Update the README with the GitHub URL, add the Maven wrapper by @matthew-morris-cessda in https://github.com/cessda/cessda.cmv.core/pull/98
- Fix failures on Windows due to differences in platform string conventions by @matthew-morris-cessda in https://github.com/cessda/cessda.cmv.core/pull/104
- 107 replace references to bitbucket by @john-shepherdson in https://github.com/cessda/cessda.cmv.core/pull/108
- 106 improve SQAaaS score by @john-shepherdson in https://github.com/cessda/cessda.cmv.core/pull/109
- #106 Improve SQAaaS score by @john-shepherdson in https://github.com/cessda/cessda.cmv.core/pull/114
Full Changelog: https://github.com/cessda/cessda.cmv.core/compare/v0.4.2...v1.0.0
- Java
Published by matthew-morris-cessda about 3 years ago