Merge lp:~logan/ubuntu/quantal/libmusicbrainz/new-upstream into lp:ubuntu/quantal/libmusicbrainz

Proposed by Logan Rosen
Status: Merged
Merged at revision: 3
Proposed branch: lp:~logan/ubuntu/quantal/libmusicbrainz/new-upstream
Merge into: lp:ubuntu/quantal/libmusicbrainz
Diff against target: 17671 lines (+3088/-10035)
194 files modified
.gitignore (+9/-0)
CMakeLists.txt (+5/-6)
Doxyfile.cmake (+1/-1)
NEWS.txt (+26/-0)
README.md (+44/-0)
README.txt (+0/-44)
config.h.cmake (+0/-2)
debian/changelog (+8/-0)
debian/control (+2/-2)
examples/.gitignore (+8/-0)
examples/CMakeLists.txt (+8/-2)
examples/cdlookup.cc (+1/-1)
examples/cdlookup_c.c (+1/-1)
examples/collections.cc (+1/-1)
examples/search.cc (+1/-1)
examples/search_c.c (+1/-1)
include/musicbrainz4/.gitignore (+1/-0)
include/musicbrainz4/Alias.h (+8/-3)
include/musicbrainz4/AliasList.h (+1/-1)
include/musicbrainz4/Annotation.h (+3/-3)
include/musicbrainz4/AnnotationList.h (+1/-1)
include/musicbrainz4/Artist.h (+32/-5)
include/musicbrainz4/ArtistCredit.h (+3/-3)
include/musicbrainz4/ArtistList.h (+1/-1)
include/musicbrainz4/Attribute.h (+3/-3)
include/musicbrainz4/AttributeList.h (+1/-1)
include/musicbrainz4/CDStub.h (+3/-3)
include/musicbrainz4/CDStubList.h (+1/-1)
include/musicbrainz4/Collection.h (+3/-3)
include/musicbrainz4/CollectionList.h (+1/-1)
include/musicbrainz4/Disc.h (+3/-3)
include/musicbrainz4/DiscList.h (+1/-1)
include/musicbrainz4/Entity.h (+12/-24)
include/musicbrainz4/FreeDBDisc.h (+3/-3)
include/musicbrainz4/FreeDBDiscList.h (+1/-1)
include/musicbrainz4/HTTPFetch.h (+1/-1)
include/musicbrainz4/IPI.h (+63/-0)
include/musicbrainz4/IPIList.h (+37/-0)
include/musicbrainz4/ISRC.h (+3/-3)
include/musicbrainz4/ISRCList.h (+1/-1)
include/musicbrainz4/ISWC.h (+65/-0)
include/musicbrainz4/ISWCList.h (+62/-0)
include/musicbrainz4/Label.h (+32/-5)
include/musicbrainz4/LabelInfo.h (+3/-3)
include/musicbrainz4/LabelInfoList.h (+1/-1)
include/musicbrainz4/LabelList.h (+1/-1)
include/musicbrainz4/Lifespan.h (+4/-3)
include/musicbrainz4/List.h (+3/-3)
include/musicbrainz4/ListImpl.h (+5/-11)
include/musicbrainz4/Medium.h (+3/-3)
include/musicbrainz4/MediumList.h (+3/-3)
include/musicbrainz4/Message.h (+3/-3)
include/musicbrainz4/Metadata.h (+3/-3)
include/musicbrainz4/NameCredit.h (+3/-3)
include/musicbrainz4/NameCreditList.h (+1/-1)
include/musicbrainz4/NonMBTrack.h (+3/-3)
include/musicbrainz4/NonMBTrackList.h (+1/-1)
include/musicbrainz4/PUID.h (+3/-3)
include/musicbrainz4/PUIDList.h (+1/-1)
include/musicbrainz4/Query.h (+22/-1)
include/musicbrainz4/Rating.h (+3/-3)
include/musicbrainz4/Recording.h (+17/-4)
include/musicbrainz4/RecordingList.h (+1/-1)
include/musicbrainz4/Relation.h (+3/-3)
include/musicbrainz4/RelationList.h (+3/-3)
include/musicbrainz4/RelationListList.h (+63/-0)
include/musicbrainz4/Release.h (+17/-4)
include/musicbrainz4/ReleaseGroup.h (+34/-5)
include/musicbrainz4/ReleaseGroupList.h (+1/-1)
include/musicbrainz4/ReleaseList.h (+1/-1)
include/musicbrainz4/SecondaryType.h (+65/-0)
include/musicbrainz4/SecondaryTypeList.h (+62/-0)
include/musicbrainz4/Tag.h (+3/-3)
include/musicbrainz4/TagList.h (+1/-1)
include/musicbrainz4/TextRepresentation.h (+3/-3)
include/musicbrainz4/Track.h (+4/-3)
include/musicbrainz4/TrackList.h (+1/-1)
include/musicbrainz4/UserRating.h (+3/-3)
include/musicbrainz4/UserTag.h (+3/-3)
include/musicbrainz4/UserTagList.h (+1/-1)
include/musicbrainz4/Work.h (+34/-5)
include/musicbrainz4/WorkList.h (+1/-1)
include/musicbrainz4/defines.h (+42/-0)
schema/musicbrainz_mmd-1.0.rng (+0/-585)
schema/musicbrainz_mmd-1.0rc1.rng (+0/-478)
schema/musicbrainz_mmd-1.0rc2.rng (+0/-518)
schema/musicbrainz_mmd-1.0rc3.rng (+0/-518)
schema/musicbrainz_mmd-1.0rc4.rng (+0/-539)
schema/musicbrainz_mmd-1.0rc5.rng (+0/-585)
schema/musicbrainz_mmd-1.1.rng (+0/-694)
schema/musicbrainz_mmd-1.2.rng (+0/-736)
schema/musicbrainz_mmd-1.3.rng (+0/-807)
schema/musicbrainz_mmd-1.4.rng (+0/-911)
schema/musicbrainz_mmd-2.0.rng (+0/-1537)
src/.gitignore (+7/-0)
src/Alias.cc (+58/-16)
src/Annotation.cc (+9/-16)
src/Artist.cc (+61/-41)
src/ArtistCredit.cc (+6/-14)
src/Attribute.cc (+6/-13)
src/CDStub.cc (+11/-18)
src/CMakeLists.txt (+10/-3)
src/Collection.cc (+9/-15)
src/Disc.cc (+9/-16)
src/Entity.cc (+23/-14)
src/FreeDBDisc.cc (+11/-19)
src/HTTPFetch.cc (+4/-1)
src/IPI.cc (+118/-0)
src/ISRC.cc (+7/-14)
src/ISWC.cc (+123/-0)
src/ISWCList.cc (+101/-0)
src/Label.cc (+59/-37)
src/LabelInfo.cc (+8/-15)
src/Lifespan.cc (+20/-15)
src/List.cc (+6/-13)
src/Medium.cc (+11/-18)
src/MediumList.cc (+9/-10)
src/Message.cc (+7/-14)
src/Metadata.cc (+33/-40)
src/NameCredit.cc (+8/-16)
src/NonMBTrack.cc (+9/-16)
src/PUID.cc (+7/-14)
src/Query.cc (+26/-9)
src/Rating.cc (+7/-14)
src/Recording.cc (+34/-36)
src/Relation.cc (+17/-24)
src/RelationList.cc (+9/-10)
src/RelationListList.cc (+148/-0)
src/Release.cc (+37/-38)
src/ReleaseGroup.cc (+68/-36)
src/SecondaryType.cc (+124/-0)
src/SecondaryTypeList.cc (+101/-0)
src/Tag.cc (+8/-15)
src/TextRepresentation.cc (+8/-15)
src/Track.cc (+25/-18)
src/UserRating.cc (+6/-13)
src/UserTag.cc (+7/-14)
src/Work.cc (+70/-39)
src/c-int-medium-defines.inc (+2/-2)
src/c-int-medium-source.inc (+2/-2)
src/c-int-query-defines.inc (+2/-2)
src/c-int-query-source.inc (+2/-2)
src/c-int-release-defines.inc (+2/-2)
src/c-int-release-source.inc (+2/-2)
src/c-int-source-funcs.inc (+12/-3)
src/cinterface.xml (+38/-10)
src/make-c-interface.cc (+125/-4)
test-data/README (+0/-13)
test-data/invalid/artist/basic_1.xml (+0/-12)
test-data/invalid/artist/basic_2.xml (+0/-12)
test-data/invalid/artist/empty_2.xml (+0/-3)
test-data/invalid/artist/empty_3.xml (+0/-7)
test-data/invalid/artist/ratings_1.xml (+0/-6)
test-data/invalid/artist/ratings_2.xml (+0/-6)
test-data/invalid/artist/search_result_1.xml (+0/-11)
test-data/invalid/artist/tags_1.xml (+0/-6)
test-data/valid/artist/Tchaikovsky-1.xml (+0/-90)
test-data/valid/artist/Tchaikovsky-2.xml (+0/-18)
test-data/valid/artist/Tori_Amos_1.xml (+0/-8)
test-data/valid/artist/Tori_Amos_2.xml (+0/-67)
test-data/valid/artist/Tori_Amos_3.xml (+0/-25)
test-data/valid/artist/Tori_Amos_4.xml (+0/-14)
test-data/valid/artist/Tori_Amos_5.xml (+0/-13)
test-data/valid/artist/empty_1.xml (+0/-7)
test-data/valid/artist/empty_2.xml (+0/-11)
test-data/valid/artist/search_result_1.xml (+0/-19)
test-data/valid/label/Atlantic_Records_1.xml (+0/-9)
test-data/valid/label/Atlantic_Records_2.xml (+0/-14)
test-data/valid/label/Atlantic_Records_3.xml (+0/-17)
test-data/valid/label/search_result_1.xml (+0/-14)
test-data/valid/release-group/The_Cure_1.xml (+0/-36)
test-data/valid/release-group/search_result_1.xml (+0/-23)
test-data/valid/release/Highway_61_Revisited_1.xml (+0/-68)
test-data/valid/release/Highway_61_Revisited_2.xml (+0/-18)
test-data/valid/release/Little_Earthquakes_1.xml (+0/-24)
test-data/valid/release/Little_Earthquakes_2.xml (+0/-73)
test-data/valid/release/Mission_Impossible_2.xml (+0/-155)
test-data/valid/release/Under_the_Pink_1.xml (+0/-16)
test-data/valid/release/Under_the_Pink_2.xml (+0/-17)
test-data/valid/release/Under_the_Pink_3.xml (+0/-16)
test-data/valid/release/search_result_1.xml (+0/-29)
test-data/valid/track/Silent_All_These_Years_1.xml (+0/-7)
test-data/valid/track/Silent_All_These_Years_2.xml (+0/-21)
test-data/valid/track/Silent_All_These_Years_3.xml (+0/-16)
test-data/valid/track/Silent_All_These_Years_4.xml (+0/-33)
test-data/valid/track/Silent_All_These_Years_5.xml (+0/-20)
test-data/valid/track/Silent_All_These_Years_6.xml (+0/-16)
test-data/valid/track/search_result_1.xml (+0/-45)
test-data/valid/user/User_1.xml (+0/-15)
tests/.gitignore (+5/-0)
tests/CMakeLists.txt (+10/-2)
tests/ctest.c (+190/-5)
tests/mbtest.cc (+342/-121)
valgrind.supp (+18/-2)
To merge this branch: bzr merge lp:~logan/ubuntu/quantal/libmusicbrainz/new-upstream
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Ubuntu branches Pending
Review via email: mp+111776@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

Looks alright. Is there any specific reason why you "Bump Build-Depends for debhelper to >= 9."?

review: Needs Information
Revision history for this message
Logan Rosen (logan) wrote :

