-
Notifications
You must be signed in to change notification settings - Fork 3
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
Subscribed catalogue support for Atom XML and importing from published URLs #309
Conversation
Failing test on branch and PR builds is not related. |
Compatibility note:
Notes on changes:
|
|
- Fetch bytes from URLs in FederationClient - Update federation in SubscribedModelService - Update Mauro MIME types to specify domain types
- Allow federating MdmDomains instead of Models to allow future importing of VersionedFolders as well as CatalogueItems.
- Add params to allow specifying which link to subscribe to and which importer service to use - Replace save method with federate method
- Remove title field from PublishedModel as title from non-Mauro catalogues can't be parsed; use label instead - Update Publish, SubscribedCatalogue, SubscribedModel and Feed functional tests
- Add Atom tests to SubscribedCatalogue and SubscribedModel functional tests - Add tests for subscribed catalogues types endpoint
- Replace getFileType with getContentType using custom Mauro MIME types e.g. application/mauro.datamodel+json - Also replace getProducesContentType with getContentType
…cence headers - Update SubscribedModelFunctionalSpec tests to connect to the Continuous Deployment instance, requiring a recent version - Add missing licence headers - Fix typos in DataModelFunctionalSpec, ImporterProviderServiceData
- Add test for optional federation params in SubscribedModelFunctionalSpec - Update SubscribedModelFunctionalSpec IDs to match continuous deployment server
9672d6a
to
ffde856
Compare
…rences in DomainExport with contentType
ffde856
to
25f4dcd
Compare
- Replace application/mdm+json with application/mauro.<modeltype>+json - Remove fileType from DomainExportFunctionalSpec JSON - replaced with contentType
Failing test is passing locally and looks unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest adding a public static final CONTENT_TYPE = ''
to each exporter service, and then having the getContentType() method returning this variable, then in the importer services you have the handlesContentType check against that variable, that way if we want to change the content type we only have to do it in 1 place and it applies across all things that use it. It also means if we have a importer which handles multiple types they can check a list of psf variables
See the other comments and questions
...roovy/uk/ac/ox/softeng/maurodatamapper/core/traits/provider/importer/XmlImportMapping.groovy
Outdated
Show resolved
Hide resolved
...ls/uk/ac/ox/softeng/maurodatamapper/federation/converter/SubscribedCatalogueConverter.groovy
Outdated
Show resolved
Hide resolved
...rails-app/services/uk/ac/ox/softeng/maurodatamapper/federation/SubscribedModelService.groovy
Show resolved
Hide resolved
...app/controllers/uk/ac/ox/softeng/maurodatamapper/federation/SubscribedModelController.groovy
Show resolved
Hide resolved
...eration/grails-app/domain/uk/ac/ox/softeng/maurodatamapper/federation/SubscribedModel.groovy
Outdated
Show resolved
Hide resolved
...eration/grails-app/domain/uk/ac/ox/softeng/maurodatamapper/federation/SubscribedModel.groovy
Show resolved
Hide resolved
...s-app/services/uk/ac/ox/softeng/maurodatamapper/federation/SubscribedCatalogueService.groovy
Show resolved
Hide resolved
4dd7752
to
fe5578a
Compare
- Add ImporterProviderService.CONTENT_TYPE static strings - Revert XmlImportMapping changes - Change SubscribedCatalogueConverter interface to trait - Use command object validation in SubscribedModelController::federate - Add dynamic check on type of imported domain in SubscribedModelService::federateSubscribedModel Also: - Add migration for replacing DomainExport exportFileType with exportContentType
fe5578a
to
0f59b2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just the one question about the validation
Add support for subscribing to Atom XML feeds as subscribed catalogues, and to the Mauro JSON format published in PR #309:
Mauro JSON
orAtom
) and for Atom feeds, store the whole URL to the Atom XML feed. Convert from JSON or Atom formats to published model list in the local catalogue. (mc-9833)save
method withfederate
. Add parameters (which are not saved) to optionally specify which URL, content type, and/or ImporterProviderService to use when federating the model. Check to ensure the specified URL is published in the Subscribed Catalogue. (mc-9834)getFileType
andgetProducesContentType
methods in ExporterProviderService togetContentType
. (mc-9835)