Skip to content

Commit b8d2faf

Browse files
authored
MBS-6048: Allow submitting edit note element (#24)
1 parent 8664eae commit b8d2faf

File tree

4 files changed

+66
-17
lines changed

4 files changed

+66
-17
lines changed

brainz-mmd2-jaxb/src/main/java/org/musicbrainz/mmd2/Metadata.java

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0
33
// See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
44
// Any modifications to this file will be lost upon recompilation of the source schema.
5-
// Generated on: 2019.05.11 at 05:54:45 PM CEST
5+
// Generated on: 2020.11.11 at 09:54:56 PM EET
66
//
77

88

@@ -75,6 +75,7 @@
7575
* &lt;element ref="{http://musicbrainz.org/ns/mmd-2.0#}collection-list" minOccurs="0"/&gt;
7676
* &lt;element ref="{http://musicbrainz.org/ns/mmd-2.0#}editor-list" minOccurs="0"/&gt;
7777
* &lt;element ref="{http://musicbrainz.org/ns/mmd-2.0#}entity-list" minOccurs="0"/&gt;
78+
* &lt;element ref="{http://musicbrainz.org/ns/mmd-2.0#}edit-note" minOccurs="0"/&gt;
7879
* &lt;group ref="{http://musicbrainz.org/ns/mmd-2.0#}def_metadata-element_extension"/&gt;
7980
* &lt;/sequence&gt;
8081
* &lt;attribute name="generator" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
@@ -132,6 +133,7 @@
132133
"collectionList",
133134
"editorList",
134135
"entityList",
136+
"editNote",
135137
"any"
136138
})
137139
@XmlRootElement(name = "metadata")
@@ -207,6 +209,8 @@ public class Metadata {
207209
protected EditorList editorList;
208210
@XmlElement(name = "entity-list")
209211
protected EntityList entityList;
212+
@XmlElement(name = "edit-note")
213+
protected String editNote;
210214
@XmlAnyElement
211215
protected Element any;
212216
@XmlAttribute(name = "generator")
@@ -1272,6 +1276,30 @@ public void setEntityList(EntityList value) {
12721276
this.entityList = value;
12731277
}
12741278

1279+
/**
1280+
* Gets the value of the editNote property.
1281+
*
1282+
* @return
1283+
* possible object is
1284+
* {@link String }
1285+
*
1286+
*/
1287+
public String getEditNote() {
1288+
return editNote;
1289+
}
1290+
1291+
/**
1292+
* Sets the value of the editNote property.
1293+
*
1294+
* @param value
1295+
* allowed object is
1296+
* {@link String }
1297+
*
1298+
*/
1299+
public void setEditNote(String value) {
1300+
this.editNote = value;
1301+
}
1302+
12751303
/**
12761304
* Gets the value of the any property.
12771305
*

brainz-mmd2-jaxb/src/main/java/org/musicbrainz/mmd2/ObjectFactory.java

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0
33
// See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
44
// Any modifications to this file will be lost upon recompilation of the source schema.
5-
// Generated on: 2019.01.07 at 09:53:38 PM CST
5+
// Generated on: 2020.11.11 at 09:54:56 PM EET
66
//
77

88

@@ -51,9 +51,9 @@ public class ObjectFactory {
5151
private final static QName _Title_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "title");
5252
private final static QName _Length_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "length");
5353
private final static QName _Video_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "video");
54+
private final static QName _FirstReleaseDate_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "first-release-date");
5455
private final static QName _Quality_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "quality");
5556
private final static QName _Script_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "script");
56-
private final static QName _FirstReleaseDate_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "first-release-date");
5757
private final static QName _OrderingKey_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "ordering-key");
5858
private final static QName _Direction_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "direction");
5959
private final static QName _LabelCode_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "label-code");
@@ -94,6 +94,7 @@ public class ObjectFactory {
9494
private final static QName _EditsFailed_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "edits-failed");
9595
private final static QName _Category_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "category");
9696
private final static QName _Year_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "year");
97+
private final static QName _EditNote_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "edit-note");
9798
private final static QName _Number_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "number");
9899
private final static QName _Iso31661Code_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "iso-3166-1-code");
99100
private final static QName _Iso31662Code_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "iso-3166-2-code");
@@ -1098,29 +1099,29 @@ public JAXBElement<String> createVideo(String value) {
10981099
}
10991100

11001101
/**
1101-
* Create an instance of {@link JAXBElement }{@code <}{@link DefQuality }{@code >}
1102+
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
11021103
*
11031104
* @param value
11041105
* Java instance representing xml element's value.
11051106
* @return
1106-
* the new instance of {@link JAXBElement }{@code <}{@link DefQuality }{@code >}
1107+
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
11071108
*/
1108-
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "quality")
1109-
public JAXBElement<DefQuality> createQuality(DefQuality value) {
1110-
return new JAXBElement<DefQuality>(_Quality_QNAME, DefQuality.class, null, value);
1109+
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "first-release-date")
1110+
public JAXBElement<String> createFirstReleaseDate(String value) {
1111+
return new JAXBElement<String>(_FirstReleaseDate_QNAME, String.class, null, value);
11111112
}
11121113

11131114
/**
1114-
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
1115+
* Create an instance of {@link JAXBElement }{@code <}{@link DefQuality }{@code >}
11151116
*
11161117
* @param value
11171118
* Java instance representing xml element's value.
11181119
* @return
1119-
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
1120+
* the new instance of {@link JAXBElement }{@code <}{@link DefQuality }{@code >}
11201121
*/
1121-
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "script")
1122-
public JAXBElement<String> createScript(String value) {
1123-
return new JAXBElement<String>(_Script_QNAME, String.class, null, value);
1122+
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "quality")
1123+
public JAXBElement<DefQuality> createQuality(DefQuality value) {
1124+
return new JAXBElement<DefQuality>(_Quality_QNAME, DefQuality.class, null, value);
11241125
}
11251126

11261127
/**
@@ -1131,9 +1132,9 @@ public JAXBElement<String> createScript(String value) {
11311132
* @return
11321133
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
11331134
*/
1134-
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "first-release-date")
1135-
public JAXBElement<String> createFirstReleaseDate(String value) {
1136-
return new JAXBElement<String>(_FirstReleaseDate_QNAME, String.class, null, value);
1135+
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "script")
1136+
public JAXBElement<String> createScript(String value) {
1137+
return new JAXBElement<String>(_Script_QNAME, String.class, null, value);
11371138
}
11381139

11391140
/**
@@ -1661,6 +1662,19 @@ public JAXBElement<String> createYear(String value) {
16611662
return new JAXBElement<String>(_Year_QNAME, String.class, null, value);
16621663
}
16631664

1665+
/**
1666+
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
1667+
*
1668+
* @param value
1669+
* Java instance representing xml element's value.
1670+
* @return
1671+
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
1672+
*/
1673+
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "edit-note")
1674+
public JAXBElement<String> createEditNote(String value) {
1675+
return new JAXBElement<String>(_EditNote_QNAME, String.class, null, value);
1676+
}
1677+
16641678
/**
16651679
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
16661680
*

brainz-mmd2-jaxb/src/main/resources/musicbrainz_mmd-2.0.xsd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
==================================================================
4-
$Id: 8707e5dbb04e8e282225222457309f222932a8d8 $
4+
$Id: dab77021ba8a60624b94299b4c89b2f25932ec1a $
55
66
Relax NG Schema for MusicBrainz XML Metadata Version 2.0
77
@@ -75,12 +75,14 @@
7575
<xs:element minOccurs="0" ref="mmd-2.0:collection-list"/>
7676
<xs:element minOccurs="0" ref="mmd-2.0:editor-list"/>
7777
<xs:element minOccurs="0" ref="mmd-2.0:entity-list"/>
78+
<xs:element minOccurs="0" ref="mmd-2.0:edit-note"/>
7879
<xs:group ref="mmd-2.0:def_metadata-element_extension"/>
7980
</xs:sequence>
8081
<xs:attribute name="generator" type="xs:anyURI"/>
8182
<xs:attribute name="created" type="xs:dateTime"/>
8283
</xs:complexType>
8384
</xs:element>
85+
<xs:element name="edit-note" type="xs:string"/>
8486
<xs:element name="artist">
8587
<xs:complexType>
8688
<xs:sequence>

schema/musicbrainz_mmd-2.0.rng

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@
177177
<optional>
178178
<ref name="def_entity-list"/>
179179
</optional>
180+
<optional>
181+
<element name="edit-note">
182+
<text/>
183+
</element>
184+
</optional>
180185
<ref name="def_metadata-element_extension"/>
181186
</element>
182187
</define>

0 commit comments

Comments
 (0)