Skip to content

Commit

Permalink
MBS-6048: Allow submitting edit note element (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
reosarevok authored Nov 12, 2020
1 parent 8664eae commit b8d2faf
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0
// See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.05.11 at 05:54:45 PM CEST
// Generated on: 2020.11.11 at 09:54:56 PM EET
//


Expand Down Expand Up @@ -75,6 +75,7 @@
* &lt;element ref="{http://musicbrainz.org/ns/mmd-2.0#}collection-list" minOccurs="0"/&gt;
* &lt;element ref="{http://musicbrainz.org/ns/mmd-2.0#}editor-list" minOccurs="0"/&gt;
* &lt;element ref="{http://musicbrainz.org/ns/mmd-2.0#}entity-list" minOccurs="0"/&gt;
* &lt;element ref="{http://musicbrainz.org/ns/mmd-2.0#}edit-note" minOccurs="0"/&gt;
* &lt;group ref="{http://musicbrainz.org/ns/mmd-2.0#}def_metadata-element_extension"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="generator" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
Expand Down Expand Up @@ -132,6 +133,7 @@
"collectionList",
"editorList",
"entityList",
"editNote",
"any"
})
@XmlRootElement(name = "metadata")
Expand Down Expand Up @@ -207,6 +209,8 @@ public class Metadata {
protected EditorList editorList;
@XmlElement(name = "entity-list")
protected EntityList entityList;
@XmlElement(name = "edit-note")
protected String editNote;
@XmlAnyElement
protected Element any;
@XmlAttribute(name = "generator")
Expand Down Expand Up @@ -1272,6 +1276,30 @@ public void setEntityList(EntityList value) {
this.entityList = value;
}

/**
* Gets the value of the editNote property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEditNote() {
return editNote;
}

/**
* Sets the value of the editNote property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setEditNote(String value) {
this.editNote = value;
}

/**
* Gets the value of the any property.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0
// See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.01.07 at 09:53:38 PM CST
// Generated on: 2020.11.11 at 09:54:56 PM EET
//


Expand Down Expand Up @@ -51,9 +51,9 @@ public class ObjectFactory {
private final static QName _Title_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "title");
private final static QName _Length_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "length");
private final static QName _Video_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "video");
private final static QName _FirstReleaseDate_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "first-release-date");
private final static QName _Quality_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "quality");
private final static QName _Script_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "script");
private final static QName _FirstReleaseDate_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "first-release-date");
private final static QName _OrderingKey_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "ordering-key");
private final static QName _Direction_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "direction");
private final static QName _LabelCode_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "label-code");
Expand Down Expand Up @@ -94,6 +94,7 @@ public class ObjectFactory {
private final static QName _EditsFailed_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "edits-failed");
private final static QName _Category_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "category");
private final static QName _Year_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "year");
private final static QName _EditNote_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "edit-note");
private final static QName _Number_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "number");
private final static QName _Iso31661Code_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "iso-3166-1-code");
private final static QName _Iso31662Code_QNAME = new QName("http://musicbrainz.org/ns/mmd-2.0#", "iso-3166-2-code");
Expand Down Expand Up @@ -1098,29 +1099,29 @@ public JAXBElement<String> createVideo(String value) {
}

/**
* Create an instance of {@link JAXBElement }{@code <}{@link DefQuality }{@code >}
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link DefQuality }{@code >}
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*/
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "quality")
public JAXBElement<DefQuality> createQuality(DefQuality value) {
return new JAXBElement<DefQuality>(_Quality_QNAME, DefQuality.class, null, value);
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "first-release-date")
public JAXBElement<String> createFirstReleaseDate(String value) {
return new JAXBElement<String>(_FirstReleaseDate_QNAME, String.class, null, value);
}

/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
* Create an instance of {@link JAXBElement }{@code <}{@link DefQuality }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
* the new instance of {@link JAXBElement }{@code <}{@link DefQuality }{@code >}
*/
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "script")
public JAXBElement<String> createScript(String value) {
return new JAXBElement<String>(_Script_QNAME, String.class, null, value);
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "quality")
public JAXBElement<DefQuality> createQuality(DefQuality value) {
return new JAXBElement<DefQuality>(_Quality_QNAME, DefQuality.class, null, value);
}

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

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

/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*/
@XmlElementDecl(namespace = "http://musicbrainz.org/ns/mmd-2.0#", name = "edit-note")
public JAXBElement<String> createEditNote(String value) {
return new JAXBElement<String>(_EditNote_QNAME, String.class, null, value);
}

/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
Expand Down
4 changes: 3 additions & 1 deletion brainz-mmd2-jaxb/src/main/resources/musicbrainz_mmd-2.0.xsd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
==================================================================
$Id: 8707e5dbb04e8e282225222457309f222932a8d8 $
$Id: dab77021ba8a60624b94299b4c89b2f25932ec1a $
Relax NG Schema for MusicBrainz XML Metadata Version 2.0
Expand Down Expand Up @@ -75,12 +75,14 @@
<xs:element minOccurs="0" ref="mmd-2.0:collection-list"/>
<xs:element minOccurs="0" ref="mmd-2.0:editor-list"/>
<xs:element minOccurs="0" ref="mmd-2.0:entity-list"/>
<xs:element minOccurs="0" ref="mmd-2.0:edit-note"/>
<xs:group ref="mmd-2.0:def_metadata-element_extension"/>
</xs:sequence>
<xs:attribute name="generator" type="xs:anyURI"/>
<xs:attribute name="created" type="xs:dateTime"/>
</xs:complexType>
</xs:element>
<xs:element name="edit-note" type="xs:string"/>
<xs:element name="artist">
<xs:complexType>
<xs:sequence>
Expand Down
5 changes: 5 additions & 0 deletions schema/musicbrainz_mmd-2.0.rng
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@
<optional>
<ref name="def_entity-list"/>
</optional>
<optional>
<element name="edit-note">
<text/>
</element>
</optional>
<ref name="def_metadata-element_extension"/>
</element>
</define>
Expand Down

0 comments on commit b8d2faf

Please sign in to comment.