I did that because Lintian was getting angry about how debian/compat is set to "9," but debian/control requires only version 7 or up of debhelper - the Lintian website recommended increasing the version in control to greater than or equal to the compatibility value.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Ok, that's fine then. :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.gitignore'
--- .gitignore 1970-01-01 00:00:00 +0000
+++ .gitignore 2012-06-25 05:56:21 +0000
@@ -0,0 +1,9 @@
1CMakeCache.txt
2CMakeFiles/
3Doxyfile
4Makefile
5cmake_install.cmake
6config.h
7libmusicbrainz4.pc
8docs/
9install_manifest.txt
010
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-02-01 17:18:10 +0000
+++ CMakeLists.txt 2012-06-25 05:56:21 +0000
@@ -1,15 +1,15 @@
1cmake_minimum_required(VERSION 2.6)1cmake_minimum_required(VERSION 2.6)
22
3PROJECT(libmusicbrainz4)3PROJECT(libmusicbrainz4)
4SET(PROJECT_VERSION 4.0.0)4SET(PROJECT_VERSION 4.0.3)
55
6# 1. If the library source code has changed at all since the last update, then increment revision.6# 1. If the library source code has changed at all since the last update, then increment revision.
7# 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.7# 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
8# 3. If any interfaces have been added since the last public release, then increment age.8# 3. If any interfaces have been added since the last public release, then increment age.
9# 4. If any interfaces have been removed since the last public release, then set age to 0.9# 4. If any interfaces have been removed since the last public release, then set age to 0.
10SET(musicbrainz4_SOVERSION_CURRENT 3)10SET(musicbrainz4_SOVERSION_CURRENT 5)
11SET(musicbrainz4_SOVERSION_REVISION 0)11SET(musicbrainz4_SOVERSION_REVISION 1)
12SET(musicbrainz4_SOVERSION_AGE 0)12SET(musicbrainz4_SOVERSION_AGE 2)
1313
14MATH(EXPR musicbrainz4_SOVERSION_MAJOR "${musicbrainz4_SOVERSION_CURRENT} - ${musicbrainz4_SOVERSION_AGE}")14MATH(EXPR musicbrainz4_SOVERSION_MAJOR "${musicbrainz4_SOVERSION_CURRENT} - ${musicbrainz4_SOVERSION_AGE}")
15MATH(EXPR musicbrainz4_SOVERSION_MINOR "${musicbrainz4_SOVERSION_AGE}")15MATH(EXPR musicbrainz4_SOVERSION_MINOR "${musicbrainz4_SOVERSION_AGE}")
@@ -47,6 +47,5 @@
4747
48ADD_CUSTOM_TARGET(dist48ADD_CUSTOM_TARGET(dist
49 rm -rf "libmusicbrainz-${PROJECT_VERSION}"49 rm -rf "libmusicbrainz-${PROJECT_VERSION}"
50 COMMAND svn export http://svn.musicbrainz.org/libmusicbrainz/trunk "libmusicbrainz-${PROJECT_VERSION}"50 COMMAND git archive --prefix="libmusicbrainz-${PROJECT_VERSION}/" release-${PROJECT_VERSION} | gzip -9 > libmusicbrainz-${PROJECT_VERSION}.tar.gz
51 COMMAND tar -zcvf "libmusicbrainz-${PROJECT_VERSION}.tar.gz" "libmusicbrainz-${PROJECT_VERSION}"
52)51)
5352
=== modified file 'Doxyfile.cmake'
--- Doxyfile.cmake 2012-02-01 17:18:10 +0000
+++ Doxyfile.cmake 2012-06-25 05:56:21 +0000
@@ -16,5 +16,5 @@
16FULL_PATH_NAMES = NO16FULL_PATH_NAMES = NO
17MACRO_EXPANSION = YES17MACRO_EXPANSION = YES
18EXPAND_ONLY_PREDEF = YES18EXPAND_ONLY_PREDEF = YES
19PREDEFINED = MB_API19PREDEFINED = LIBMB4_DEPRECATED(f)=
20REPEAT_BRIEF = NO20REPEAT_BRIEF = NO
2121
=== modified file 'NEWS.txt'
--- NEWS.txt 2012-02-01 17:18:10 +0000
+++ NEWS.txt 2012-06-25 05:56:21 +0000
@@ -1,3 +1,29 @@
1Changes for libmusicbrainz 4.0.3
2--------------------------------
3
4 - Fix LMB-32 - Correctly ignore unrecognised nodes
5 - Don't compile using -Werror when building from tarball
6
7Changes for libmusicbrainz 4.0.2
8--------------------------------
9
10 - Add extra attributes to Alias
11 - Add IPI lists to Artist and Label
12 - Add 'Ended' to Lifespan
13 - Add PrimaryType and SecondaryTypeList to ReleaseGroup
14 - Add text based track number to Track
15 - Add ISWC list to Work
16 - Debug builds show queries and responses on stderr
17 - Documentation updates
18
19Changes for libmusicbrainz 4.0.1
20--------------------------------
21
22 - Fixed bug LMB-30 - Unable to access all relation lists on objects with
23 multiple relation lists
24 - Fixed bug LMB-31 - mb_relationlist_get_targettype always returns
25 "target-type"
26
1Changes for libmusicbrainz 4.0.027Changes for libmusicbrainz 4.0.0
2--------------------------------28--------------------------------
329
430
=== added file 'README.md'
--- README.md 1970-01-01 00:00:00 +0000
+++ README.md 2012-06-25 05:56:21 +0000
@@ -0,0 +1,44 @@
1============================
2 MusicBrainz Client Library
3============================
4
5Documentation
6-------------
7
8To get started quickly have a look at the examples directory which
9contains various sample programs. API documentation can be generated
10using [Doxygen] (http://www.stack.nl/~dimitri/doxygen/). The online version of
11the API documentation can be found at:
12
13 http://metabrainz.github.com/libmusicbrainz/
14
15Compiling and Linking
16---------------------
17
18This package provides a pkg-config script that returns the necessary compiler
19and linker flags, as well as the version number. To build a small sample
20program one would use:
21
22 g++ -o test_app test_app.cpp `pkg-config libmusicbrainz4 --cflags --libs`
23
24If you don't want/can't use pkg-config and you are using the C API, make sure
25you link in the C++ standard library:
26
27 gcc -o test_app test_app.c -lmusicbrainz4 -lm -lstdc++
28
29Contact
30-------
31
32If you have any questions about this library, feel free to ask on the
33MusicBrainz development mailing list:
34
35 http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel
36
37Please submit bug reports to the MusicBrainz bug tracking system:
38
39 http://tickets.musicbrainz.org/browse/LMB
40
41You can find out more about the MusicBrainz project by visiting its
42site:
43
44 http://musicbrainz.org/
045
=== removed file 'README.txt'
--- README.txt 2012-02-01 17:18:10 +0000
+++ README.txt 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
1============================
2 MusicBrainz Client Library
3============================
4
5Documentation
6=============
7
8To get started quickly have a look at the examples directory which
9contains various sample programs. API documentation can be generated
10using Doxygen (http://www.stack.nl/~dimitri/doxygen/). Online version of
11the API documentation can be found at:
12
13 http://users.musicbrainz.org/~luks/docs/libmusicbrainz4/
14
15Compiling and Linking
16=====================
17
18This package provides a pkg-config script that returns the necessary compiler
19and linker flags, as well as the version number. To build a small sample
20program one would use:
21
22 g++ -o test_app test_app.cpp `pkg-config libmusicbrainz4 --cflags --libs`
23
24If you don't want/can't use pkg-config and you are using the C API, make sure
25you link in the C++ standard library:
26
27 gcc -o test_app test_app.c -lmusicbrainz4 -lm -lstdc++
28
29Contact
30=======
31
32If you have any questions about this library, feel free to ask on the
33MusicBrainz development mailing list:
34
35 http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel
36
37Please submit bug reports to the MusicBrainz bug tracking system:
38
39 http://tickets.musicbrainz.org/
40
41You can find out more about the MusicBrainz project by visiting its
42site:
43
44 http://musicbrainz.org/
450
=== modified file 'config.h.cmake'
--- config.h.cmake 2012-02-01 17:18:10 +0000
+++ config.h.cmake 2012-06-25 05:56:21 +0000
@@ -4,6 +4,4 @@
4#define PACKAGE "${PROJECT_NAME}"4#define PACKAGE "${PROJECT_NAME}"
5#define VERSION "${PROJECT_VERSION}"5#define VERSION "${PROJECT_VERSION}"
66
7#cmakedefine DISCID_FOUND
8
9#endif7#endif
108
=== modified file 'debian/changelog'
--- debian/changelog 2012-02-01 17:18:10 +0000
+++ debian/changelog 2012-06-25 05:56:21 +0000
@@ -1,3 +1,11 @@
1libmusicbrainz (4.0.3-0ubuntu1) quantal; urgency=low
2
3 * New upstream release (LP: #1005075).
4 * Bump Standards-Version to 3.9.3.
5 * Bump Build-Depends for debhelper to >= 9.
6
7 -- Logan Rosen <logatronico@gmail.com> Mon, 25 Jun 2012 01:45:21 -0400
8
1libmusicbrainz (4.0.0-0ubuntu1) precise; urgency=low9libmusicbrainz (4.0.0-0ubuntu1) precise; urgency=low
210
3 * Merge from unreleased Debian git.11 * Merge from unreleased Debian git.
412
=== modified file 'debian/control'
--- debian/control 2012-02-01 17:18:10 +0000
+++ debian/control 2012-06-25 05:56:21 +0000
@@ -1,11 +1,11 @@
1Source: libmusicbrainz1Source: libmusicbrainz
2Priority: extra2Priority: extra
3Maintainer: Timo Aaltonen <tjaalton@ubuntu.com>3Maintainer: Timo Aaltonen <tjaalton@ubuntu.com>
4Build-Depends: debhelper (>= 8.1.3~),4Build-Depends: debhelper (>= 9),
5 cmake,5 cmake,
6 libneon27-gnutls-dev| libneon-dev,6 libneon27-gnutls-dev| libneon-dev,
7 doxygen,7 doxygen,
8Standards-Version: 3.9.28Standards-Version: 3.9.3
9Section: libs9Section: libs
10Homepage: http://musicbrainz.org/doc/libmusicbrainz10Homepage: http://musicbrainz.org/doc/libmusicbrainz
11Vcs-Git: git://git.debian.org/collab-maint/libmusicbrainz.git11Vcs-Git: git://git.debian.org/collab-maint/libmusicbrainz.git
1212
=== added file 'examples/.gitignore'
--- examples/.gitignore 1970-01-01 00:00:00 +0000
+++ examples/.gitignore 2012-06-25 05:56:21 +0000
@@ -0,0 +1,8 @@
1CMakeFiles/
2Makefile
3cdlookup
4cdlookup_c
5cmake_install.cmake
6collections
7search
8search_c
09
=== modified file 'examples/CMakeLists.txt'
--- examples/CMakeLists.txt 2012-02-01 17:18:10 +0000
+++ examples/CMakeLists.txt 2012-06-25 05:56:21 +0000
@@ -8,10 +8,16 @@
8ADD_EXECUTABLE(collections collections.cc)8ADD_EXECUTABLE(collections collections.cc)
99
10IF(CMAKE_COMPILER_IS_GNUCXX)10IF(CMAKE_COMPILER_IS_GNUCXX)
11 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -pedantic-errors")11 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic-errors")
12 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
13 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
14 ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
12ENDIF(CMAKE_COMPILER_IS_GNUCXX)15ENDIF(CMAKE_COMPILER_IS_GNUCXX)
1316
14IF(CMAKE_COMPILER_IS_GNUCC)17IF(CMAKE_COMPILER_IS_GNUCC)
15 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra -pedantic-errors")18 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic-errors")
19 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
20 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
21 ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
16ENDIF(CMAKE_COMPILER_IS_GNUCC)22ENDIF(CMAKE_COMPILER_IS_GNUCC)
1723
1824
=== modified file 'examples/cdlookup.cc'
--- examples/cdlookup.cc 2012-02-01 17:18:10 +0000
+++ examples/cdlookup.cc 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: cdlookup.cc 13266 2011-08-25 12:56:47Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'examples/cdlookup_c.c'
--- examples/cdlookup_c.c 2012-02-01 17:18:10 +0000
+++ examples/cdlookup_c.c 2012-06-25 05:56:21 +0000
@@ -10,7 +10,7 @@
10 modify it under the terms of v2 of the GNU Lesser General Public10 modify it under the terms of v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.11 License as published by the Free Software Foundation.
1212
13 Flactag is distributed in the hope that it will be useful,13 libmusicbrainz4 is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.16 Lesser General Public License for more details.
1717
=== modified file 'examples/collections.cc'
--- examples/collections.cc 2012-02-01 17:18:10 +0000
+++ examples/collections.cc 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: collections.cc 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'examples/search.cc'
--- examples/search.cc 2012-02-01 17:18:10 +0000
+++ examples/search.cc 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: search.cc 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'examples/search_c.c'
--- examples/search_c.c 2012-02-01 17:18:10 +0000
+++ examples/search_c.c 2012-06-25 05:56:21 +0000
@@ -10,7 +10,7 @@
10 modify it under the terms of v2 of the GNU Lesser General Public10 modify it under the terms of v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.11 License as published by the Free Software Foundation.
1212
13 Flactag is distributed in the hope that it will be useful,13 libmusicbrainz4 is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.16 Lesser General Public License for more details.
1717
=== added file 'include/musicbrainz4/.gitignore'
--- include/musicbrainz4/.gitignore 1970-01-01 00:00:00 +0000
+++ include/musicbrainz4/.gitignore 2012-06-25 05:56:21 +0000
@@ -0,0 +1,1 @@
1mb4_c.h
02
=== modified file 'include/musicbrainz4/Alias.h'
--- include/musicbrainz4/Alias.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Alias.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Alias.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -48,13 +48,18 @@
4848
49 std::string Locale() const;49 std::string Locale() const;
50 std::string Text() const;50 std::string Text() const;
51 std::string SortName() const;
52 std::string Type() const;
53 std::string Primary() const;
54 std::string BeginDate() const;
55 std::string EndDate() const;
5156
52 virtual std::ostream& Serialise(std::ostream& os) const;57 virtual std::ostream& Serialise(std::ostream& os) const;
53 static std::string GetElementName();58 static std::string GetElementName();
5459
55 protected:60 protected:
56 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);61 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
57 virtual bool ParseElement(const XMLNode& Node);62 virtual void ParseElement(const XMLNode& Node);
5863
59 private:64 private:
60 CAliasPrivate * const m_d;65 CAliasPrivate * const m_d;
6166
=== modified file 'include/musicbrainz4/AliasList.h'
--- include/musicbrainz4/AliasList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/AliasList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: AliasList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/Annotation.h'
--- include/musicbrainz4/Annotation.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Annotation.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Annotation.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -55,8 +55,8 @@
55 static std::string GetElementName();55 static std::string GetElementName();
5656
57 protected:57 protected:
58 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);58 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
59 virtual bool ParseElement(const XMLNode& Node);59 virtual void ParseElement(const XMLNode& Node);
6060
61 private:61 private:
62 CAnnotationPrivate * const m_d;62 CAnnotationPrivate * const m_d;
6363
=== modified file 'include/musicbrainz4/AnnotationList.h'
--- include/musicbrainz4/AnnotationList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/AnnotationList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: AnnotationList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/Artist.h'
--- include/musicbrainz4/Artist.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Artist.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Artist.h 13265 2011-08-25 12:53:44Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -29,6 +29,7 @@
29#include <iostream>29#include <iostream>
3030
31#include "musicbrainz4/Entity.h"31#include "musicbrainz4/Entity.h"
32#include "musicbrainz4/IPIList.h"
32#include "musicbrainz4/ReleaseList.h"33#include "musicbrainz4/ReleaseList.h"
33#include "musicbrainz4/AliasList.h"34#include "musicbrainz4/AliasList.h"
34#include "musicbrainz4/RecordingList.h"35#include "musicbrainz4/RecordingList.h"
@@ -65,7 +66,20 @@
65 std::string Gender() const;66 std::string Gender() const;
66 std::string Country() const;67 std::string Country() const;
67 std::string Disambiguation() const;68 std::string Disambiguation() const;
68 std::string IPI() const;69
70 /**
71 * @deprecated Returns one of the IPIs for this artist
72 *
73 * Returns one of the IPIs for this artist. To return all
74 * IPIs, see MusicBrainz4::CArtist::IPIList
75 *
76 * <b>This method is deprecated, please use MusicBrainz4::CArtist::IPIList</b>
77 *
78 * @return One of the IPIs for this artist
79 */
80
81 LIBMB4_DEPRECATED(MusicBrainz4::CArtist::IPIList) std::string IPI() const;
82 CIPIList *IPIList() const;
69 CLifespan *Lifespan() const;83 CLifespan *Lifespan() const;
70 CAliasList *AliasList() const;84 CAliasList *AliasList() const;
71 CRecordingList *RecordingList() const;85 CRecordingList *RecordingList() const;
@@ -73,7 +87,20 @@
73 CReleaseGroupList *ReleaseGroupList() const;87 CReleaseGroupList *ReleaseGroupList() const;
74 CLabelList *LabelList() const;88 CLabelList *LabelList() const;
75 CWorkList *WorkList() const;89 CWorkList *WorkList() const;
76 CRelationList *RelationList() const;90
91 /**
92 * @deprecated Returns the <b>last</b> relation list for this artist
93 *
94 * Returns the <b>last</b> relation list for this artist. To return all
95 * relation lists, see MusicBrainz4::CArtist::RelationListList
96 *
97 * <b>This method is deprecated, please use MusicBrainz4::CArtist::RelationListList</b>
98 *
99 * @return The <b>last</b> relation list for this artist
100 */
101
102 LIBMB4_DEPRECATED(MusicBrainz4::CArtist::RelationListList) CRelationList *RelationList() const;
103 CRelationListList *RelationListList() const;
77 CTagList *TagList() const;104 CTagList *TagList() const;
78 CUserTagList *UserTagList() const;105 CUserTagList *UserTagList() const;
79 CRating *Rating() const;106 CRating *Rating() const;
@@ -83,8 +110,8 @@
83 static std::string GetElementName();110 static std::string GetElementName();
84111
85 protected:112 protected:
86 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);113 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
87 virtual bool ParseElement(const XMLNode& Node);114 virtual void ParseElement(const XMLNode& Node);
88115
89 private:116 private:
90 void Cleanup();117 void Cleanup();
91118
=== modified file 'include/musicbrainz4/ArtistCredit.h'
--- include/musicbrainz4/ArtistCredit.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/ArtistCredit.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: ArtistCredit.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -52,8 +52,8 @@
52 static std::string GetElementName();52 static std::string GetElementName();
5353
54 protected:54 protected:
55 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);55 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
56 virtual bool ParseElement(const XMLNode& Node);56 virtual void ParseElement(const XMLNode& Node);
5757
58 private:58 private:
59 void Cleanup();59 void Cleanup();
6060
=== modified file 'include/musicbrainz4/ArtistList.h'
--- include/musicbrainz4/ArtistList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/ArtistList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: ArtistList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/Attribute.h'
--- include/musicbrainz4/Attribute.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Attribute.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Attribute.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -52,8 +52,8 @@
52 static std::string GetElementName();52 static std::string GetElementName();
5353
54 protected:54 protected:
55 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);55 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
56 virtual bool ParseElement(const XMLNode& Node);56 virtual void ParseElement(const XMLNode& Node);
5757
58 private:58 private:
59 CAttributePrivate * const m_d;59 CAttributePrivate * const m_d;
6060
=== modified file 'include/musicbrainz4/AttributeList.h'
--- include/musicbrainz4/AttributeList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/AttributeList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: AttributeList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/CDStub.h'
--- include/musicbrainz4/CDStub.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/CDStub.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: CDStub.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -58,8 +58,8 @@
58 static std::string GetElementName();58 static std::string GetElementName();
5959
60 protected:60 protected:
61 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);61 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
62 virtual bool ParseElement(const XMLNode& Node);62 virtual void ParseElement(const XMLNode& Node);
6363
64 private:64 private:
65 void Cleanup();65 void Cleanup();
6666
=== modified file 'include/musicbrainz4/CDStubList.h'
--- include/musicbrainz4/CDStubList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/CDStubList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: CDStubList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/Collection.h'
--- include/musicbrainz4/Collection.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Collection.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Collection.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -53,8 +53,8 @@
53 static std::string GetElementName();53 static std::string GetElementName();
5454
55 protected:55 protected:
56 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);56 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
57 virtual bool ParseElement(const XMLNode& Node);57 virtual void ParseElement(const XMLNode& Node);
5858
59 private:59 private:
60 void Cleanup();60 void Cleanup();
6161
=== modified file 'include/musicbrainz4/CollectionList.h'
--- include/musicbrainz4/CollectionList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/CollectionList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: CollectionList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/Disc.h'
--- include/musicbrainz4/Disc.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Disc.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Disc.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -57,8 +57,8 @@
57 static std::string GetElementName();57 static std::string GetElementName();
5858
59 protected:59 protected:
60 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);60 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
61 virtual bool ParseElement(const XMLNode& Node);61 virtual void ParseElement(const XMLNode& Node);
6262
63 private:63 private:
64 void Cleanup();64 void Cleanup();
6565
=== modified file 'include/musicbrainz4/DiscList.h'
--- include/musicbrainz4/DiscList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/DiscList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: DiscList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/Entity.h'
--- include/musicbrainz4/Entity.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Entity.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Entity.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -36,6 +36,8 @@
36{36{
37 class CEntityPrivate;37 class CEntityPrivate;
3838
39 class CRelationListList;
40
39 class CEntity41 class CEntity
40 {42 {
41 public:43 public:
@@ -46,7 +48,7 @@
4648
47 virtual CEntity *Clone()=0;49 virtual CEntity *Clone()=0;
4850
49 bool Parse(const XMLNode& Node);51 void Parse(const XMLNode& Node);
5052
51 std::map<std::string,std::string> ExtAttributes() const;53 std::map<std::string,std::string> ExtAttributes() const;
52 std::map<std::string,std::string> ExtElements() const;54 std::map<std::string,std::string> ExtElements() const;
@@ -55,19 +57,17 @@
55 static std::string GetElementName();57 static std::string GetElementName();
5658
57 protected:59 protected:
60 void ProcessRelationList(const XMLNode& Node, CRelationListList* & RetVal);
61
58 template<typename T>62 template<typename T>
59 bool ProcessItem(const XMLNode& Node, T* & RetVal)63 void ProcessItem(const XMLNode& Node, T* & RetVal)
60 {64 {
61 RetVal=new T(Node);65 RetVal=new T(Node);
62
63 return true;
64 }66 }
6567
66 template<class T>68 template<class T>
67 bool ProcessItem(const XMLNode& Node, T& RetVal)69 void ProcessItem(const XMLNode& Node, T& RetVal)
68 {70 {
69 bool Ret=true;
70
71 std::stringstream os;71 std::stringstream os;
72 if (Node.getText())72 if (Node.getText())
73 os << (const char *)Node.getText();73 os << (const char *)Node.getText();
@@ -75,51 +75,39 @@
75 os >> RetVal;75 os >> RetVal;
76 if (os.fail())76 if (os.fail())
77 {77 {
78 Ret=false;
79 std::cerr << "Error parsing value '";78 std::cerr << "Error parsing value '";
80 if (Node.getText())79 if (Node.getText())
81 std::cerr << Node.getText();80 std::cerr << Node.getText();
82 std::cerr << "'" << std::endl;81 std::cerr << "'" << std::endl;
83 }82 }
84
85 return Ret;
86 }83 }
8784
88 template<typename T>85 template<typename T>
89 bool ProcessItem(const std::string& Text, T& RetVal)86 void ProcessItem(const std::string& Text, T& RetVal)
90 {87 {
91 bool Ret=true;
92
93 std::stringstream os;88 std::stringstream os;
94 os << Text;89 os << Text;
9590
96 os >> RetVal;91 os >> RetVal;
97 if (os.fail())92 if (os.fail())
98 {93 {
99 Ret=false;
100 std::cerr << "Error parsing value '" << Text << "'" << std::endl;94 std::cerr << "Error parsing value '" << Text << "'" << std::endl;
101 }95 }
102
103 return Ret;
104 }96 }
10597
106 bool ProcessItem(const XMLNode& Node, std::string& RetVal)98 void ProcessItem(const XMLNode& Node, std::string& RetVal)
107 {99 {
108 if (Node.getText())100 if (Node.getText())
109 RetVal=Node.getText();101 RetVal=Node.getText();
110
111 return true;
112
113 }102 }
114103
115 virtual bool ParseAttribute(const std::string& Name, const std::string& Value)=0;104 virtual void ParseAttribute(const std::string& Name, const std::string& Value)=0;
116 virtual bool ParseElement(const XMLNode& Node)=0;105 virtual void ParseElement(const XMLNode& Node)=0;
117106
118 private:107 private:
119 CEntityPrivate *m_d;108 CEntityPrivate *m_d;
120109
121 void Cleanup();110 void Cleanup();
122
123 };111 };
124}112}
125113
126114
=== modified file 'include/musicbrainz4/FreeDBDisc.h'
--- include/musicbrainz4/FreeDBDisc.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/FreeDBDisc.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: FreeDBDisc.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -58,8 +58,8 @@
58 static std::string GetElementName();58 static std::string GetElementName();
5959
60 protected:60 protected:
61 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);61 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
62 virtual bool ParseElement(const XMLNode& Node);62 virtual void ParseElement(const XMLNode& Node);
6363
64 private:64 private:
65 void Cleanup();65 void Cleanup();
6666
=== modified file 'include/musicbrainz4/FreeDBDiscList.h'
--- include/musicbrainz4/FreeDBDiscList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/FreeDBDiscList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: FreeDBDiscList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/HTTPFetch.h'
--- include/musicbrainz4/HTTPFetch.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/HTTPFetch.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: HTTPFetch.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== added file 'include/musicbrainz4/IPI.h'
--- include/musicbrainz4/IPI.h 1970-01-01 00:00:00 +0000
+++ include/musicbrainz4/IPI.h 2012-06-25 05:56:21 +0000
@@ -0,0 +1,63 @@
1/* --------------------------------------------------------------------------
2
3 libmusicbrainz4 - Client library to access MusicBrainz
4
5 Copyright (C) 2012 Andrew Hawkins
6
7 This file is part of libmusicbrainz4.
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.
12
13 libmusicbrainz4 is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21 $Id$
22
23----------------------------------------------------------------------------*/
24
25#ifndef _MUSICBRAINZ4_IPI_H
26#define _MUSICBRAINZ4_IPI_H
27
28#include <string>
29#include <iostream>
30
31#include "musicbrainz4/Entity.h"
32
33#include "musicbrainz4/xmlParser.h"
34
35namespace MusicBrainz4
36{
37 class CIPIPrivate;
38
39 class CIPI: public CEntity
40 {
41 public:
42 CIPI(const XMLNode& Node=XMLNode::emptyNode());
43 CIPI(const CIPI& Other);
44 CIPI& operator =(const CIPI& Other);
45 virtual ~CIPI();
46
47 virtual CIPI *Clone();
48
49 std::string IPI() const;
50
51 virtual std::ostream& Serialise(std::ostream& os) const;
52 static std::string GetElementName();
53
54 protected:
55 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
56 virtual void ParseElement(const XMLNode& Node);
57
58 private:
59 CIPIPrivate * const m_d;
60 };
61}
62
63#endif
064
=== added file 'include/musicbrainz4/IPIList.h'
--- include/musicbrainz4/IPIList.h 1970-01-01 00:00:00 +0000
+++ include/musicbrainz4/IPIList.h 2012-06-25 05:56:21 +0000
@@ -0,0 +1,37 @@
1/* --------------------------------------------------------------------------
2
3 libmusicbrainz4 - Client library to access MusicBrainz
4
5 Copyright (C) 2011 Andrew Hawkins
6
7 This file is part of libmusicbrainz4.
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.
12
13 libmusicbrainz4 is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21 $Id$
22
23----------------------------------------------------------------------------*/
24
25#ifndef _MUSICBRAINZ4_IPI_LIST_H
26#define _MUSICBRAINZ4_IPI_LIST_H
27
28#include "musicbrainz4/ListImpl.h"
29
30namespace MusicBrainz4
31{
32 class CIPI;
33
34 typedef CListImpl<CIPI> CIPIList;
35}
36
37#endif
038
=== modified file 'include/musicbrainz4/ISRC.h'
--- include/musicbrainz4/ISRC.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/ISRC.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: ISRC.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -51,8 +51,8 @@
51 static std::string GetElementName();51 static std::string GetElementName();
5252
53 protected:53 protected:
54 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);54 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
55 virtual bool ParseElement(const XMLNode& Node);55 virtual void ParseElement(const XMLNode& Node);
5656
57 private:57 private:
58 void Cleanup();58 void Cleanup();
5959
=== modified file 'include/musicbrainz4/ISRCList.h'
--- include/musicbrainz4/ISRCList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/ISRCList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: ISRCList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== added file 'include/musicbrainz4/ISWC.h'
--- include/musicbrainz4/ISWC.h 1970-01-01 00:00:00 +0000
+++ include/musicbrainz4/ISWC.h 2012-06-25 05:56:21 +0000
@@ -0,0 +1,65 @@
1/* --------------------------------------------------------------------------
2
3 libmusicbrainz4 - Client library to access MusicBrainz
4
5 Copyright (C) 2012 Andrew Hawkins
6
7 This file is part of libmusicbrainz4.
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.
12
13 libmusicbrainz4 is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21 $Id$
22
23----------------------------------------------------------------------------*/
24
25#ifndef _MUSICBRAINZ4_ISWC_H
26#define _MUSICBRAINZ4_ISWC_H
27
28#include <string>
29#include <iostream>
30
31#include "musicbrainz4/Entity.h"
32
33#include "musicbrainz4/xmlParser.h"
34
35namespace MusicBrainz4
36{
37 class CISWCPrivate;
38
39 class CISWC: public CEntity
40 {
41 public:
42 CISWC(const XMLNode& Node=XMLNode::emptyNode());
43 CISWC(const CISWC& Other);
44 CISWC& operator =(const CISWC& Other);
45 virtual ~CISWC();
46
47 virtual CISWC *Clone();
48
49 std::string ISWC() const;
50
51 virtual std::ostream& Serialise(std::ostream& os) const;
52 static std::string GetElementName();
53
54 protected:
55 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
56 virtual void ParseElement(const XMLNode& Node);
57
58 private:
59 void Cleanup();
60
61 CISWCPrivate * const m_d;
62 };
63}
64
65#endif
066
=== added file 'include/musicbrainz4/ISWCList.h'
--- include/musicbrainz4/ISWCList.h 1970-01-01 00:00:00 +0000
+++ include/musicbrainz4/ISWCList.h 2012-06-25 05:56:21 +0000
@@ -0,0 +1,62 @@
1/* --------------------------------------------------------------------------
2
3 libmusicbrainz4 - Client library to access MusicBrainz
4
5 Copyright (C) 2012 Andrew Hawkins
6
7 This file is part of libmusicbrainz4.
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.
12
13 libmusicbrainz4 is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21 $Id$
22
23----------------------------------------------------------------------------*/
24
25#ifndef _MUSICBRAINZ4_ISWC_LIST_H
26#define _MUSICBRAINZ4_ISWC_LIST_H
27
28#include <string>
29#include <iostream>
30
31#include "musicbrainz4/ListImpl.h"
32
33#include "musicbrainz4/xmlParser.h"
34
35namespace MusicBrainz4
36{
37 class CISWC;
38 class CISWCListPrivate;
39
40 class CISWCList: public CListImpl<CISWC>
41 {
42 public:
43 CISWCList(const XMLNode& Node=XMLNode::emptyNode());
44 CISWCList(const CISWCList& Other);
45 CISWCList& operator =(const CISWCList& Other);
46 virtual ~CISWCList();
47
48 virtual CISWCList *Clone();
49
50 virtual std::ostream& Serialise(std::ostream& os) const;
51 static std::string GetElementName();
52
53 protected:
54 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
55 virtual void ParseElement(const XMLNode& Node);
56
57 private:
58 CISWCListPrivate * const m_d;
59 };
60}
61
62#endif
063
=== modified file 'include/musicbrainz4/Label.h'
--- include/musicbrainz4/Label.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Label.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Label.h 13265 2011-08-25 12:53:44Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -29,6 +29,7 @@
29#include <iostream>29#include <iostream>
3030
31#include "musicbrainz4/Entity.h"31#include "musicbrainz4/Entity.h"
32#include "musicbrainz4/IPIList.h"
32#include "musicbrainz4/ReleaseList.h"33#include "musicbrainz4/ReleaseList.h"
33#include "musicbrainz4/AliasList.h"34#include "musicbrainz4/AliasList.h"
34#include "musicbrainz4/RelationList.h"35#include "musicbrainz4/RelationList.h"
@@ -60,13 +61,39 @@
60 std::string Name() const;61 std::string Name() const;
61 std::string SortName() const;62 std::string SortName() const;
62 int LabelCode() const;63 int LabelCode() const;
63 std::string IPI() const;64
65 /**
66 * @deprecated Returns one of the IPIs for this label
67 *
68 * Returns one of the IPIs for this label. To return all
69 * IPIs, see MusicBrainz4::CLabel::IPIList
70 *
71 * <b>This method is deprecated, please use MusicBrainz4::CLabel::IPIList</b>
72 *
73 * @return One of the IPIs for this label
74 */
75
76 LIBMB4_DEPRECATED(MusicBrainz4::CLabel::IPIList) std::string IPI() const;
77 CIPIList *IPIList() const;
64 std::string Disambiguation() const;78 std::string Disambiguation() const;
65 std::string Country() const;79 std::string Country() const;
66 CLifespan *Lifespan() const;80 CLifespan *Lifespan() const;
67 CAliasList *AliasList() const;81 CAliasList *AliasList() const;
68 CReleaseList *ReleaseList() const;82 CReleaseList *ReleaseList() const;
69 CRelationList *RelationList() const;83
84 /**
85 * @deprecated Returns the <b>last</b> relation list for this label
86 *
87 * Returns the <b>last</b> relation list for this label. To return all
88 * relation lists, see MusicBrainz4::CLabel::RelationListList
89 *
90 * <b>This method is deprecated, please use MusicBrainz4::CLabel::RelationListList</b>
91 *
92 * @return The <b>last</b> relation list for this label
93 */
94
95 LIBMB4_DEPRECATED(MusicBrainz4::CLabel::RelationListList) CRelationList *RelationList() const;
96 CRelationListList *RelationListList() const;
70 CTagList *TagList() const;97 CTagList *TagList() const;
71 CUserTagList *UserTagList() const;98 CUserTagList *UserTagList() const;
72 CRating *Rating() const;99 CRating *Rating() const;
@@ -76,8 +103,8 @@
76 static std::string GetElementName();103 static std::string GetElementName();
77104
78 protected:105 protected:
79 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);106 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
80 virtual bool ParseElement(const XMLNode& Node);107 virtual void ParseElement(const XMLNode& Node);
81108
82 private:109 private:
83 void Cleanup();110 void Cleanup();
84111
=== modified file 'include/musicbrainz4/LabelInfo.h'
--- include/musicbrainz4/LabelInfo.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/LabelInfo.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: LabelInfo.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -55,8 +55,8 @@
55 static std::string GetElementName();55 static std::string GetElementName();
5656
57 protected:57 protected:
58 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);58 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
59 virtual bool ParseElement(const XMLNode& Node);59 virtual void ParseElement(const XMLNode& Node);
6060
61 private:61 private:
62 void Cleanup();62 void Cleanup();
6363
=== modified file 'include/musicbrainz4/LabelInfoList.h'
--- include/musicbrainz4/LabelInfoList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/LabelInfoList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: LabelInfoList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/LabelList.h'
--- include/musicbrainz4/LabelList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/LabelList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: LabelList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/Lifespan.h'
--- include/musicbrainz4/Lifespan.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Lifespan.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Lifespan.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -48,13 +48,14 @@
4848
49 std::string Begin() const;49 std::string Begin() const;
50 std::string End() const;50 std::string End() const;
51 std::string Ended() const;
5152
52 virtual std::ostream& Serialise(std::ostream& os) const;53 virtual std::ostream& Serialise(std::ostream& os) const;
53 static std::string GetElementName();54 static std::string GetElementName();
5455
55 protected:56 protected:
56 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);57 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
57 virtual bool ParseElement(const XMLNode& Node);58 virtual void ParseElement(const XMLNode& Node);
5859
59 private:60 private:
60 CLifespanPrivate * const m_d;61 CLifespanPrivate * const m_d;
6162
=== modified file 'include/musicbrainz4/List.h'
--- include/musicbrainz4/List.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/List.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: List.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -51,8 +51,8 @@
51 static std::string GetElementName();51 static std::string GetElementName();
5252
53 protected:53 protected:
54 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);54 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
55 virtual bool ParseElement(const XMLNode& Node);55 virtual void ParseElement(const XMLNode& Node);
5656
57 void AddItem(CEntity *Item);57 void AddItem(CEntity *Item);
58 CEntity *Item(int Item) const;58 CEntity *Item(int Item) const;
5959
=== modified file 'include/musicbrainz4/ListImpl.h'
--- include/musicbrainz4/ListImpl.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/ListImpl.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: ListImpl.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -101,26 +101,20 @@
101 }101 }
102102
103 protected:103 protected:
104 bool ParseElement(const XMLNode& Node)104 void ParseElement(const XMLNode& Node)
105 {105 {
106 bool RetVal=true;
107
108 std::string NodeName=Node.getName();106 std::string NodeName=Node.getName();
109107
110 if (T::GetElementName()==NodeName)108 if (T::GetElementName()==NodeName)
111 {109 {
112 T *Item=0;110 T *Item=0;
113111
114 RetVal=ProcessItem(Node,Item);112 ProcessItem(Node,Item);
115 if (RetVal)113 AddItem(Item);
116 AddItem(Item);
117 }114 }
118 else115 else
119 RetVal=CList::ParseElement(Node);116 CList::ParseElement(Node);
120
121 return RetVal;
122 }117 }
123
124 };118 };
125}119}
126120
127121
=== modified file 'include/musicbrainz4/Medium.h'
--- include/musicbrainz4/Medium.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Medium.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Medium.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -60,8 +60,8 @@
60 static std::string GetElementName();60 static std::string GetElementName();
6161
62 protected:62 protected:
63 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);63 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
64 virtual bool ParseElement(const XMLNode& Node);64 virtual void ParseElement(const XMLNode& Node);
6565
66 private:66 private:
67 void Cleanup();67 void Cleanup();
6868
=== modified file 'include/musicbrainz4/MediumList.h'
--- include/musicbrainz4/MediumList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/MediumList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: MediumList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -53,8 +53,8 @@
53 static std::string GetElementName();53 static std::string GetElementName();
5454
55 protected:55 protected:
56 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);56 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
57 virtual bool ParseElement(const XMLNode& Node);57 virtual void ParseElement(const XMLNode& Node);
5858
59 private:59 private:
60 CMediumListPrivate * const m_d;60 CMediumListPrivate * const m_d;
6161
=== modified file 'include/musicbrainz4/Message.h'
--- include/musicbrainz4/Message.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Message.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Message.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -52,8 +52,8 @@
52 static std::string GetElementName();52 static std::string GetElementName();
5353
54 protected:54 protected:
55 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);55 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
56 virtual bool ParseElement(const XMLNode& Node);56 virtual void ParseElement(const XMLNode& Node);
5757
58 private:58 private:
59 CMessagePrivate * const m_d;59 CMessagePrivate * const m_d;
6060
=== modified file 'include/musicbrainz4/Metadata.h'
--- include/musicbrainz4/Metadata.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Metadata.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Metadata.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -112,8 +112,8 @@
112 static std::string GetElementName();112 static std::string GetElementName();
113113
114 protected:114 protected:
115 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);115 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
116 virtual bool ParseElement(const XMLNode& Node);116 virtual void ParseElement(const XMLNode& Node);
117117
118 private:118 private:
119 void Cleanup();119 void Cleanup();
120120
=== modified file 'include/musicbrainz4/NameCredit.h'
--- include/musicbrainz4/NameCredit.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/NameCredit.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: NameCredit.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -56,8 +56,8 @@
56 static std::string GetElementName();56 static std::string GetElementName();
5757
58 protected:58 protected:
59 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);59 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
60 virtual bool ParseElement(const XMLNode& Node);60 virtual void ParseElement(const XMLNode& Node);
6161
62 private:62 private:
63 void Cleanup();63 void Cleanup();
6464
=== modified file 'include/musicbrainz4/NameCreditList.h'
--- include/musicbrainz4/NameCreditList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/NameCreditList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: NameCreditList.h 13254 2011-08-09 09:29:20Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/NonMBTrack.h'
--- include/musicbrainz4/NonMBTrack.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/NonMBTrack.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: NonMBTrack.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -54,8 +54,8 @@
54 static std::string GetElementName();54 static std::string GetElementName();
5555
56 protected:56 protected:
57 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);57 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
58 virtual bool ParseElement(const XMLNode& Node);58 virtual void ParseElement(const XMLNode& Node);
5959
60 private:60 private:
61 CNonMBTrackPrivate * const m_d;61 CNonMBTrackPrivate * const m_d;
6262
=== modified file 'include/musicbrainz4/NonMBTrackList.h'
--- include/musicbrainz4/NonMBTrackList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/NonMBTrackList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: NonMBTrackList.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/PUID.h'
--- include/musicbrainz4/PUID.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/PUID.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: PUID.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -53,8 +53,8 @@
53 static std::string GetElementName();53 static std::string GetElementName();
5454
55 protected:55 protected:
56 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);56 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
57 virtual bool ParseElement(const XMLNode& Node);57 virtual void ParseElement(const XMLNode& Node);
5858
59 private:59 private:
60 void Cleanup();60 void Cleanup();
6161
=== modified file 'include/musicbrainz4/PUIDList.h'
--- include/musicbrainz4/PUIDList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/PUIDList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: PUIDList.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/Query.h'
--- include/musicbrainz4/Query.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Query.h 2012-06-25 05:56:21 +0000
@@ -18,13 +18,17 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Query.h 13266 2011-08-25 12:56:47Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
25#ifndef _MUSICBRAINZ4_QUERY_H25#ifndef _MUSICBRAINZ4_QUERY_H
26#define _MUSICBRAINZ4_QUERY_H26#define _MUSICBRAINZ4_QUERY_H
2727
28#include "defines.h"
29
30#include "Entity.h"
31
28#include "musicbrainz4/ReleaseList.h"32#include "musicbrainz4/ReleaseList.h"
29#include "musicbrainz4/Metadata.h"33#include "musicbrainz4/Metadata.h"
3034
@@ -47,6 +51,23 @@
47 * Please report any issues with this library at51 * Please report any issues with this library at
48 * <a target="_blank" href="http://tickets.musicbrainz.org/">http://tickets.musicbrainz.org/</a>.52 * <a target="_blank" href="http://tickets.musicbrainz.org/">http://tickets.musicbrainz.org/</a>.
49 *53 *
54 * @par Compiling and Linking
55 *
56 * This package provides a pkg-config script that returns the necessary compiler
57 * and linker flags, as well as the version number. To build a small sample
58 * program one would use:
59 *
60 * @par
61 * <tt>g++ -o test_app test_app.cpp `pkg-config libmusicbrainz4 --cflags --libs`</tt>
62 *
63 * If you don't want/can't use pkg-config and you are using the C API, make sure
64 * you link in the C++ standard library:
65 *
66 * @par
67 * <tt>gcc -o test_app test_app.c -lmusicbrainz4 -lm -lstdc++</tt>
68 *
69 * @par Example:
70 *
50 * A brief example showing how to lookup a list of releases matching a disc id71 * A brief example showing how to lookup a list of releases matching a disc id
51 *72 *
52@code73@code
5374
=== modified file 'include/musicbrainz4/Rating.h'
--- include/musicbrainz4/Rating.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Rating.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Rating.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -52,8 +52,8 @@
52 static std::string GetElementName();52 static std::string GetElementName();
5353
54 protected:54 protected:
55 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);55 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
56 virtual bool ParseElement(const XMLNode& Node);56 virtual void ParseElement(const XMLNode& Node);
5757
58 private:58 private:
59 CRatingPrivate * const m_d;59 CRatingPrivate * const m_d;
6060
=== modified file 'include/musicbrainz4/Recording.h'
--- include/musicbrainz4/Recording.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Recording.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Recording.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -69,7 +69,20 @@
69 CReleaseList *ReleaseList() const;69 CReleaseList *ReleaseList() const;
70 CPUIDList *PUIDList() const;70 CPUIDList *PUIDList() const;
71 CISRCList *ISRCList() const;71 CISRCList *ISRCList() const;
72 CRelationList *RelationList() const;72
73 /**
74 * @deprecated Returns the <b>last</b> relation list for this recording
75 *
76 * Returns the <b>last</b> relation list for this recording. To return all
77 * relation lists, see MusicBrainz4::CRecording::RelationListList
78 *
79 * <b>This method is deprecated, please use MusicBrainz4::CRecording::RelationListList</b>
80 *
81 * @return The <b>last</b> relation list for this recording
82 */
83
84 LIBMB4_DEPRECATED(MusicBrainz4::CRecording::RelationListList) CRelationList *RelationList() const;
85 CRelationListList *RelationListList() const;
73 CTagList *TagList() const;86 CTagList *TagList() const;
74 CUserTagList *UserTagList() const;87 CUserTagList *UserTagList() const;
75 CRating *Rating() const;88 CRating *Rating() const;
@@ -79,8 +92,8 @@
79 static std::string GetElementName();92 static std::string GetElementName();
8093
81 protected:94 protected:
82 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);95 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
83 virtual bool ParseElement(const XMLNode& Node);96 virtual void ParseElement(const XMLNode& Node);
8497
85 private:98 private:
86 void Cleanup();99 void Cleanup();
87100
=== modified file 'include/musicbrainz4/RecordingList.h'
--- include/musicbrainz4/RecordingList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/RecordingList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: RecordingList.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/Relation.h'
--- include/musicbrainz4/Relation.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Relation.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Relation.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -71,8 +71,8 @@
71 static std::string GetElementName();71 static std::string GetElementName();
7272
73 protected:73 protected:
74 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);74 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
75 virtual bool ParseElement(const XMLNode& Node);75 virtual void ParseElement(const XMLNode& Node);
7676
77 private:77 private:
78 void Cleanup();78 void Cleanup();
7979
=== modified file 'include/musicbrainz4/RelationList.h'
--- include/musicbrainz4/RelationList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/RelationList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: RelationList.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -53,8 +53,8 @@
53 static std::string GetElementName();53 static std::string GetElementName();
5454
55 protected:55 protected:
56 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);56 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
57 virtual bool ParseElement(const XMLNode& Node);57 virtual void ParseElement(const XMLNode& Node);
5858
59 private:59 private:
60 CRelationListPrivate * const m_d;60 CRelationListPrivate * const m_d;
6161
=== added file 'include/musicbrainz4/RelationListList.h'
--- include/musicbrainz4/RelationListList.h 1970-01-01 00:00:00 +0000
+++ include/musicbrainz4/RelationListList.h 2012-06-25 05:56:21 +0000
@@ -0,0 +1,63 @@
1/* --------------------------------------------------------------------------
2
3 libmusicbrainz4 - Client library to access MusicBrainz
4
5 Copyright (C) 2011 Andrew Hawkins
6
7 This file is part of libmusicbrainz4.
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.
12
13 libmusicbrainz4 is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21 $Id$
22
23----------------------------------------------------------------------------*/
24
25#ifndef _MUSICBRAINZ4_RELATIONLIST_GROUP_H
26#define _MUSICBRAINZ4_RELATIONLIST_GROUP_H
27
28#include <iostream>
29
30#include "musicbrainz4/xmlParser.h"
31
32namespace MusicBrainz4
33{
34 class CRelationListListPrivate;
35
36 class CRelationList;
37
38 class CRelationListList
39 {
40 public:
41 CRelationListList();
42 CRelationListList(const CRelationListList& Other);
43 CRelationListList& operator =(const CRelationListList& Other);
44 virtual ~CRelationListList();
45
46 void Add(CRelationList *RelationList);
47 int NumItems() const;
48 CRelationList *Item(int Item) const;
49 int Offset() const { return 0; }
50 int Count() const { return NumItems(); }
51
52 std::ostream& Serialise(std::ostream& os) const;
53
54 private:
55 void Cleanup();
56
57 CRelationListListPrivate * const m_d;
58 };
59}
60
61std::ostream& operator << (std::ostream& os, const MusicBrainz4::CRelationListList& RelationListList);
62
63#endif
064
=== modified file 'include/musicbrainz4/Release.h'
--- include/musicbrainz4/Release.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Release.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Release.h 13385 2012-01-15 15:19:56Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -70,7 +70,20 @@
70 std::string ASIN() const;70 std::string ASIN() const;
71 CLabelInfoList *LabelInfoList() const;71 CLabelInfoList *LabelInfoList() const;
72 CMediumList *MediumList() const;72 CMediumList *MediumList() const;
73 CRelationList *RelationList() const;73
74 /**
75 * @deprecated Returns the <b>last</b> relation list for this release
76 *
77 * Returns the <b>last</b> relation list for this release. To return all
78 * relation lists, see MusicBrainz4::CRelease::RelationListList
79 *
80 * <b>This method is deprecated, please use MusicBrainz4::CRelease::RelationListList</b>
81 *
82 * @return The <b>last</b> relation list for this release
83 */
84
85 LIBMB4_DEPRECATED(MusicBrainz4::CRelease::RelationListList) CRelationList *RelationList() const;
86 CRelationListList *RelationListList() const;
74 CCollectionList *CollectionList() const;87 CCollectionList *CollectionList() const;
7588
76 CMediumList MediaMatchingDiscID(const std::string& DiscID) const;89 CMediumList MediaMatchingDiscID(const std::string& DiscID) const;
@@ -79,8 +92,8 @@
79 static std::string GetElementName();92 static std::string GetElementName();
8093
81 protected:94 protected:
82 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);95 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
83 virtual bool ParseElement(const XMLNode& Node);96 virtual void ParseElement(const XMLNode& Node);
8497
85 private:98 private:
86 void Cleanup();99 void Cleanup();
87100
=== modified file 'include/musicbrainz4/ReleaseGroup.h'
--- include/musicbrainz4/ReleaseGroup.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/ReleaseGroup.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: ReleaseGroup.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -33,6 +33,7 @@
33#include "musicbrainz4/RelationList.h"33#include "musicbrainz4/RelationList.h"
34#include "musicbrainz4/TagList.h"34#include "musicbrainz4/TagList.h"
35#include "musicbrainz4/UserTagList.h"35#include "musicbrainz4/UserTagList.h"
36#include "musicbrainz4/SecondaryTypeList.h"
3637
37#include "musicbrainz4/xmlParser.h"38#include "musicbrainz4/xmlParser.h"
3839
@@ -43,6 +44,7 @@
43 class CArtistCredit;44 class CArtistCredit;
44 class CRating;45 class CRating;
45 class CUserRating;46 class CUserRating;
47 class CSecondaryType;
4648
47 class CReleaseGroup: public CEntity49 class CReleaseGroup: public CEntity
48 {50 {
@@ -55,24 +57,51 @@
55 virtual CReleaseGroup *Clone();57 virtual CReleaseGroup *Clone();
5658
57 std::string ID() const;59 std::string ID() const;
58 std::string Type() const;60
61 /**
62 * @deprecated Returns the type for this release group
63 *
64 * Returns the type for this release group.
65 *
66 * <b>This method is deprecated, please use MusicBrainz4::CReleaseGroup::PrimaryType
67 * and MusicBrainz4::CReleaseGroup::SecondaryTypeList</b>
68 *
69 * @return The type for this release group
70 */
71
72 LIBMB4_DEPRECATED(MusicBrainz4::CReleaseGroup::PrimaryType) std::string Type() const;
73 std::string PrimaryType() const;
59 std::string Title() const;74 std::string Title() const;
60 std::string Disambiguation() const;75 std::string Disambiguation() const;
61 std::string FirstReleaseDate() const;76 std::string FirstReleaseDate() const;
62 CArtistCredit *ArtistCredit() const;77 CArtistCredit *ArtistCredit() const;
63 CReleaseList *ReleaseList() const;78 CReleaseList *ReleaseList() const;
64 CRelationList *RelationList() const;79
80 /**
81 * @deprecated Returns the <b>last</b> relation list for this release group
82 *
83 * Returns the <b>last</b> relation list for this release group. To return all
84 * relation lists, see MusicBrainz4::CReleaseGroup::RelationListList
85 *
86 * <b>This method is deprecated, please use MusicBrainz4::CReleaseGroup::RelationListList</b>
87 *
88 * @return The <b>last</b> relation list for this release group
89 */
90
91 LIBMB4_DEPRECATED(MusicBrainz4::CReleaseGroup::RelationListList) CRelationList *RelationList() const;
92 CRelationListList *RelationListList() const;
65 CTagList *TagList() const;93 CTagList *TagList() const;
66 CUserTagList *UserTagList() const;94 CUserTagList *UserTagList() const;
67 CRating *Rating() const;95 CRating *Rating() const;
68 CUserRating *UserRating() const;96 CUserRating *UserRating() const;
97 CSecondaryTypeList *SecondaryTypeList() const;
6998
70 virtual std::ostream& Serialise(std::ostream& os) const;99 virtual std::ostream& Serialise(std::ostream& os) const;
71 static std::string GetElementName();100 static std::string GetElementName();
72101
73 protected:102 protected:
74 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);103 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
75 virtual bool ParseElement(const XMLNode& Node);104 virtual void ParseElement(const XMLNode& Node);
76105
77 private:106 private:
78 void Cleanup();107 void Cleanup();
79108
=== modified file 'include/musicbrainz4/ReleaseGroupList.h'
--- include/musicbrainz4/ReleaseGroupList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/ReleaseGroupList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: ReleaseGroupList.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/ReleaseList.h'
--- include/musicbrainz4/ReleaseList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/ReleaseList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: ReleaseList.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== added file 'include/musicbrainz4/SecondaryType.h'
--- include/musicbrainz4/SecondaryType.h 1970-01-01 00:00:00 +0000
+++ include/musicbrainz4/SecondaryType.h 2012-06-25 05:56:21 +0000
@@ -0,0 +1,65 @@
1/* --------------------------------------------------------------------------
2
3 libmusicbrainz4 - Client library to access MusicBrainz
4
5 Copyright (C) 2012 Andrew Hawkins
6
7 This file is part of libmusicbrainz4.
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.
12
13 libmusicbrainz4 is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21 $Id$
22
23----------------------------------------------------------------------------*/
24
25#ifndef _MUSICBRAINZ4_SECONDARY_TYPE_H
26#define _MUSICBRAINZ4_SECONDARY_TYPE_H
27
28#include <string>
29#include <iostream>
30
31#include "musicbrainz4/Entity.h"
32
33#include "musicbrainz4/xmlParser.h"
34
35namespace MusicBrainz4
36{
37 class CSecondaryTypePrivate;
38
39 class CSecondaryType: public CEntity
40 {
41 public:
42 CSecondaryType(const XMLNode& Node=XMLNode::emptyNode());
43 CSecondaryType(const CSecondaryType& Other);
44 CSecondaryType& operator =(const CSecondaryType& Other);
45 virtual ~CSecondaryType();
46
47 virtual CSecondaryType *Clone();
48
49 std::string SecondaryType() const;
50
51 virtual std::ostream& Serialise(std::ostream& os) const;
52 static std::string GetElementName();
53
54 protected:
55 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
56 virtual void ParseElement(const XMLNode& Node);
57
58 private:
59 void Cleanup();
60
61 CSecondaryTypePrivate * const m_d;
62 };
63}
64
65#endif
066
=== added file 'include/musicbrainz4/SecondaryTypeList.h'
--- include/musicbrainz4/SecondaryTypeList.h 1970-01-01 00:00:00 +0000
+++ include/musicbrainz4/SecondaryTypeList.h 2012-06-25 05:56:21 +0000
@@ -0,0 +1,62 @@
1/* --------------------------------------------------------------------------
2
3 libmusicbrainz4 - Client library to access MusicBrainz
4
5 Copyright (C) 2012 Andrew Hawkins
6
7 This file is part of libmusicbrainz4.
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.
12
13 libmusicbrainz4 is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21 $Id$
22
23----------------------------------------------------------------------------*/
24
25#ifndef _MUSICBRAINZ4_SECONDARY_TYPE_LIST_H
26#define _MUSICBRAINZ4_SECONDARY_TYPE_LIST_H
27
28#include <string>
29#include <iostream>
30
31#include "musicbrainz4/ListImpl.h"
32
33#include "musicbrainz4/xmlParser.h"
34
35namespace MusicBrainz4
36{
37 class CSecondaryType;
38 class CSecondaryTypeListPrivate;
39
40 class CSecondaryTypeList: public CListImpl<CSecondaryType>
41 {
42 public:
43 CSecondaryTypeList(const XMLNode& Node=XMLNode::emptyNode());
44 CSecondaryTypeList(const CSecondaryTypeList& Other);
45 CSecondaryTypeList& operator =(const CSecondaryTypeList& Other);
46 virtual ~CSecondaryTypeList();
47
48 virtual CSecondaryTypeList *Clone();
49
50 virtual std::ostream& Serialise(std::ostream& os) const;
51 static std::string GetElementName();
52
53 protected:
54 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
55 virtual void ParseElement(const XMLNode& Node);
56
57 private:
58 CSecondaryTypeListPrivate * const m_d;
59 };
60}
61
62#endif
063
=== modified file 'include/musicbrainz4/Tag.h'
--- include/musicbrainz4/Tag.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Tag.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Tag.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -53,8 +53,8 @@
53 static std::string GetElementName();53 static std::string GetElementName();
5454
55 protected:55 protected:
56 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);56 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
57 virtual bool ParseElement(const XMLNode& Node);57 virtual void ParseElement(const XMLNode& Node);
5858
59 private:59 private:
60 CTagPrivate * const m_d;60 CTagPrivate * const m_d;
6161
=== modified file 'include/musicbrainz4/TagList.h'
--- include/musicbrainz4/TagList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/TagList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: TagList.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/TextRepresentation.h'
--- include/musicbrainz4/TextRepresentation.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/TextRepresentation.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: TextRepresentation.h 13263 2011-08-25 12:38:04Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -53,8 +53,8 @@
53 static std::string GetElementName();53 static std::string GetElementName();
5454
55 protected:55 protected:
56 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);56 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
57 virtual bool ParseElement(const XMLNode& Node);57 virtual void ParseElement(const XMLNode& Node);
5858
59 private:59 private:
60 CTextRepresentationPrivate * const m_d;60 CTextRepresentationPrivate * const m_d;
6161
=== modified file 'include/musicbrainz4/Track.h'
--- include/musicbrainz4/Track.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Track.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Track.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -54,13 +54,14 @@
54 CRecording *Recording() const;54 CRecording *Recording() const;
55 int Length() const;55 int Length() const;
56 CArtistCredit *ArtistCredit() const;56 CArtistCredit *ArtistCredit() const;
57 std::string Number() const;
5758
58 virtual std::ostream& Serialise(std::ostream& os) const;59 virtual std::ostream& Serialise(std::ostream& os) const;
59 static std::string GetElementName();60 static std::string GetElementName();
6061
61 protected:62 protected:
62 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);63 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
63 virtual bool ParseElement(const XMLNode& Node);64 virtual void ParseElement(const XMLNode& Node);
6465
65 private:66 private:
66 void Cleanup();67 void Cleanup();
6768
=== modified file 'include/musicbrainz4/TrackList.h'
--- include/musicbrainz4/TrackList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/TrackList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: TrackList.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/UserRating.h'
--- include/musicbrainz4/UserRating.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/UserRating.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: UserRating.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -51,8 +51,8 @@
51 static std::string GetElementName();51 static std::string GetElementName();
5252
53 protected:53 protected:
54 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);54 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
55 virtual bool ParseElement(const XMLNode& Node);55 virtual void ParseElement(const XMLNode& Node);
5656
57 private:57 private:
58 CUserRatingPrivate * const m_d;58 CUserRatingPrivate * const m_d;
5959
=== modified file 'include/musicbrainz4/UserTag.h'
--- include/musicbrainz4/UserTag.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/UserTag.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: UserTag.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -52,8 +52,8 @@
52 static std::string GetElementName();52 static std::string GetElementName();
5353
54 protected:54 protected:
55 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);55 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
56 virtual bool ParseElement(const XMLNode& Node);56 virtual void ParseElement(const XMLNode& Node);
5757
58 private:58 private:
59 CUserTagPrivate * const m_d;59 CUserTagPrivate * const m_d;
6060
=== modified file 'include/musicbrainz4/UserTagList.h'
--- include/musicbrainz4/UserTagList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/UserTagList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: UserTagList.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== modified file 'include/musicbrainz4/Work.h'
--- include/musicbrainz4/Work.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/Work.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: Work.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
@@ -32,6 +32,7 @@
32#include "musicbrainz4/RelationList.h"32#include "musicbrainz4/RelationList.h"
33#include "musicbrainz4/TagList.h"33#include "musicbrainz4/TagList.h"
34#include "musicbrainz4/UserTagList.h"34#include "musicbrainz4/UserTagList.h"
35#include "musicbrainz4/ISWCList.h"
3536
36#include "musicbrainz4/xmlParser.h"37#include "musicbrainz4/xmlParser.h"
3738
@@ -58,21 +59,49 @@
58 std::string Type() const;59 std::string Type() const;
59 std::string Title() const;60 std::string Title() const;
60 CArtistCredit *ArtistCredit() const;61 CArtistCredit *ArtistCredit() const;
61 std::string ISWC() const;62
63 /**
64 * @deprecated Returns the <b>first</b> ISWC for this work
65 *
66 * Returns the <b>first</b> ISWC for this work. To return all
67 * ISWCs, see MusicBrainz4::CWork::ISWCList
68 *
69 * <b>This method is deprecated, please use MusicBrainz4::CWork::ISWCList</b>
70 *
71 * @return The <b>first</b> ISWC for this work
72 */
73
74 LIBMB4_DEPRECATED(MusicBrainz4::CWork::ISWCList) std::string ISWC() const;
75
76 CISWCList *ISWCList() const;
62 std::string Disambiguation() const;77 std::string Disambiguation() const;
63 CAliasList *AliasList() const;78 CAliasList *AliasList() const;
64 CRelationList *RelationList() const;79
80 /**
81 * @deprecated Returns the <b>last</b> relation list for this work
82 *
83 * Returns the <b>last</b> relation list for this work. To return all
84 * relation lists, see MusicBrainz4::CWork::RelationListList
85 *
86 * <b>This method is deprecated, please use MusicBrainz4::CWork::RelationListList</b>
87 *
88 * @return The <b>last</b> relation list for this work
89 */
90
91 LIBMB4_DEPRECATED(MusicBrainz4::CWork::RelationListList) CRelationList *RelationList() const;
92 CRelationListList *RelationListList() const;
65 CTagList *TagList() const;93 CTagList *TagList() const;
66 CUserTagList *UserTagList() const;94 CUserTagList *UserTagList() const;
67 CRating *Rating() const;95 CRating *Rating() const;
68 CUserRating *UserRating() const;96 CUserRating *UserRating() const;
97 std::string Language() const;
6998
70 virtual std::ostream& Serialise(std::ostream& os) const;99 virtual std::ostream& Serialise(std::ostream& os) const;
71 static std::string GetElementName();100 static std::string GetElementName();
72101
73 protected:102 protected:
74 virtual bool ParseAttribute(const std::string& Name, const std::string& Value);103 virtual void ParseAttribute(const std::string& Name, const std::string& Value);
75 virtual bool ParseElement(const XMLNode& Node);104 virtual void ParseElement(const XMLNode& Node);
76105
77 private:106 private:
78 void Cleanup();107 void Cleanup();
79108
=== modified file 'include/musicbrainz4/WorkList.h'
--- include/musicbrainz4/WorkList.h 2012-02-01 17:18:10 +0000
+++ include/musicbrainz4/WorkList.h 2012-06-25 05:56:21 +0000
@@ -18,7 +18,7 @@
18 You should have received a copy of the GNU General Public License18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.19 along with this library. If not, see <http://www.gnu.org/licenses/>.
2020
21 $Id: WorkList.h 13259 2011-08-10 12:02:50Z adhawkins $21 $Id$
2222
23----------------------------------------------------------------------------*/23----------------------------------------------------------------------------*/
2424
2525
=== added file 'include/musicbrainz4/defines.h'
--- include/musicbrainz4/defines.h 1970-01-01 00:00:00 +0000
+++ include/musicbrainz4/defines.h 2012-06-25 05:56:21 +0000
@@ -0,0 +1,42 @@
1/* --------------------------------------------------------------------------
2
3 libmusicbrainz4 - Client library to access MusicBrainz
4
5 Copyright (C) 2012 Andrew Hawkins
6
7 This file is part of libmusicbrainz4.
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.
12
13 libmusicbrainz4 is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21 $Id$
22
23----------------------------------------------------------------------------*/
24
25#ifndef _DEFINES_H
26#define _DEFINES_H
27
28#if defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
29
30#define LIBMB4_DEPRECATED(f) __attribute__((deprecated("Use '" #f "' instead")))
31
32#elif defined(__GNUC__) && __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
33
34#define LIBMB4_DEPRECATED(f) __attribute__ ((deprecated))
35
36#else
37
38#define LIBMB4_DEPRECATED(f)
39
40#endif
41
42#endif
043
=== removed directory 'schema'
=== removed file 'schema/musicbrainz_mmd-1.0.rng'
--- schema/musicbrainz_mmd-1.0.rng 2012-02-01 17:18:10 +0000
+++ schema/musicbrainz_mmd-1.0.rng 1970-01-01 00:00:00 +0000
@@ -1,585 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!-- ==================================================================
4 $Id: musicbrainz_mmd-1.0.rng 7511 2006-05-10 20:06:24Z matt $
5
6 Relax NG Schema for MusicBrainz XML Metadata Version 1.0
7
8
9 This XML schema has been designed to represent music metadata.
10 Documentation and the latest revision can be found at
11
12 http://musicbrainz.org/development/mmd/
13
14
15 Copyright (c) 2006 Robert Kaye, Matthias Friedrich
16
17 The schema is released under the Creative Commons
18 Attribution-ShareAlike 2.5 license.
19
20 http://creativecommons.org/licenses/by-sa/2.5/
21
22 ================================================================== -->
23
24
25<grammar xmlns="http://relaxng.org/ns/structure/1.0"
26 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
27 ns="http://musicbrainz.org/ns/mmd-1.0#">
28
29
30 <start>
31 <ref name="def_metadata-element"/>
32 </start>
33
34
35 <define name="def_metadata-element">
36 <element name="metadata">
37 <optional>
38 <attribute name="generator">
39 <data type="anyURI"/>
40 </attribute>
41 </optional>
42 <optional>
43 <attribute name="created">
44 <data type="dateTime"/>
45 </attribute>
46 </optional>
47
48 <optional>
49 <ref name="def_artist-element"/>
50 </optional>
51 <optional>
52 <ref name="def_release-element"/>
53 </optional>
54 <optional>
55 <ref name="def_track-element"/>
56 </optional>
57
58 <optional>
59 <ref name="def_artist-list"/>
60 </optional>
61 <optional>
62 <ref name="def_release-list"/>
63 </optional>
64 <optional>
65 <ref name="def_track-list"/>
66 </optional>
67
68 <ref name="def_metadata-element_extension"/>
69 </element>
70 </define>
71
72
73 <define name="def_artist-element">
74 <element name="artist">
75 <optional>
76 <attribute name="id">
77 <data type="anyURI"/>
78 </attribute>
79 </optional>
80 <optional>
81 <attribute name="type">
82 <data type="anyURI"/>
83 </attribute>
84 </optional>
85 <ref name="def_artist-attribute_extension"/>
86
87 <optional>
88 <element name="name">
89 <text/>
90 </element>
91 </optional>
92 <optional>
93 <element name="sort-name">
94 <text/>
95 </element>
96 </optional>
97 <optional>
98 <element name="disambiguation">
99 <text/>
100 </element>
101 </optional>
102 <optional>
103 <element name="life-span">
104 <optional>
105 <attribute name="begin">
106 <ref name="def_incomplete-date"/>
107 </attribute>
108 </optional>
109 <optional>
110 <attribute name="end">
111 <ref name="def_incomplete-date"/>
112 </attribute>
113 </optional>
114 </element>
115 </optional>
116
117 <optional>
118 <ref name="def_alias-list"/>
119 </optional>
120 <optional>
121 <ref name="def_release-list"/>
122 </optional>
123 <zeroOrMore>
124 <ref name="def_relation-list"/>
125 </zeroOrMore>
126
127 <ref name="def_artist-element_extension"/>
128 </element>
129 </define>
130
131
132 <define name="def_release-element">
133 <element name="release">
134 <optional>
135 <attribute name="id">
136 <data type="anyURI"/>
137 </attribute>
138 </optional>
139 <optional>
140 <attribute name="type">
141 <ref name="def_URI-list"/>
142 </attribute>
143 </optional>
144 <ref name="def_release-attribute_extension"/>
145
146 <optional>
147 <element name="title">
148 <text/>
149 </element>
150 </optional>
151 <optional>
152 <element name="text-representation">
153 <optional>
154 <attribute name="language">
155 <ref name="def_iso-639"/>
156 </attribute>
157 </optional>
158 <optional>
159 <attribute name="script">
160 <ref name="def_iso-15924"/>
161 </attribute>
162 </optional>
163 </element>
164 </optional>
165 <optional>
166 <element name="asin">
167 <data type="string">
168 <param name="pattern">[A-Z0-9]{10}</param>
169 </data>
170 </element>
171 </optional>
172 <optional>
173 <ref name="def_artist-element"/>
174 </optional>
175
176 <optional>
177 <ref name="def_release-event-list"/>
178 </optional>
179 <optional>
180 <ref name="def_disc-list"/>
181 </optional>
182 <optional>
183 <ref name="def_puid-list"/>
184 </optional>
185 <optional>
186 <ref name="def_track-list"/>
187 </optional>
188 <zeroOrMore>
189 <ref name="def_relation-list"/>
190 </zeroOrMore>
191
192 <ref name="def_release-element_extension"/>
193 </element>
194 </define>
195
196
197 <define name="def_track-element">
198 <element name="track">
199 <optional>
200 <attribute name="id">
201 <data type="anyURI"/>
202 </attribute>
203 </optional>
204 <ref name="def_track-attribute_extension"/>
205
206 <optional>
207 <element name="title">
208 <text/>
209 </element>
210 </optional>
211 <optional>
212 <element name="duration">
213 <data type="nonNegativeInteger"/>
214 </element>
215 </optional>
216 <optional>
217 <ref name="def_artist-element"/>
218 </optional>
219
220 <optional>
221 <ref name="def_release-list"/>
222 </optional>
223 <optional>
224 <ref name="def_puid-list"/>
225 </optional>
226 <zeroOrMore>
227 <ref name="def_relation-list"/>
228 </zeroOrMore>
229
230 <ref name="def_track-element_extension"/>
231 </element>
232 </define>
233
234
235 <define name="def_relation-element">
236 <element name="relation">
237 <attribute name="type">
238 <data type="anyURI"/>
239 </attribute>
240 <attribute name="target">
241 <data type="anyURI"/>
242 </attribute>
243 <optional>
244 <attribute name="direction">
245 <ref name="def_direction"/>
246 </attribute>
247 </optional>
248 <optional>
249 <attribute name="attributes">
250 <ref name="def_URI-list"/>
251 </attribute>
252 </optional>
253 <optional>
254 <attribute name="begin">
255 <ref name="def_incomplete-date"/>
256 </attribute>
257 </optional>
258 <optional>
259 <attribute name="end">
260 <ref name="def_incomplete-date"/>
261 </attribute>
262 </optional>
263
264 <optional>
265 <choice>
266 <ref name="def_artist-element"/>
267 <ref name="def_release-element"/>
268 <ref name="def_track-element"/>
269
270 <ref name="def_relation-element_extension"/>
271 </choice>
272 </optional>
273 </element>
274 </define>
275
276
277 <define name="def_alias">
278 <element name="alias">
279 <optional>
280 <attribute name="type">
281 <data type="anyURI"/>
282 </attribute>
283 </optional>
284 <optional>
285 <attribute name="script">
286 <ref name="def_iso-15924"/>
287 </attribute>
288 </optional>
289 <text/>
290 </element>
291 </define>
292
293
294 <!--
295 This part defines the extensions elements and attributes.
296 -->
297
298 <define name="def_metadata-element_extension">
299 <optional>
300 <ref name="def_extension_element"/>
301 </optional>
302 </define>
303
304
305 <define name="def_artist-element_extension">
306 <zeroOrMore>
307 <ref name="def_extension_element"/>
308 </zeroOrMore>
309 </define>
310
311
312 <define name="def_release-element_extension">
313 <zeroOrMore>
314 <ref name="def_extension_element"/>
315 </zeroOrMore>
316 </define>
317
318
319 <define name="def_track-element_extension">
320 <zeroOrMore>
321 <ref name="def_extension_element"/>
322 </zeroOrMore>
323 </define>
324
325
326 <define name="def_relation-element_extension">
327 <ref name="def_extension_element"/>
328 </define>
329
330
331 <define name="def_artist-attribute_extension">
332 <zeroOrMore>
333 <ref name="def_extension_attribute"/>
334 </zeroOrMore>
335 </define>
336
337
338 <define name="def_release-attribute_extension">
339 <zeroOrMore>
340 <ref name="def_extension_attribute"/>
341 </zeroOrMore>
342 </define>
343
344
345 <define name="def_track-attribute_extension">
346 <zeroOrMore>
347 <ref name="def_extension_attribute"/>
348 </zeroOrMore>
349 </define>
350
351
352 <define name="def_extension_element">
353 <element>
354 <anyName>
355 <except>
356 <nsName ns="http://musicbrainz.org/ns/mmd-1.0#"/>
357 <nsName ns=""/>
358 </except>
359 </anyName>
360 <zeroOrMore>
361 <choice>
362 <attribute>
363 <anyName/>
364 </attribute>
365 <text/>
366 <ref name="def_anything"/>
367 </choice>
368 </zeroOrMore>
369 </element>
370 </define>
371
372
373 <define name="def_extension_attribute">
374 <attribute>
375 <anyName>
376 <except>
377 <nsName ns="http://musicbrainz.org/ns/mmd-1.0#"/>
378 <nsName ns=""/>
379 </except>
380 </anyName>
381 </attribute>
382 </define>
383
384
385 <define name="def_anything">
386 <element>
387 <anyName>
388 <except>
389 <nsName ns=""/>
390 </except>
391 </anyName>
392 <zeroOrMore>
393 <choice>
394 <attribute>
395 <anyName/>
396 </attribute>
397 <text/>
398 <ref name="def_anything"/>
399 </choice>
400 </zeroOrMore>
401 </element>
402 </define>
403
404
405 <define name="def_artist-list">
406 <element name="artist-list">
407 <ref name="def_list-attributes"/>
408 <zeroOrMore>
409 <ref name="def_artist-element"/>
410 </zeroOrMore>
411 </element>
412 </define>
413
414
415 <define name="def_release-list">
416 <element name="release-list">
417 <ref name="def_list-attributes"/>
418 <zeroOrMore>
419 <ref name="def_release-element"/>
420 </zeroOrMore>
421 </element>
422 </define>
423
424
425 <define name="def_alias-list">
426 <element name="alias-list">
427 <ref name="def_list-attributes"/>
428 <zeroOrMore>
429 <ref name="def_alias"/>
430 </zeroOrMore>
431 </element>
432 </define>
433
434
435 <define name="def_track-list">
436 <element name="track-list">
437 <ref name="def_list-attributes"/>
438 <zeroOrMore>
439 <ref name="def_track-element"/>
440 </zeroOrMore>
441 </element>
442 </define>
443
444
445 <define name="def_release-event-list">
446 <element name="release-event-list">
447 <ref name="def_list-attributes"/>
448 <zeroOrMore>
449 <element name="event">
450 <attribute name="date">
451 <ref name="def_incomplete-date"/>
452 </attribute>
453 <optional>
454 <attribute name="country">
455 <ref name="def_iso-3166"/>
456 </attribute>
457 </optional>
458 </element>
459 </zeroOrMore>
460 </element>
461 </define>
462
463
464 <define name="def_disc-list">
465 <element name="disc-list">
466 <ref name="def_list-attributes"/>
467 <zeroOrMore>
468 <element name="disc">
469 <attribute name="id">
470 <data type="string">
471 <param name="pattern">[a-zA-Z0-9._]{27}-</param>
472 </data>
473 </attribute>
474 <optional>
475 <attribute name="sectors">
476 <data type="nonNegativeInteger"/>
477 </attribute>
478 </optional>
479 </element>
480 </zeroOrMore>
481 </element>
482 </define>
483
484
485 <define name="def_puid-list">
486 <element name="puid-list">
487 <ref name="def_list-attributes"/>
488 <zeroOrMore>
489 <element name="puid">
490 <attribute name="id">
491 <ref name="def_uuid"/>
492 </attribute>
493 </element>
494 </zeroOrMore>
495 </element>
496 </define>
497
498
499 <define name="def_relation-list">
500 <element name="relation-list">
501 <attribute name="target-type">
502 <data type="anyURI"/>
503 </attribute>
504 <ref name="def_list-attributes"/>
505 <zeroOrMore>
506 <ref name="def_relation-element"/>
507 </zeroOrMore>
508 </element>
509 </define>
510
511
512 <define name="def_list-attributes">
513 <optional>
514 <attribute name="count">
515 <data type="nonNegativeInteger"/>
516 </attribute>
517 </optional>
518 <optional>
519 <attribute name="offset">
520 <data type="nonNegativeInteger"/>
521 </attribute>
522 </optional>
523 </define>
524
525
526 <!-- A space separated list of URIs, relative ones are possible, too. -->
527 <define name="def_URI-list">
528 <list>
529 <oneOrMore>
530 <data type="anyURI"/>
531 </oneOrMore>
532 </list>
533 </define>
534
535
536 <!-- A date with varying precision in format 'YYYY-MM-DD'. -->
537 <define name="def_incomplete-date">
538 <data type="string">
539 <param name="pattern">[0-9]{4}(-[0-9]{2})?(-[0-9]{2})?</param>
540 </data>
541 </define>
542
543
544 <!-- A two-letter country code like 'DE', 'UK', 'FR' etc. -->
545 <define name="def_iso-3166">
546 <data type="string">
547 <param name="pattern">[A-Z]{2}</param>
548 </data>
549 </define>
550
551
552 <!-- An ISO-639-2/T language code like 'DEU', 'ENG', 'JPN' etc. -->
553 <define name="def_iso-639">
554 <data type="string">
555 <param name="pattern">[A-Z]{3}</param>
556 </data>
557 </define>
558
559
560 <!-- A four-letter script code like 'Latn', 'Cyrl', etc. -->
561 <define name="def_iso-15924">
562 <data type="string">
563 <param name="pattern">[A-Z][a-z]{3}</param>
564 </data>
565 </define>
566
567
568 <!-- A 128 Bit UUID in its standard ASCII representation. -->
569 <define name="def_uuid">
570 <data type="string">
571 <param name="pattern">[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}</param>
572 </data>
573 </define>
574
575
576 <!-- Reading direction of a relation. Defaults to "both". -->
577 <define name="def_direction">
578 <choice>
579 <value>both</value>
580 <value>forward</value>
581 <value>backward</value>
582 </choice>
583 </define>
584
585</grammar>
5860
=== removed file 'schema/musicbrainz_mmd-1.0rc1.rng'
--- schema/musicbrainz_mmd-1.0rc1.rng 2012-02-01 17:18:10 +0000
+++ schema/musicbrainz_mmd-1.0rc1.rng 1970-01-01 00:00:00 +0000
@@ -1,478 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!-- ==================================================================
4 $Id: musicbrainz_mmd-1.0rc1.rng 36 2006-01-30 10:23:03Z matt $
5
6 Relax NG Schema for MusicBrainz XML Metadata Version 1.0rc1
7
8
9 This XML schema has been designed to represent music metadata.
10 Documentation and the latest revision can be found at
11
12 http://musicbrainz.org/development/mmd/
13
14
15 Copyright (c) 2006 Robert Kaye, Matthias Friedrich
16
17 The schema is released under the Creative Commons
18 Attribution-ShareAlike 2.5 license.
19
20 http://creativecommons.org/licenses/by-sa/2.5/
21
22 ================================================================== -->
23
24
25<grammar xmlns="http://relaxng.org/ns/structure/1.0"
26 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
27 ns="http://musicbrainz.org/ns/mmd-1.0#">
28
29
30 <start>
31 <ref name="def_metadata"/>
32 </start>
33
34
35 <define name="def_metadata">
36 <element name="metadata">
37 <optional>
38 <attribute name="generator">
39 <data type="anyURI"/>
40 </attribute>
41 </optional>
42 <optional>
43 <attribute name="created">
44 <data type="dateTime"/>
45 </attribute>
46 </optional>
47
48 <optional>
49 <ref name="def_artist"/>
50 </optional>
51 <optional>
52 <ref name="def_release"/>
53 </optional>
54 <optional>
55 <ref name="def_track"/>
56 </optional>
57
58 <optional>
59 <ref name="def_artist-list"/>
60 </optional>
61 <optional>
62 <ref name="def_release-list"/>
63 </optional>
64 <optional>
65 <ref name="def_track-list"/>
66 </optional>
67
68 <optional>
69 <ref name="def_extension"/>
70 </optional>
71 </element>
72 </define>
73
74
75 <define name="def_artist">
76 <element name="artist">
77 <optional>
78 <attribute name="id">
79 <data type="anyURI"/>
80 </attribute>
81 </optional>
82 <optional>
83 <attribute name="type">
84 <data type="anyURI"/>
85 </attribute>
86 </optional>
87
88 <optional>
89 <element name="name">
90 <text/>
91 </element>
92 </optional>
93 <optional>
94 <element name="sort-name">
95 <text/>
96 </element>
97 </optional>
98 <optional>
99 <element name="life-span">
100 <optional>
101 <attribute name="begin">
102 <ref name="def_incomplete-date"/>
103 </attribute>
104 </optional>
105 <optional>
106 <attribute name="end">
107 <ref name="def_incomplete-date"/>
108 </attribute>
109 </optional>
110 </element>
111 </optional>
112
113 <optional>
114 <ref name="def_release-list"/>
115 </optional>
116 <zeroOrMore>
117 <ref name="def_relation-list"/>
118 </zeroOrMore>
119
120 <zeroOrMore>
121 <ref name="def_extension"/>
122 </zeroOrMore>
123 </element>
124 </define>
125
126
127 <define name="def_release">
128 <element name="release">
129 <optional>
130 <attribute name="id">
131 <data type="anyURI"/>
132 </attribute>
133 </optional>
134 <optional>
135 <attribute name="type">
136 <ref name="def_URI-list"/>
137 </attribute>
138 </optional>
139
140 <optional>
141 <element name="title">
142 <text/>
143 </element>
144 </optional>
145 <optional>
146 <element name="text-representation">
147 <optional>
148 <attribute name="language">
149 <ref name="def_iso-639"/>
150 </attribute>
151 </optional>
152 <optional>
153 <attribute name="script">
154 <ref name="def_iso-15924"/>
155 </attribute>
156 </optional>
157 </element>
158 </optional>
159 <optional>
160 <element name="asin">
161 <data type="string">
162 <param name="pattern">[A-Z0-9]{10}</param>
163 </data>
164 </element>
165 </optional>
166 <optional>
167 <ref name="def_artist"/>
168 </optional>
169
170 <optional>
171 <ref name="def_release-info-list"/>
172 </optional>
173 <optional>
174 <ref name="def_disc-list"/>
175 </optional>
176 <optional>
177 <ref name="def_trmid-list"/>
178 </optional>
179 <optional>
180 <ref name="def_track-list"/>
181 </optional>
182 <zeroOrMore>
183 <ref name="def_relation-list"/>
184 </zeroOrMore>
185
186 <zeroOrMore>
187 <ref name="def_extension"/>
188 </zeroOrMore>
189 </element>
190 </define>
191
192
193 <define name="def_track">
194 <element name="track">
195 <optional>
196 <attribute name="id">
197 <data type="anyURI"/>
198 </attribute>
199 </optional>
200
201 <optional>
202 <element name="title">
203 <text/>
204 </element>
205 </optional>
206 <optional>
207 <element name="duration">
208 <data type="nonNegativeInteger"/>
209 </element>
210 </optional>
211 <optional>
212 <ref name="def_artist"/>
213 </optional>
214
215 <optional>
216 <ref name="def_release-list"/>
217 </optional>
218 <optional>
219 <ref name="def_trmid-list"/>
220 </optional>
221 <zeroOrMore>
222 <ref name="def_relation-list"/>
223 </zeroOrMore>
224
225 <zeroOrMore>
226 <ref name="def_extension"/>
227 </zeroOrMore>
228 </element>
229 </define>
230
231
232 <define name="def_relation">
233 <element name="relation">
234 <attribute name="type">
235 <data type="anyURI"/>
236 </attribute>
237 <attribute name="target">
238 <data type="anyURI"/>
239 </attribute>
240 <optional>
241 <attribute name="direction">
242 <ref name="def_direction"/>
243 </attribute>
244 </optional>
245 <optional>
246 <attribute name="attributes">
247 <ref name="def_URI-list"/>
248 </attribute>
249 </optional>
250 <optional>
251 <attribute name="begin">
252 <ref name="def_incomplete-date"/>
253 </attribute>
254 </optional>
255 <optional>
256 <attribute name="end">
257 <ref name="def_incomplete-date"/>
258 </attribute>
259 </optional>
260
261 <optional>
262 <choice>
263 <ref name="def_artist"/>
264 <ref name="def_release"/>
265 <ref name="def_track"/>
266
267 <ref name="def_extension"/>
268 </choice>
269 </optional>
270 </element>
271 </define>
272
273
274 <define name="def_extension">
275 <element>
276 <anyName>
277 <except>
278 <nsName ns="http://musicbrainz.org/ns/mmd-1.0#"/>
279 <nsName ns=""/>
280 </except>
281 </anyName>
282 <zeroOrMore>
283 <choice>
284 <attribute>
285 <anyName/>
286 </attribute>
287 <text/>
288 <ref name="def_anything"/>
289 </choice>
290 </zeroOrMore>
291 </element>
292 </define>
293
294
295 <define name="def_anything">
296 <element>
297 <anyName>
298 <except>
299 <nsName ns=""/>
300 </except>
301 </anyName>
302 <zeroOrMore>
303 <choice>
304 <attribute>
305 <anyName/>
306 </attribute>
307 <text/>
308 <ref name="def_anything"/>
309 </choice>
310 </zeroOrMore>
311 </element>
312 </define>
313
314
315 <define name="def_artist-list">
316 <element name="artist-list">
317 <ref name="def_list-attributes"/>
318 <zeroOrMore>
319 <ref name="def_artist"/>
320 </zeroOrMore>
321 </element>
322 </define>
323
324
325 <define name="def_release-list">
326 <element name="release-list">
327 <ref name="def_list-attributes"/>
328 <zeroOrMore>
329 <ref name="def_release"/>
330 </zeroOrMore>
331 </element>
332 </define>
333
334
335 <define name="def_track-list">
336 <element name="track-list">
337 <ref name="def_list-attributes"/>
338 <zeroOrMore>
339 <ref name="def_track"/>
340 </zeroOrMore>
341 </element>
342 </define>
343
344
345 <define name="def_release-info-list">
346 <element name="release-info-list">
347 <ref name="def_list-attributes"/>
348 <zeroOrMore>
349 <element name="info">
350 <attribute name="date">
351 <ref name="def_incomplete-date"/>
352 </attribute>
353 <attribute name="country">
354 <ref name="def_iso-3166"/>
355 </attribute>
356 </element>
357 </zeroOrMore>
358 </element>
359 </define>
360
361
362 <define name="def_disc-list">
363 <element name="disc-list">
364 <ref name="def_list-attributes"/>
365 <zeroOrMore>
366 <element name="disc">
367 <attribute name="id">
368 <data type="string">
369 <param name="pattern">[a-zA-Z0-9._]{27}-</param>
370 </data>
371 </attribute>
372 </element>
373 </zeroOrMore>
374 </element>
375 </define>
376
377
378 <define name="def_trmid-list">
379 <element name="trmid-list">
380 <ref name="def_list-attributes"/>
381 <zeroOrMore>
382 <element name="trmid">
383 <attribute name="id">
384 <ref name="def_uuid"/>
385 </attribute>
386 </element>
387 </zeroOrMore>
388 </element>
389 </define>
390
391
392 <define name="def_relation-list">
393 <element name="relation-list">
394 <attribute name="target-type">
395 <data type="anyURI"/>
396 </attribute>
397 <ref name="def_list-attributes"/>
398 <zeroOrMore>
399 <ref name="def_relation"/>
400 </zeroOrMore>
401 </element>
402 </define>
403
404
405 <define name="def_list-attributes">
406 <optional>
407 <attribute name="count">
408 <data type="nonNegativeInteger"/>
409 </attribute>
410 </optional>
411 <optional>
412 <attribute name="offset">
413 <data type="nonNegativeInteger"/>
414 </attribute>
415 </optional>
416 </define>
417
418
419 <!-- A space separated list of URIs, relative ones are possible, too. -->
420 <define name="def_URI-list">
421 <list>
422 <oneOrMore>
423 <data type="anyURI"/>
424 </oneOrMore>
425 </list>
426 </define>
427
428
429 <!-- A date with varying precision in format 'YYYY-MM-DD'. -->
430 <define name="def_incomplete-date">
431 <data type="string">
432 <param name="pattern">[0-9]{4}(-[0-9]{2})?(-[0-9]{2})?</param>
433 </data>
434 </define>
435
436
437 <!-- A two-letter country code like 'DE', 'UK', 'FR' etc. -->
438 <define name="def_iso-3166">
439 <data type="string">
440 <param name="pattern">[A-Z]{2}</param>
441 </data>
442 </define>
443
444
445 <!-- A three-letter language code like 'GER', 'GER', etc. -->
446 <define name="def_iso-639">
447 <data type="string">
448 <param name="pattern">[A-Z]{3}</param>
449 </data>
450 </define>
451
452
453 <!-- A four-letter script code like 'Latn', 'Cyrl', etc. -->
454 <define name="def_iso-15924">
455 <data type="string">
456 <param name="pattern">[A-Z][a-z]{3}</param>
457 </data>
458 </define>
459
460
461 <!-- A 128 Bit UUID in its standard ASCII representation. -->
462 <define name="def_uuid">
463 <data type="string">
464 <param name="pattern">[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}</param>
465 </data>
466 </define>
467
468
469 <!-- Reading direction of a relation. Defaults to "both". -->
470 <define name="def_direction">
471 <choice>
472 <value>both</value>
473 <value>forward</value>
474 <value>backward</value>
475 </choice>
476 </define>
477
478</grammar>
4790
=== removed file 'schema/musicbrainz_mmd-1.0rc2.rng'
--- schema/musicbrainz_mmd-1.0rc2.rng 2012-02-01 17:18:10 +0000
+++ schema/musicbrainz_mmd-1.0rc2.rng 1970-01-01 00:00:00 +0000
@@ -1,518 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!-- ==================================================================
4 $Id: musicbrainz_mmd-1.0rc2.rng 71 2006-02-14 18:56:32Z matt $
5
6 Relax NG Schema for MusicBrainz XML Metadata Version 1.0rc2
7
8
9 This XML schema has been designed to represent music metadata.
10 Documentation and the latest revision can be found at
11
12 http://musicbrainz.org/development/mmd/
13
14
15 Copyright (c) 2006 Robert Kaye, Matthias Friedrich
16
17 The schema is released under the Creative Commons
18 Attribution-ShareAlike 2.5 license.
19
20 http://creativecommons.org/licenses/by-sa/2.5/
21
22 ================================================================== -->
23
24
25<grammar xmlns="http://relaxng.org/ns/structure/1.0"
26 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
27 ns="http://musicbrainz.org/ns/mmd-1.0#">
28
29
30 <start>
31 <ref name="def_metadata"/>
32 </start>
33
34
35 <define name="def_metadata">
36 <element name="metadata">
37 <optional>
38 <attribute name="generator">
39 <data type="anyURI"/>
40 </attribute>
41 </optional>
42 <optional>
43 <attribute name="created">
44 <data type="dateTime"/>
45 </attribute>
46 </optional>
47
48 <optional>
49 <ref name="def_artist"/>
50 </optional>
51 <optional>
52 <ref name="def_release"/>
53 </optional>
54 <optional>
55 <ref name="def_track"/>
56 </optional>
57
58 <optional>
59 <ref name="def_artist-list"/>
60 </optional>
61 <optional>
62 <ref name="def_release-list"/>
63 </optional>
64 <optional>
65 <ref name="def_track-list"/>
66 </optional>
67
68 <optional>
69 <ref name="def_extension"/>
70 </optional>
71 </element>
72 </define>
73
74
75 <define name="def_artist">
76 <element name="artist">
77 <optional>
78 <attribute name="id">
79 <data type="anyURI"/>
80 </attribute>
81 </optional>
82 <optional>
83 <attribute name="type">
84 <data type="anyURI"/>
85 </attribute>
86 </optional>
87
88 <optional>
89 <element name="name">
90 <text/>
91 </element>
92 </optional>
93 <optional>
94 <element name="sort-name">
95 <text/>
96 </element>
97 </optional>
98 <optional>
99 <element name="disambiguation">
100 <text/>
101 </element>
102 </optional>
103 <optional>
104 <element name="life-span">
105 <optional>
106 <attribute name="begin">
107 <ref name="def_incomplete-date"/>
108 </attribute>
109 </optional>
110 <optional>
111 <attribute name="end">
112 <ref name="def_incomplete-date"/>
113 </attribute>
114 </optional>
115 </element>
116 </optional>
117
118 <optional>
119 <ref name="def_alias-list"/>
120 </optional>
121 <optional>
122 <ref name="def_release-list"/>
123 </optional>
124 <zeroOrMore>
125 <ref name="def_relation-list"/>
126 </zeroOrMore>
127
128 <zeroOrMore>
129 <ref name="def_extension"/>
130 </zeroOrMore>
131 </element>
132 </define>
133
134
135 <define name="def_release">
136 <element name="release">
137 <optional>
138 <attribute name="id">
139 <data type="anyURI"/>
140 </attribute>
141 </optional>
142 <optional>
143 <attribute name="type">
144 <ref name="def_URI-list"/>
145 </attribute>
146 </optional>
147
148 <optional>
149 <element name="title">
150 <text/>
151 </element>
152 </optional>
153 <optional>
154 <element name="text-representation">
155 <optional>
156 <attribute name="language">
157 <ref name="def_iso-639"/>
158 </attribute>
159 </optional>
160 <optional>
161 <attribute name="script">
162 <ref name="def_iso-15924"/>
163 </attribute>
164 </optional>
165 </element>
166 </optional>
167 <optional>
168 <element name="asin">
169 <data type="string">
170 <param name="pattern">[A-Z0-9]{10}</param>
171 </data>
172 </element>
173 </optional>
174 <optional>
175 <ref name="def_artist"/>
176 </optional>
177
178 <optional>
179 <ref name="def_release-event-list"/>
180 </optional>
181 <optional>
182 <ref name="def_disc-list"/>
183 </optional>
184 <optional>
185 <ref name="def_trmid-list"/>
186 </optional>
187 <optional>
188 <ref name="def_track-list"/>
189 </optional>
190 <zeroOrMore>
191 <ref name="def_relation-list"/>
192 </zeroOrMore>
193
194 <zeroOrMore>
195 <ref name="def_extension"/>
196 </zeroOrMore>
197 </element>
198 </define>
199
200
201 <define name="def_track">
202 <element name="track">
203 <optional>
204 <attribute name="id">
205 <data type="anyURI"/>
206 </attribute>
207 </optional>
208
209 <optional>
210 <element name="title">
211 <text/>
212 </element>
213 </optional>
214 <optional>
215 <element name="duration">
216 <data type="nonNegativeInteger"/>
217 </element>
218 </optional>
219 <optional>
220 <ref name="def_artist"/>
221 </optional>
222
223 <optional>
224 <ref name="def_release-list"/>
225 </optional>
226 <optional>
227 <ref name="def_trmid-list"/>
228 </optional>
229 <zeroOrMore>
230 <ref name="def_relation-list"/>
231 </zeroOrMore>
232
233 <zeroOrMore>
234 <ref name="def_extension"/>
235 </zeroOrMore>
236 </element>
237 </define>
238
239
240 <define name="def_relation">
241 <element name="relation">
242 <attribute name="type">
243 <data type="anyURI"/>
244 </attribute>
245 <attribute name="target">
246 <data type="anyURI"/>
247 </attribute>
248 <optional>
249 <attribute name="direction">
250 <ref name="def_direction"/>
251 </attribute>
252 </optional>
253 <optional>
254 <attribute name="attributes">
255 <ref name="def_URI-list"/>
256 </attribute>
257 </optional>
258 <optional>
259 <attribute name="begin">
260 <ref name="def_incomplete-date"/>
261 </attribute>
262 </optional>
263 <optional>
264 <attribute name="end">
265 <ref name="def_incomplete-date"/>
266 </attribute>
267 </optional>
268
269 <optional>
270 <choice>
271 <ref name="def_artist"/>
272 <ref name="def_release"/>
273 <ref name="def_track"/>
274
275 <ref name="def_extension"/>
276 </choice>
277 </optional>
278 </element>
279 </define>
280
281
282 <define name="def_alias">
283 <element name="alias">
284 <optional>
285 <attribute name="type">
286 <data type="anyURI"/>
287 </attribute>
288 </optional>
289 <optional>
290 <attribute name="script">
291 <ref name="def_iso-15924"/>
292 </attribute>
293 </optional>
294 <text/>
295 </element>
296 </define>
297
298
299 <define name="def_extension">
300 <element>
301 <anyName>
302 <except>
303 <nsName ns="http://musicbrainz.org/ns/mmd-1.0#"/>
304 <nsName ns=""/>
305 </except>
306 </anyName>
307 <zeroOrMore>
308 <choice>
309 <attribute>
310 <anyName/>
311 </attribute>
312 <text/>
313 <ref name="def_anything"/>
314 </choice>
315 </zeroOrMore>
316 </element>
317 </define>
318
319
320 <define name="def_anything">
321 <element>
322 <anyName>
323 <except>
324 <nsName ns=""/>
325 </except>
326 </anyName>
327 <zeroOrMore>
328 <choice>
329 <attribute>
330 <anyName/>
331 </attribute>
332 <text/>
333 <ref name="def_anything"/>
334 </choice>
335 </zeroOrMore>
336 </element>
337 </define>
338
339
340 <define name="def_artist-list">
341 <element name="artist-list">
342 <ref name="def_list-attributes"/>
343 <zeroOrMore>
344 <ref name="def_artist"/>
345 </zeroOrMore>
346 </element>
347 </define>
348
349
350 <define name="def_release-list">
351 <element name="release-list">
352 <ref name="def_list-attributes"/>
353 <zeroOrMore>
354 <ref name="def_release"/>
355 </zeroOrMore>
356 </element>
357 </define>
358
359
360 <define name="def_alias-list">
361 <element name="alias-list">
362 <ref name="def_list-attributes"/>
363 <zeroOrMore>
364 <ref name="def_alias"/>
365 </zeroOrMore>
366 </element>
367 </define>
368
369
370 <define name="def_track-list">
371 <element name="track-list">
372 <ref name="def_list-attributes"/>
373 <zeroOrMore>
374 <ref name="def_track"/>
375 </zeroOrMore>
376 </element>
377 </define>
378
379
380 <define name="def_release-event-list">
381 <element name="release-event-list">
382 <ref name="def_list-attributes"/>
383 <zeroOrMore>
384 <element name="event">
385 <attribute name="date">
386 <ref name="def_incomplete-date"/>
387 </attribute>
388 <attribute name="country">
389 <ref name="def_iso-3166"/>
390 </attribute>
391 </element>
392 </zeroOrMore>
393 </element>
394 </define>
395
396
397 <define name="def_disc-list">
398 <element name="disc-list">
399 <ref name="def_list-attributes"/>
400 <zeroOrMore>
401 <element name="disc">
402 <attribute name="id">
403 <data type="string">
404 <param name="pattern">[a-zA-Z0-9._]{27}-</param>
405 </data>
406 </attribute>
407 <optional>
408 <attribute name="sectors">
409 <data type="nonNegativeInteger"/>
410 </attribute>
411 </optional>
412 </element>
413 </zeroOrMore>
414 </element>
415 </define>
416
417
418 <define name="def_trmid-list">
419 <element name="trmid-list">
420 <ref name="def_list-attributes"/>
421 <zeroOrMore>
422 <element name="trmid">
423 <attribute name="id">
424 <ref name="def_uuid"/>
425 </attribute>
426 </element>
427 </zeroOrMore>
428 </element>
429 </define>
430
431
432 <define name="def_relation-list">
433 <element name="relation-list">
434 <attribute name="target-type">
435 <data type="anyURI"/>
436 </attribute>
437 <ref name="def_list-attributes"/>
438 <zeroOrMore>
439 <ref name="def_relation"/>
440 </zeroOrMore>
441 </element>
442 </define>
443
444
445 <define name="def_list-attributes">
446 <optional>
447 <attribute name="count">
448 <data type="nonNegativeInteger"/>
449 </attribute>
450 </optional>
451 <optional>
452 <attribute name="offset">
453 <data type="nonNegativeInteger"/>
454 </attribute>
455 </optional>
456 </define>
457
458
459 <!-- A space separated list of URIs, relative ones are possible, too. -->
460 <define name="def_URI-list">
461 <list>
462 <oneOrMore>
463 <data type="anyURI"/>
464 </oneOrMore>
465 </list>
466 </define>
467
468
469 <!-- A date with varying precision in format 'YYYY-MM-DD'. -->
470 <define name="def_incomplete-date">
471 <data type="string">
472 <param name="pattern">[0-9]{4}(-[0-9]{2})?(-[0-9]{2})?</param>
473 </data>
474 </define>
475
476
477 <!-- A two-letter country code like 'DE', 'UK', 'FR' etc. -->
478 <define name="def_iso-3166">
479 <data type="string">
480 <param name="pattern">[A-Z]{2}</param>
481 </data>
482 </define>
483
484
485 <!-- An ISO-639-2/T language code like 'DEU', 'ENG', 'JPN' etc. -->
486 <define name="def_iso-639">
487 <data type="string">
488 <param name="pattern">[A-Z]{3}</param>
489 </data>
490 </define>
491
492
493 <!-- A four-letter script code like 'Latn', 'Cyrl', etc. -->
494 <define name="def_iso-15924">
495 <data type="string">
496 <param name="pattern">[A-Z][a-z]{3}</param>
497 </data>
498 </define>
499
500
501 <!-- A 128 Bit UUID in its standard ASCII representation. -->
502 <define name="def_uuid">
503 <data type="string">
504 <param name="pattern">[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}</param>
505 </data>
506 </define>
507
508
509 <!-- Reading direction of a relation. Defaults to "both". -->
510 <define name="def_direction">
511 <choice>
512 <value>both</value>
513 <value>forward</value>
514 <value>backward</value>
515 </choice>
516 </define>
517
518</grammar>
5190
=== removed file 'schema/musicbrainz_mmd-1.0rc3.rng'
--- schema/musicbrainz_mmd-1.0rc3.rng 2012-02-01 17:18:10 +0000
+++ schema/musicbrainz_mmd-1.0rc3.rng 1970-01-01 00:00:00 +0000
@@ -1,518 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!-- ==================================================================
4 $Id: musicbrainz_mmd-1.0rc3.rng 167 2006-03-14 18:59:45Z matt $
5
6 Relax NG Schema for MusicBrainz XML Metadata Version 1.0rc3
7
8
9 This XML schema has been designed to represent music metadata.
10 Documentation and the latest revision can be found at
11
12 http://musicbrainz.org/development/mmd/
13
14
15 Copyright (c) 2006 Robert Kaye, Matthias Friedrich
16
17 The schema is released under the Creative Commons
18 Attribution-ShareAlike 2.5 license.
19
20 http://creativecommons.org/licenses/by-sa/2.5/
21
22 ================================================================== -->
23
24
25<grammar xmlns="http://relaxng.org/ns/structure/1.0"
26 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
27 ns="http://musicbrainz.org/ns/mmd-1.0#">
28
29
30 <start>
31 <ref name="def_metadata"/>
32 </start>
33
34
35 <define name="def_metadata">
36 <element name="metadata">
37 <optional>
38 <attribute name="generator">
39 <data type="anyURI"/>
40 </attribute>
41 </optional>
42 <optional>
43 <attribute name="created">
44 <data type="dateTime"/>
45 </attribute>
46 </optional>
47
48 <optional>
49 <ref name="def_artist"/>
50 </optional>
51 <optional>
52 <ref name="def_release"/>
53 </optional>
54 <optional>
55 <ref name="def_track"/>
56 </optional>
57
58 <optional>
59 <ref name="def_artist-list"/>
60 </optional>
61 <optional>
62 <ref name="def_release-list"/>
63 </optional>
64 <optional>
65 <ref name="def_track-list"/>
66 </optional>
67
68 <optional>
69 <ref name="def_extension"/>
70 </optional>
71 </element>
72 </define>
73
74
75 <define name="def_artist">
76 <element name="artist">
77 <optional>
78 <attribute name="id">
79 <data type="anyURI"/>
80 </attribute>
81 </optional>
82 <optional>
83 <attribute name="type">
84 <data type="anyURI"/>
85 </attribute>
86 </optional>
87
88 <optional>
89 <element name="name">
90 <text/>
91 </element>
92 </optional>
93 <optional>
94 <element name="sort-name">
95 <text/>
96 </element>
97 </optional>
98 <optional>
99 <element name="disambiguation">
100 <text/>
101 </element>
102 </optional>
103 <optional>
104 <element name="life-span">
105 <optional>
106 <attribute name="begin">
107 <ref name="def_incomplete-date"/>
108 </attribute>
109 </optional>
110 <optional>
111 <attribute name="end">
112 <ref name="def_incomplete-date"/>
113 </attribute>
114 </optional>
115 </element>
116 </optional>
117
118 <optional>
119 <ref name="def_alias-list"/>
120 </optional>
121 <optional>
122 <ref name="def_release-list"/>
123 </optional>
124 <zeroOrMore>
125 <ref name="def_relation-list"/>
126 </zeroOrMore>
127
128 <zeroOrMore>
129 <ref name="def_extension"/>
130 </zeroOrMore>
131 </element>
132 </define>
133
134
135 <define name="def_release">
136 <element name="release">
137 <optional>
138 <attribute name="id">
139 <data type="anyURI"/>
140 </attribute>
141 </optional>
142 <optional>
143 <attribute name="type">
144 <ref name="def_URI-list"/>
145 </attribute>
146 </optional>
147
148 <optional>
149 <element name="title">
150 <text/>
151 </element>
152 </optional>
153 <optional>
154 <element name="text-representation">
155 <optional>
156 <attribute name="language">
157 <ref name="def_iso-639"/>
158 </attribute>
159 </optional>
160 <optional>
161 <attribute name="script">
162 <ref name="def_iso-15924"/>
163 </attribute>
164 </optional>
165 </element>
166 </optional>
167 <optional>
168 <element name="asin">
169 <data type="string">
170 <param name="pattern">[A-Z0-9]{10}</param>
171 </data>
172 </element>
173 </optional>
174 <optional>
175 <ref name="def_artist"/>
176 </optional>
177
178 <optional>
179 <ref name="def_release-event-list"/>
180 </optional>
181 <optional>
182 <ref name="def_disc-list"/>
183 </optional>
184 <optional>
185 <ref name="def_puid-list"/>
186 </optional>
187 <optional>
188 <ref name="def_track-list"/>
189 </optional>
190 <zeroOrMore>
191 <ref name="def_relation-list"/>
192 </zeroOrMore>
193
194 <zeroOrMore>
195 <ref name="def_extension"/>
196 </zeroOrMore>
197 </element>
198 </define>
199
200
201 <define name="def_track">
202 <element name="track">
203 <optional>
204 <attribute name="id">
205 <data type="anyURI"/>
206 </attribute>
207 </optional>
208
209 <optional>
210 <element name="title">
211 <text/>
212 </element>
213 </optional>
214 <optional>
215 <element name="duration">
216 <data type="nonNegativeInteger"/>
217 </element>
218 </optional>
219 <optional>
220 <ref name="def_artist"/>
221 </optional>
222
223 <optional>
224 <ref name="def_release-list"/>
225 </optional>
226 <optional>
227 <ref name="def_puid-list"/>
228 </optional>
229 <zeroOrMore>
230 <ref name="def_relation-list"/>
231 </zeroOrMore>
232
233 <zeroOrMore>
234 <ref name="def_extension"/>
235 </zeroOrMore>
236 </element>
237 </define>
238
239
240 <define name="def_relation">
241 <element name="relation">
242 <attribute name="type">
243 <data type="anyURI"/>
244 </attribute>
245 <attribute name="target">
246 <data type="anyURI"/>
247 </attribute>
248 <optional>
249 <attribute name="direction">
250 <ref name="def_direction"/>
251 </attribute>
252 </optional>
253 <optional>
254 <attribute name="attributes">
255 <ref name="def_URI-list"/>
256 </attribute>
257 </optional>
258 <optional>
259 <attribute name="begin">
260 <ref name="def_incomplete-date"/>
261 </attribute>
262 </optional>
263 <optional>
264 <attribute name="end">
265 <ref name="def_incomplete-date"/>
266 </attribute>
267 </optional>
268
269 <optional>
270 <choice>
271 <ref name="def_artist"/>
272 <ref name="def_release"/>
273 <ref name="def_track"/>
274
275 <ref name="def_extension"/>
276 </choice>
277 </optional>
278 </element>
279 </define>
280
281
282 <define name="def_alias">
283 <element name="alias">
284 <optional>
285 <attribute name="type">
286 <data type="anyURI"/>
287 </attribute>
288 </optional>
289 <optional>
290 <attribute name="script">
291 <ref name="def_iso-15924"/>
292 </attribute>
293 </optional>
294 <text/>
295 </element>
296 </define>
297
298
299 <define name="def_extension">
300 <element>
301 <anyName>
302 <except>
303 <nsName ns="http://musicbrainz.org/ns/mmd-1.0#"/>
304 <nsName ns=""/>
305 </except>
306 </anyName>
307 <zeroOrMore>
308 <choice>
309 <attribute>
310 <anyName/>
311 </attribute>
312 <text/>
313 <ref name="def_anything"/>
314 </choice>
315 </zeroOrMore>
316 </element>
317 </define>
318
319
320 <define name="def_anything">
321 <element>
322 <anyName>
323 <except>
324 <nsName ns=""/>
325 </except>
326 </anyName>
327 <zeroOrMore>
328 <choice>
329 <attribute>
330 <anyName/>
331 </attribute>
332 <text/>
333 <ref name="def_anything"/>
334 </choice>
335 </zeroOrMore>
336 </element>
337 </define>
338
339
340 <define name="def_artist-list">
341 <element name="artist-list">
342 <ref name="def_list-attributes"/>
343 <zeroOrMore>
344 <ref name="def_artist"/>
345 </zeroOrMore>
346 </element>
347 </define>
348
349
350 <define name="def_release-list">
351 <element name="release-list">
352 <ref name="def_list-attributes"/>
353 <zeroOrMore>
354 <ref name="def_release"/>
355 </zeroOrMore>
356 </element>
357 </define>
358
359
360 <define name="def_alias-list">
361 <element name="alias-list">
362 <ref name="def_list-attributes"/>
363 <zeroOrMore>
364 <ref name="def_alias"/>
365 </zeroOrMore>
366 </element>
367 </define>
368
369
370 <define name="def_track-list">
371 <element name="track-list">
372 <ref name="def_list-attributes"/>
373 <zeroOrMore>
374 <ref name="def_track"/>
375 </zeroOrMore>
376 </element>
377 </define>
378
379
380 <define name="def_release-event-list">
381 <element name="release-event-list">
382 <ref name="def_list-attributes"/>
383 <zeroOrMore>
384 <element name="event">
385 <attribute name="date">
386 <ref name="def_incomplete-date"/>
387 </attribute>
388 <attribute name="country">
389 <ref name="def_iso-3166"/>
390 </attribute>
391 </element>
392 </zeroOrMore>
393 </element>
394 </define>
395
396
397 <define name="def_disc-list">
398 <element name="disc-list">
399 <ref name="def_list-attributes"/>
400 <zeroOrMore>
401 <element name="disc">
402 <attribute name="id">
403 <data type="string">
404 <param name="pattern">[a-zA-Z0-9._]{27}-</param>
405 </data>
406 </attribute>
407 <optional>
408 <attribute name="sectors">
409 <data type="nonNegativeInteger"/>
410 </attribute>
411 </optional>
412 </element>
413 </zeroOrMore>
414 </element>
415 </define>
416
417
418 <define name="def_puid-list">
419 <element name="puid-list">
420 <ref name="def_list-attributes"/>
421 <zeroOrMore>
422 <element name="puid">
423 <attribute name="id">
424 <ref name="def_uuid"/>
425 </attribute>
426 </element>
427 </zeroOrMore>
428 </element>
429 </define>
430
431
432 <define name="def_relation-list">
433 <element name="relation-list">
434 <attribute name="target-type">
435 <data type="anyURI"/>
436 </attribute>
437 <ref name="def_list-attributes"/>
438 <zeroOrMore>
439 <ref name="def_relation"/>
440 </zeroOrMore>
441 </element>
442 </define>
443
444
445 <define name="def_list-attributes">
446 <optional>
447 <attribute name="count">
448 <data type="nonNegativeInteger"/>
449 </attribute>
450 </optional>
451 <optional>
452 <attribute name="offset">
453 <data type="nonNegativeInteger"/>
454 </attribute>
455 </optional>
456 </define>
457
458
459 <!-- A space separated list of URIs, relative ones are possible, too. -->
460 <define name="def_URI-list">
461 <list>
462 <oneOrMore>
463 <data type="anyURI"/>
464 </oneOrMore>
465 </list>
466 </define>
467
468
469 <!-- A date with varying precision in format 'YYYY-MM-DD'. -->
470 <define name="def_incomplete-date">
471 <data type="string">
472 <param name="pattern">[0-9]{4}(-[0-9]{2})?(-[0-9]{2})?</param>
473 </data>
474 </define>
475
476
477 <!-- A two-letter country code like 'DE', 'UK', 'FR' etc. -->
478 <define name="def_iso-3166">
479 <data type="string">
480 <param name="pattern">[A-Z]{2}</param>
481 </data>
482 </define>
483
484
485 <!-- An ISO-639-2/T language code like 'DEU', 'ENG', 'JPN' etc. -->
486 <define name="def_iso-639">
487 <data type="string">
488 <param name="pattern">[A-Z]{3}</param>
489 </data>
490 </define>
491
492
493 <!-- A four-letter script code like 'Latn', 'Cyrl', etc. -->
494 <define name="def_iso-15924">
495 <data type="string">
496 <param name="pattern">[A-Z][a-z]{3}</param>
497 </data>
498 </define>
499
500
501 <!-- A 128 Bit UUID in its standard ASCII representation. -->
502 <define name="def_uuid">
503 <data type="string">
504 <param name="pattern">[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}</param>
505 </data>
506 </define>
507
508
509 <!-- Reading direction of a relation. Defaults to "both". -->
510 <define name="def_direction">
511 <choice>
512 <value>both</value>
513 <value>forward</value>
514 <value>backward</value>
515 </choice>
516 </define>
517
518</grammar>
5190
=== removed file 'schema/musicbrainz_mmd-1.0rc4.rng'
--- schema/musicbrainz_mmd-1.0rc4.rng 2012-02-01 17:18:10 +0000
+++ schema/musicbrainz_mmd-1.0rc4.rng 1970-01-01 00:00:00 +0000
@@ -1,539 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!-- ==================================================================
4 $Id: musicbrainz_mmd-1.0rc4.rng 188 2006-03-22 16:54:20Z matt $
5
6 Relax NG Schema for MusicBrainz XML Metadata Version 1.0rc4
7
8
9 This XML schema has been designed to represent music metadata.
10 Documentation and the latest revision can be found at
11
12 http://musicbrainz.org/development/mmd/
13
14
15 Copyright (c) 2006 Robert Kaye, Matthias Friedrich
16
17 The schema is released under the Creative Commons
18 Attribution-ShareAlike 2.5 license.
19
20 http://creativecommons.org/licenses/by-sa/2.5/
21
22 ================================================================== -->
23
24
25<grammar xmlns="http://relaxng.org/ns/structure/1.0"
26 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
27 ns="http://musicbrainz.org/ns/mmd-1.0#">
28
29
30 <start>
31 <ref name="def_metadata"/>
32 </start>
33
34
35 <define name="def_metadata">
36 <element name="metadata">
37 <optional>
38 <attribute name="generator">
39 <data type="anyURI"/>
40 </attribute>
41 </optional>
42 <optional>
43 <attribute name="created">
44 <data type="dateTime"/>
45 </attribute>
46 </optional>
47
48 <optional>
49 <ref name="def_artist"/>
50 </optional>
51 <optional>
52 <ref name="def_release"/>
53 </optional>
54 <optional>
55 <ref name="def_track"/>
56 </optional>
57
58 <optional>
59 <ref name="def_artist-list"/>
60 </optional>
61 <optional>
62 <ref name="def_release-list"/>
63 </optional>
64 <optional>
65 <ref name="def_track-list"/>
66 </optional>
67
68 <optional>
69 <ref name="def_extension"/>
70 </optional>
71 </element>
72 </define>
73
74
75 <define name="def_artist">
76 <element name="artist">
77 <optional>
78 <attribute name="id">
79 <data type="anyURI"/>
80 </attribute>
81 </optional>
82 <optional>
83 <attribute name="type">
84 <data type="anyURI"/>
85 </attribute>
86 </optional>
87 <zeroOrMore>
88 <ref name="def_any_attribute"/>
89 </zeroOrMore>
90
91 <optional>
92 <element name="name">
93 <text/>
94 </element>
95 </optional>
96 <optional>
97 <element name="sort-name">
98 <text/>
99 </element>
100 </optional>
101 <optional>
102 <element name="disambiguation">
103 <text/>
104 </element>
105 </optional>
106 <optional>
107 <element name="life-span">
108 <optional>
109 <attribute name="begin">
110 <ref name="def_incomplete-date"/>
111 </attribute>
112 </optional>
113 <optional>
114 <attribute name="end">
115 <ref name="def_incomplete-date"/>
116 </attribute>
117 </optional>
118 </element>
119 </optional>
120
121 <optional>
122 <ref name="def_alias-list"/>
123 </optional>
124 <optional>
125 <ref name="def_release-list"/>
126 </optional>
127 <zeroOrMore>
128 <ref name="def_relation-list"/>
129 </zeroOrMore>
130
131 <zeroOrMore>
132 <ref name="def_extension"/>
133 </zeroOrMore>
134 </element>
135 </define>
136
137
138 <define name="def_release">
139 <element name="release">
140 <optional>
141 <attribute name="id">
142 <data type="anyURI"/>
143 </attribute>
144 </optional>
145 <optional>
146 <attribute name="type">
147 <ref name="def_URI-list"/>
148 </attribute>
149 </optional>
150 <zeroOrMore>
151 <ref name="def_any_attribute"/>
152 </zeroOrMore>
153
154 <optional>
155 <element name="title">
156 <text/>
157 </element>
158 </optional>
159 <optional>
160 <element name="text-representation">
161 <optional>
162 <attribute name="language">
163 <ref name="def_iso-639"/>
164 </attribute>
165 </optional>
166 <optional>
167 <attribute name="script">
168 <ref name="def_iso-15924"/>
169 </attribute>
170 </optional>
171 </element>
172 </optional>
173 <optional>
174 <element name="asin">
175 <data type="string">
176 <param name="pattern">[A-Z0-9]{10}</param>
177 </data>
178 </element>
179 </optional>
180 <optional>
181 <ref name="def_artist"/>
182 </optional>
183
184 <optional>
185 <ref name="def_release-event-list"/>
186 </optional>
187 <optional>
188 <ref name="def_disc-list"/>
189 </optional>
190 <optional>
191 <ref name="def_puid-list"/>
192 </optional>
193 <optional>
194 <ref name="def_track-list"/>
195 </optional>
196 <zeroOrMore>
197 <ref name="def_relation-list"/>
198 </zeroOrMore>
199
200 <zeroOrMore>
201 <ref name="def_extension"/>
202 </zeroOrMore>
203 </element>
204 </define>
205
206
207 <define name="def_track">
208 <element name="track">
209 <optional>
210 <attribute name="id">
211 <data type="anyURI"/>
212 </attribute>
213 </optional>
214 <zeroOrMore>
215 <ref name="def_any_attribute"/>
216 </zeroOrMore>
217 <optional>
218 <element name="title">
219 <text/>
220 </element>
221 </optional>
222 <optional>
223 <element name="duration">
224 <data type="nonNegativeInteger"/>
225 </element>
226 </optional>
227 <optional>
228 <ref name="def_artist"/>
229 </optional>
230
231 <optional>
232 <ref name="def_release-list"/>
233 </optional>
234 <optional>
235 <ref name="def_puid-list"/>
236 </optional>
237 <zeroOrMore>
238 <ref name="def_relation-list"/>
239 </zeroOrMore>
240
241 <zeroOrMore>
242 <ref name="def_extension"/>
243 </zeroOrMore>
244 </element>
245 </define>
246
247
248 <define name="def_relation">
249 <element name="relation">
250 <attribute name="type">
251 <data type="anyURI"/>
252 </attribute>
253 <attribute name="target">
254 <data type="anyURI"/>
255 </attribute>
256 <optional>
257 <attribute name="direction">
258 <ref name="def_direction"/>
259 </attribute>
260 </optional>
261 <optional>
262 <attribute name="attributes">
263 <ref name="def_URI-list"/>
264 </attribute>
265 </optional>
266 <optional>
267 <attribute name="begin">
268 <ref name="def_incomplete-date"/>
269 </attribute>
270 </optional>
271 <optional>
272 <attribute name="end">
273 <ref name="def_incomplete-date"/>
274 </attribute>
275 </optional>
276
277 <optional>
278 <choice>
279 <ref name="def_artist"/>
280 <ref name="def_release"/>
281 <ref name="def_track"/>
282
283 <ref name="def_extension"/>
284 </choice>
285 </optional>
286 </element>
287 </define>
288
289
290 <define name="def_alias">
291 <element name="alias">
292 <optional>
293 <attribute name="type">
294 <data type="anyURI"/>
295 </attribute>
296 </optional>
297 <optional>
298 <attribute name="script">
299 <ref name="def_iso-15924"/>
300 </attribute>
301 </optional>
302 <text/>
303 </element>
304 </define>
305
306
307 <define name="def_extension">
308 <element>
309 <anyName>
310 <except>
311 <nsName ns="http://musicbrainz.org/ns/mmd-1.0#"/>
312 <nsName ns=""/>
313 </except>
314 </anyName>
315 <zeroOrMore>
316 <choice>
317 <attribute>
318 <anyName/>
319 </attribute>
320 <text/>
321 <ref name="def_anything"/>
322 </choice>
323 </zeroOrMore>
324 </element>
325 </define>
326
327
328 <define name="def_anything">
329 <element>
330 <anyName>
331 <except>
332 <nsName ns=""/>
333 </except>
334 </anyName>
335 <zeroOrMore>
336 <choice>
337 <attribute>
338 <anyName/>
339 </attribute>
340 <text/>
341 <ref name="def_anything"/>
342 </choice>
343 </zeroOrMore>
344 </element>
345 </define>
346
347
348 <define name="def_any_attribute">
349 <attribute>
350 <anyName>
351 <except>
352 <nsName ns=""/>
353 </except>
354 </anyName>
355 </attribute>
356 </define>
357
358
359 <define name="def_artist-list">
360 <element name="artist-list">
361 <ref name="def_list-attributes"/>
362 <zeroOrMore>
363 <ref name="def_artist"/>
364 </zeroOrMore>
365 </element>
366 </define>
367
368
369 <define name="def_release-list">
370 <element name="release-list">
371 <ref name="def_list-attributes"/>
372 <zeroOrMore>
373 <ref name="def_release"/>
374 </zeroOrMore>
375 </element>
376 </define>
377
378
379 <define name="def_alias-list">
380 <element name="alias-list">
381 <ref name="def_list-attributes"/>
382 <zeroOrMore>
383 <ref name="def_alias"/>
384 </zeroOrMore>
385 </element>
386 </define>
387
388
389 <define name="def_track-list">
390 <element name="track-list">
391 <ref name="def_list-attributes"/>
392 <zeroOrMore>
393 <ref name="def_track"/>
394 </zeroOrMore>
395 </element>
396 </define>
397
398
399 <define name="def_release-event-list">
400 <element name="release-event-list">
401 <ref name="def_list-attributes"/>
402 <zeroOrMore>
403 <element name="event">
404 <attribute name="date">
405 <ref name="def_incomplete-date"/>
406 </attribute>
407 <optional>
408 <attribute name="country">
409 <ref name="def_iso-3166"/>
410 </attribute>
411 </optional>
412 </element>
413 </zeroOrMore>
414 </element>
415 </define>
416
417
418 <define name="def_disc-list">
419 <element name="disc-list">
420 <ref name="def_list-attributes"/>
421 <zeroOrMore>
422 <element name="disc">
423 <attribute name="id">
424 <data type="string">
425 <param name="pattern">[a-zA-Z0-9._]{27}-</param>
426 </data>
427 </attribute>
428 <optional>
429 <attribute name="sectors">
430 <data type="nonNegativeInteger"/>
431 </attribute>
432 </optional>
433 </element>
434 </zeroOrMore>
435 </element>
436 </define>
437
438
439 <define name="def_puid-list">
440 <element name="puid-list">
441 <ref name="def_list-attributes"/>
442 <zeroOrMore>
443 <element name="puid">
444 <attribute name="id">
445 <ref name="def_uuid"/>
446 </attribute>
447 </element>
448 </zeroOrMore>
449 </element>
450 </define>
451
452
453 <define name="def_relation-list">
454 <element name="relation-list">
455 <attribute name="target-type">
456 <data type="anyURI"/>
457 </attribute>
458 <ref name="def_list-attributes"/>
459 <zeroOrMore>
460 <ref name="def_relation"/>
461 </zeroOrMore>
462 </element>
463 </define>
464
465
466 <define name="def_list-attributes">
467 <optional>
468 <attribute name="count">
469 <data type="nonNegativeInteger"/>
470 </attribute>
471 </optional>
472 <optional>
473 <attribute name="offset">
474 <data type="nonNegativeInteger"/>
475 </attribute>
476 </optional>
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: