Skip to content

Commit 35ad779

Browse files
Merge pull request #36 from EatSleepProgramRepeat/20-make-an-musicbrainzartist-class
20-make-an-musicbrainzartist-class
2 parents b9a2829 + 8f20943 commit 35ad779

3 files changed

Lines changed: 321 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* CDPrintable: A program that prints labels with track listings for your CD cases.
3+
* Copyright (C) 2025 Alexander McLean
4+
*
5+
* This source code is licensed under the GNU General Public License v3.0
6+
* found in the LICENSE file in the root directory of this source tree.
7+
*
8+
* This is an enum to represent genders.
9+
*/
10+
11+
package com.CDPrintable.MusicBrainzResources;
12+
13+
public enum Gender {
14+
MALE,
15+
FEMALE,
16+
NON_BINARY,
17+
OTHER,
18+
UNKNOWN
19+
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
/*
2+
* CDPrintable: A program that prints labels with track listings for your CD cases.
3+
* Copyright (C) 2025 Alexander McLean
4+
*
5+
* This source code is licensed under the GNU General Public License v3.0
6+
* found in the LICENSE file in the root directory of this source tree.
7+
*
8+
* This is a class that stores info about an artist from the MusicBrainz API.
9+
*/
10+
11+
package com.CDPrintable.MusicBrainzResources;
12+
13+
public class MusicBrainzArtist {
14+
private String name;
15+
private String dateOrganized;
16+
private String id;
17+
private String sortName;
18+
private Gender gender;
19+
private String type; // Band, Person, etc.
20+
private String disambiguation;
21+
private String lifeSpan;
22+
23+
public MusicBrainzArtist(String name, String dateOrganized, String id, String sortName, Gender gender, String type, String disambiguation, String lifeSpan) {
24+
this.name = name;
25+
this.dateOrganized = dateOrganized;
26+
this.id = id;
27+
this.sortName = sortName;
28+
this.gender = gender;
29+
this.type = type;
30+
this.disambiguation = disambiguation;
31+
this.lifeSpan = lifeSpan;
32+
}
33+
34+
public MusicBrainzArtist() {
35+
this.name = "";
36+
this.dateOrganized = "";
37+
this.id = "";
38+
this.sortName = "";
39+
this.gender = Gender.UNKNOWN;
40+
this.type = "";
41+
this.disambiguation = "";
42+
this.lifeSpan = "";
43+
}
44+
45+
public String getName() {
46+
return name;
47+
}
48+
49+
public void setName(String name) {
50+
this.name = name;
51+
}
52+
53+
public String getDateOrganized() {
54+
return dateOrganized;
55+
}
56+
57+
public void setDateOrganized(String dateOrganized) {
58+
this.dateOrganized = dateOrganized;
59+
}
60+
61+
public String getId() {
62+
return id;
63+
}
64+
65+
public void setId(String id) {
66+
this.id = id;
67+
}
68+
69+
public String getSortName() {
70+
return sortName;
71+
}
72+
73+
public void setSortName(String sortName) {
74+
this.sortName = sortName;
75+
}
76+
77+
public Gender getGender() {
78+
return gender;
79+
}
80+
81+
public void setGender(Gender gender) {
82+
this.gender = gender;
83+
}
84+
85+
public String getType() {
86+
return type;
87+
}
88+
89+
public void setType(String type) {
90+
this.type = type;
91+
}
92+
93+
public String getDisambiguation() {
94+
return disambiguation;
95+
}
96+
97+
public void setDisambiguation(String disambiguation) {
98+
this.disambiguation = disambiguation;
99+
}
100+
101+
public String getLifeSpan() {
102+
return lifeSpan;
103+
}
104+
105+
public void setLifeSpan(String lifeSpan) {
106+
this.lifeSpan = lifeSpan;
107+
}
108+
}
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
{
2+
"created": "2025-04-13T18:39:18.390Z",
3+
"count": 25918,
4+
"offset": 0,
5+
"artists": [
6+
{
7+
"id": "7c7f9c94-dee8-4903-892b-6cf44652e2de",
8+
"type": "Group",
9+
"type-id": "e431f5f6-b5d2-343d-8b36-72607fffb74b",
10+
"score": 100,
11+
"name": "Tears for Fears",
12+
"sort-name": "Tears for Fears",
13+
"country": "GB",
14+
"area": {
15+
"id": "8a754a16-0027-3a29-b6d7-2b40ea0481ed",
16+
"type": "Country",
17+
"type-id": "06dd0ae4-8c74-30bb-b43d-95dcedf961de",
18+
"name": "United Kingdom",
19+
"sort-name": "United Kingdom",
20+
"life-span": {
21+
"ended": null
22+
}
23+
},
24+
"begin-area": {
25+
"id": "f51a1724-464b-41ae-b96e-30f868973077",
26+
"type": "City",
27+
"type-id": "6fd8f29a-3d0a-32fc-980d-ea697b69da78",
28+
"name": "Bath",
29+
"sort-name": "Bath",
30+
"life-span": {
31+
"ended": null
32+
}
33+
},
34+
"isnis": [
35+
"0000000121834678"
36+
],
37+
"life-span": {
38+
"begin": "1981",
39+
"ended": null
40+
},
41+
"aliases": [
42+
{
43+
"sort-name": "Tears For Fear",
44+
"name": "Tears For Fear",
45+
"locale": null,
46+
"type": null,
47+
"primary": null,
48+
"begin-date": null,
49+
"end-date": null
50+
}
51+
],
52+
"tags": [
53+
{
54+
"count": 1,
55+
"name": "synthpop"
56+
},
57+
{
58+
"count": 0,
59+
"name": "british"
60+
},
61+
{
62+
"count": 8,
63+
"name": "new wave"
64+
},
65+
{
66+
"count": 0,
67+
"name": "uk"
68+
},
69+
{
70+
"count": 1,
71+
"name": "synth-pop"
72+
},
73+
{
74+
"count": 0,
75+
"name": "britpop"
76+
},
77+
{
78+
"count": 1,
79+
"name": "psychedelic pop"
80+
},
81+
{
82+
"count": 6,
83+
"name": "pop rock"
84+
},
85+
{
86+
"count": 0,
87+
"name": "english"
88+
},
89+
{
90+
"count": 0,
91+
"name": "classic pop and rock"
92+
},
93+
{
94+
"count": 1,
95+
"name": "sophisti-pop"
96+
},
97+
{
98+
"count": 4,
99+
"name": "art pop"
100+
}
101+
]
102+
},
103+
{
104+
"id": "80609a00-b394-4a49-975b-2db6b543fa97",
105+
"type": "Person",
106+
"type-id": "b6e035f4-3ce9-331c-97df-83397230b0df",
107+
"score": 100,
108+
"gender-id": "36d3d30a-839d-3eda-8cb3-29be4384e4a9",
109+
"name": "The Kid LAROI",
110+
"sort-name": "Kid Laroi, The",
111+
"gender": "male",
112+
"country": "AU",
113+
"area": {
114+
"id": "106e0bec-b638-3b37-b731-f53d507dc00e",
115+
"type": "Country",
116+
"type-id": "06dd0ae4-8c74-30bb-b43d-95dcedf961de",
117+
"name": "Australia",
118+
"sort-name": "Australia",
119+
"life-span": {
120+
"ended": null
121+
}
122+
},
123+
"begin-area": {
124+
"id": "767a2324-3a11-4d8d-82c8-5b0cb9c5ca84",
125+
"type": "District",
126+
"type-id": "84039871-5e47-38ca-a66a-45e512c8290f",
127+
"name": "Waterloo",
128+
"sort-name": "Waterloo",
129+
"life-span": {
130+
"ended": null
131+
}
132+
},
133+
"disambiguation": "rapper/singer",
134+
"life-span": {
135+
"begin": "2003-08-16",
136+
"ended": null
137+
},
138+
"aliases": [
139+
{
140+
"sort-name": "더 키드 라로이",
141+
"type-id": "894afba6-2816-3c24-8072-eadb66bd04bc",
142+
"name": "The Kid LAROI",
143+
"locale": "ko_KR",
144+
"type": "Artist name",
145+
"primary": null,
146+
"begin-date": null,
147+
"end-date": null
148+
},
149+
{
150+
"sort-name": "Howard, Charlton Kenneth Jeffrey",
151+
"type-id": "d4dcd0c0-b341-3612-a332-c0ce797b25cf",
152+
"name": "Charlton Kenneth Jeffrey Howard",
153+
"locale": null,
154+
"type": "Legal name",
155+
"primary": null,
156+
"begin-date": null,
157+
"end-date": null
158+
},
159+
{
160+
"sort-name": "Howard, Charlton",
161+
"type-id": "894afba6-2816-3c24-8072-eadb66bd04bc",
162+
"name": "Charlton Howard",
163+
"locale": null,
164+
"type": "Artist name",
165+
"primary": null,
166+
"begin-date": null,
167+
"end-date": null
168+
}
169+
],
170+
"tags": [
171+
{
172+
"count": 4,
173+
"name": "hip hop"
174+
},
175+
{
176+
"count": 1,
177+
"name": "pop rap"
178+
},
179+
{
180+
"count": 2,
181+
"name": "emo rap"
182+
},
183+
{
184+
"count": 1,
185+
"name": "rap"
186+
},
187+
{
188+
"count": 1,
189+
"name": "english"
190+
}
191+
]
192+
}
193+
]
194+
}

0 commit comments

Comments
 (0)