Skip to content

Commit 3be752b

Browse files
authored
Merge pull request #41 from metabrainz/MBS-13768
MBS-13768: Allow MBID for medium elements
1 parent 1446ebb commit 3be752b

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
* <group ref="{http://musicbrainz.org/ns/mmd-2.0#}def_track-list"/>
3838
* <element ref="{http://musicbrainz.org/ns/mmd-2.0#}data-track-list" minOccurs="0"/>
3939
* </sequence>
40+
* <attribute name="id" type="{http://musicbrainz.org/ns/mmd-2.0#}def_uuid" />
4041
* </restriction>
4142
* </complexContent>
4243
* </complexType>
@@ -68,6 +69,8 @@ public class Medium {
6869
protected Medium.TrackList trackList;
6970
@XmlElement(name = "data-track-list")
7071
protected DataTrackList dataTrackList;
72+
@XmlAttribute(name = "id")
73+
protected String id;
7174

7275
/**
7376
* Gets the value of the title property.
@@ -237,6 +240,30 @@ public void setDataTrackList(DataTrackList value) {
237240
this.dataTrackList = value;
238241
}
239242

243+
/**
244+
* Gets the value of the id property.
245+
*
246+
* @return
247+
* possible object is
248+
* {@link String }
249+
*
250+
*/
251+
public String getId() {
252+
return id;
253+
}
254+
255+
/**
256+
* Sets the value of the id property.
257+
*
258+
* @param value
259+
* allowed object is
260+
* {@link String }
261+
*
262+
*/
263+
public void setId(String value) {
264+
this.id = value;
265+
}
266+
240267

241268
/**
242269
* <p>Java class for anonymous complex type.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@
679679
<xs:group ref="mmd-2.0:def_track-list"/>
680680
<xs:element minOccurs="0" ref="mmd-2.0:data-track-list"/>
681681
</xs:sequence>
682+
<xs:attribute name="id" type="mmd-2.0:def_uuid"/>
682683
</xs:complexType>
683684
</xs:element>
684685
<xs:element name="position" type="xs:nonNegativeInteger"/>

schema/musicbrainz_mmd-2.0.rng

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,11 @@
15561556

15571557
<define name="def_medium">
15581558
<element name="medium">
1559+
<optional>
1560+
<attribute name="id">
1561+
<ref name="def_uuid"/>
1562+
</attribute>
1563+
</optional>
15591564
<optional>
15601565
<element name="title">
15611566
<text/>

0 commit comments

Comments
 (0)