Recent Releases of cessda.cmv.core

cessda.cmv.core - 4.0.0

DOI

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 Node interface
  • Added the ability to cached parsed Document and Profile instances by creating CessdaMetadataValidatorFactory.newDocument() and CessdaMetadataValidatorFactory.newProfile() for common source type
  • Added implementations for equals() and hashCode() for profiles and all constraints
  • Enabled tests for mediatype classes (ValidationRequest and ValidationReport) to ensure that the JSON and XML representations are generated and parsed correctly
  • Added Profile.getProfileName() and Profile.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()
  • Renamed the Node class to NodeImpl
  • 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 DomProfile missing constraints

Removed

  • Removed the ability to use org.gesis.commons.resource.Resource as a source for Document and Profile instances
  • 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

DOI

Added

  • Added semantic equals() and hashcode() methods to MediaType objects

Changed

  • InMemoryAnalysisUnit10ControlledVocabularyRepository and EmptyControlledVocabularyRepository have been refactored to be singletons
  • CessdaControlledVocabularyRepositoryV2 now uses Java URL HTTP methods, removing a dependency on Spring's HTTP client
  • Many instances of unsafe typecasting have been removed
  • The spelling of MinimumElementOccurrenceValidator has 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.V10
    • Document.V10
    • ValidationReport
    • ValidationRequest
  • Interface.Version interfaces have been renamed to Interface. Default methods are the recommended method for extending interfaces. The renamed interfaces are listed below.
    • Constraint.V20Constraint
    • ControlledVocabularyRepository.V11ControlledVocabularyRepository
    • Document.V11Document
    • Validator.V10Validator
    • Profile.V10Profile
  • 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