From a8b126b65c6059f418e6ce971c3ef5b473384e25 Mon Sep 17 00:00:00 2001 From: Twan Goosen Date: Tue, 24 Nov 2020 11:18:07 +0100 Subject: [PATCH] using new dev version of cmdi toolkit. Refs #58 --- ComponentRegistry/pom.xml | 2 +- .../componentregistry/JAXBContextResolver.java | 3 ++- ComponentRegistry/src/main/sql/sample-data.sql | 18 +++++++++--------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ComponentRegistry/pom.xml b/ComponentRegistry/pom.xml index a2bc8d23..2d43d1d5 100644 --- a/ComponentRegistry/pom.xml +++ b/ComponentRegistry/pom.xml @@ -36,7 +36,7 @@ https://openskos.meertens.knaw.nl/ccr/api/ https://vocabularies.clarin.eu/clavas/public/api/ - 1.2.3 + 1.2.4-SNAPSHOT 5.2.11.RELEASE 8.11.0 2.11.3 diff --git a/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/JAXBContextResolver.java b/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/JAXBContextResolver.java index b42cbc9d..ed1dd364 100644 --- a/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/JAXBContextResolver.java +++ b/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/JAXBContextResolver.java @@ -22,6 +22,7 @@ import com.google.common.collect.ImmutableMap; import com.sun.jersey.api.json.JSONConfiguration; import com.sun.jersey.api.json.JSONJAXBContext; +import eu.clarin.cmdi.CmdNamespaces; import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; import javax.xml.bind.JAXBContext; @@ -56,7 +57,7 @@ public JAXBContext getContext(Class objectType) { public final static JSONConfiguration jsonConfiguration() { final ImmutableMap namespacesMap = ImmutableMap.builder() - .put("http://www.clarin.eu/cmdi/cues/1", "cue") + .put(CmdNamespaces.CMD_SPEC_CUES_NS, "cue") .build(); final JSONConfiguration jsonConfiguration = JSONConfiguration.mapped() .xml2JsonNs(namespacesMap) diff --git a/ComponentRegistry/src/main/sql/sample-data.sql b/ComponentRegistry/src/main/sql/sample-data.sql index 01a20175..5e1583b6 100644 --- a/ComponentRegistry/src/main/sql/sample-data.sql +++ b/ComponentRegistry/src/main/sql/sample-data.sql @@ -30,17 +30,17 @@ COPY registry_user (id, name, principal_name) FROM stdin; -- COPY basedescription (id, user_id, is_public, is_deleted, component_id, name, description, registration_date, creator_name, domain_name, group_name, href, show_in_editor, content, status, derivedfrom, successor) FROM stdin; -3 1 t f clarin.eu:cr1:p_1512739327528 ExampleProfile Example profile referencing some components 2017-12-08 13:27:26.017+00 admin example \N t \n\n
\n clarin.eu:cr1:p_1512739327528\n ExampleProfile\n Example profile referencing some components\n production\n
\n \n \n First element at profile root level\n \n \n \n \n \n \n
\n 1 \N \N -1 1 t f clarin.eu:cr1:c_1512739327526 StandaloneSampleComponent For testing purposes. Component that does not reference other components 2017-12-08 13:27:08.822+00 admin example \N t \n\n
\n clarin.eu:cr1:c_1512739327526\n StandaloneSampleComponent\n For testing purposes. Component that does not reference other components\n production\n
\n \n \n Test element\n \n \n Another test element, with an attribute\n \n \n An optional attribute on an element\n \n \n \n \n First child component\n \n \n Mandatory attribute on a component\n \n \n \n \n
\n 1 \N \N +3 1 t f clarin.eu:cr1:p_1512739327528 ExampleProfile Example profile referencing some components 2017-12-08 13:27:26.017+00 admin example \N t \n\n
\n clarin.eu:cr1:p_1512739327528\n ExampleProfile\n Example profile referencing some components\n production\n
\n \n \n First element at profile root level\n \n \n \n \n \n \n
\n 1 \N \N +1 1 t f clarin.eu:cr1:c_1512739327526 StandaloneSampleComponent For testing purposes. Component that does not reference other components 2017-12-08 13:27:08.822+00 admin example \N t \n\n
\n clarin.eu:cr1:c_1512739327526\n StandaloneSampleComponent\n For testing purposes. Component that does not reference other components\n production\n
\n \n \n Test element\n \n \n Another test element, with an attribute\n \n \n An optional attribute on an element\n \n \n \n \n First child component\n \n \n Mandatory attribute on a component\n \n \n \n \n
\n 1 \N \N 2 1 t f clarin.eu:cr1:c_1512739327527 WrappingExampleComponent Component referencing another component 2017-12-08 13:27:16.803+00 admin example \N t \n\n
\n clarin.eu:cr1:c_1512739327527\n WrappingExampleComponent\n Component referencing another component\n production\n
\n \n \n \n Inline child component referencing another component\n \n \n \n
\n 1 \N \N -6 1 f f clarin.eu:cr1:p_1512740341364 MyExampleProfile Example profile referencing some components 2017-12-08 13:40:39.275+00 admin example \N t \n\n
\n clarin.eu:cr1:p_1512740341364\n MyExampleProfile\n Example profile referencing some components\n development\n clarin.eu:cr1:p_1512739327528\n
\n \n \n First element at profile root level\n \n \n \n \n \n \n
\n 0 clarin.eu:cr1:p_1512739327528 \N -8 1 t f clarin.eu:cr1:p_1512740341366 DraftExampleProfile Example profile referencing some components 2017-12-08 13:46:50.651+00 admin example \N t \n\n
\n clarin.eu:cr1:p_1512740341366\n DraftExampleProfile\n Example profile referencing some components\n development\n clarin.eu:cr1:p_1512740341364\n
\n \n \n First element at profile root level\n \n \n \n \n \n \n
\n 0 clarin.eu:cr1:p_1512740341364 \N -7 1 t f clarin.eu:cr1:c_1512740341365 DraftStandaloneComponent For testing purposes. Draft component that does not reference other components 2017-12-08 13:46:30.536+00 admin example \N t \n\n
\n clarin.eu:cr1:c_1512740341365\n DraftStandaloneComponent\n For testing purposes. Draft component that does not reference other components\n development\n clarin.eu:cr1:c_1512740341362\n
\n \n \n Test element\n \n \n Another test element, with an attribute\n \n \n An optional attribute on an element\n \n \n \n \n First child component\n \n \n Mandatory attribute on a component\n \n \n \n \n
\n 0 clarin.eu:cr1:c_1512740341362 \N -4 1 f f clarin.eu:cr1:c_1512740341362 MyStandaloneComponent For testing purposes. Private component that does not reference other components 2017-12-08 13:47:31.52+00 admin example \N t \n\n
\n clarin.eu:cr1:c_1512740341362\n MyStandaloneComponent\n For testing purposes. Private component that does not reference other components\n development\n clarin.eu:cr1:c_1512739327526\n
\n \n \n Test element\n \n \n Another test element, with an attribute\n \n \n An optional attribute on an element\n \n \n \n \n First child component\n \n \n Mandatory attribute on a component\n \n \n \n \n
\n 0 clarin.eu:cr1:c_1512739327526 \N +6 1 f f clarin.eu:cr1:p_1512740341364 MyExampleProfile Example profile referencing some components 2017-12-08 13:40:39.275+00 admin example \N t \n\n
\n clarin.eu:cr1:p_1512740341364\n MyExampleProfile\n Example profile referencing some components\n development\n clarin.eu:cr1:p_1512739327528\n
\n \n \n First element at profile root level\n \n \n \n \n \n \n
\n 0 clarin.eu:cr1:p_1512739327528 \N +8 1 t f clarin.eu:cr1:p_1512740341366 DraftExampleProfile Example profile referencing some components 2017-12-08 13:46:50.651+00 admin example \N t \n\n
\n clarin.eu:cr1:p_1512740341366\n DraftExampleProfile\n Example profile referencing some components\n development\n clarin.eu:cr1:p_1512740341364\n
\n \n \n First element at profile root level\n \n \n \n \n \n \n
\n 0 clarin.eu:cr1:p_1512740341364 \N +7 1 t f clarin.eu:cr1:c_1512740341365 DraftStandaloneComponent For testing purposes. Draft component that does not reference other components 2017-12-08 13:46:30.536+00 admin example \N t \n\n
\n clarin.eu:cr1:c_1512740341365\n DraftStandaloneComponent\n For testing purposes. Draft component that does not reference other components\n development\n clarin.eu:cr1:c_1512740341362\n
\n \n \n Test element\n \n \n Another test element, with an attribute\n \n \n An optional attribute on an element\n \n \n \n \n First child component\n \n \n Mandatory attribute on a component\n \n \n \n \n
\n 0 clarin.eu:cr1:c_1512740341362 \N +4 1 f f clarin.eu:cr1:c_1512740341362 MyStandaloneComponent For testing purposes. Private component that does not reference other components 2017-12-08 13:47:31.52+00 admin example \N t \n\n
\n clarin.eu:cr1:c_1512740341362\n MyStandaloneComponent\n For testing purposes. Private component that does not reference other components\n development\n clarin.eu:cr1:c_1512739327526\n
\n \n \n Test element\n \n \n Another test element, with an attribute\n \n \n An optional attribute on an element\n \n \n \n \n First child component\n \n \n Mandatory attribute on a component\n \n \n \n \n
\n 0 clarin.eu:cr1:c_1512739327526 \N 5 1 f f clarin.eu:cr1:c_1512740341363 MyWrappingExampleComponent Private component referencing another component 2017-12-08 13:47:43.273+00 admin example \N t \n\n
\n clarin.eu:cr1:c_1512740341363\n MyWrappingExampleComponent\n Private component referencing another component\n development\n clarin.eu:cr1:c_1512739327527\n
\n \n \n \n Inline child component referencing another component\n \n \n \n \n
\n 0 clarin.eu:cr1:c_1512739327527 \N -9 1 f f clarin.eu:cr1:p_1512742972468 TeamExampleProfile Team profile referencing some components 2017-12-08 14:22:52.469+00 The Administrator example \N t \n\n
\n clarin.eu:cr1:p_1512742972468\n TeamExampleProfile\n Team profile referencing some components\n development\n clarin.eu:cr1:p_1512740341364\n
\n \n \n First element at profile root level\n \n \n \n \n \n \n
\n 0 clarin.eu:cr1:p_1512740341364 \N -10 1 f f clarin.eu:cr1:c_1512742972469 TeamStandaloneComponent For testing purposes. Private component that does not reference other components 2017-12-08 14:23:13.732+00 The Administrator example \N t \n\n
\n clarin.eu:cr1:c_1512742972469\n TeamStandaloneComponent\n For testing purposes. Private component that does not reference other components\n development\n clarin.eu:cr1:c_1512740341362\n
\n \n \n Test element\n \n \n Another test element, with an attribute\n \n \n An optional attribute on an element\n \n \n \n \n First child component\n \n \n Mandatory attribute on a component\n \n \n \n \n
\n 0 clarin.eu:cr1:c_1512740341362 \N -11 1 f t clarin.eu:cr1:c_1512742972470 DeletedComponent For testing purposes. Private component that does not reference other components 2017-12-08 14:24:24.781+00 The Administrator example \N t \n\n
\n clarin.eu:cr1:c_1512742972470\n DeletedComponent\n For testing purposes. Private component that does not reference other components\n development\n clarin.eu:cr1:c_1512740341362\n
\n \n \n Test element\n \n \n Another test element, with an attribute\n \n \n An optional attribute on an element\n \n \n \n \n First child component\n \n \n Mandatory attribute on a component\n \n \n \n \n
\n 0 clarin.eu:cr1:c_1512740341362 \N +9 1 f f clarin.eu:cr1:p_1512742972468 TeamExampleProfile Team profile referencing some components 2017-12-08 14:22:52.469+00 The Administrator example \N t \n\n
\n clarin.eu:cr1:p_1512742972468\n TeamExampleProfile\n Team profile referencing some components\n development\n clarin.eu:cr1:p_1512740341364\n
\n \n \n First element at profile root level\n \n \n \n \n \n \n
\n 0 clarin.eu:cr1:p_1512740341364 \N +10 1 f f clarin.eu:cr1:c_1512742972469 TeamStandaloneComponent For testing purposes. Private component that does not reference other components 2017-12-08 14:23:13.732+00 The Administrator example \N t \n\n
\n clarin.eu:cr1:c_1512742972469\n TeamStandaloneComponent\n For testing purposes. Private component that does not reference other components\n development\n clarin.eu:cr1:c_1512740341362\n
\n \n \n Test element\n \n \n Another test element, with an attribute\n \n \n An optional attribute on an element\n \n \n \n \n First child component\n \n \n Mandatory attribute on a component\n \n \n \n \n
\n 0 clarin.eu:cr1:c_1512740341362 \N +11 1 f t clarin.eu:cr1:c_1512742972470 DeletedComponent For testing purposes. Private component that does not reference other components 2017-12-08 14:24:24.781+00 The Administrator example \N t \n\n
\n clarin.eu:cr1:c_1512742972470\n DeletedComponent\n For testing purposes. Private component that does not reference other components\n development\n clarin.eu:cr1:c_1512740341362\n
\n \n \n Test element\n \n \n Another test element, with an attribute\n \n \n An optional attribute on an element\n \n \n \n \n First child component\n \n \n Mandatory attribute on a component\n \n \n \n \n
\n 0 clarin.eu:cr1:c_1512740341362 \N \.