use of org.musicbrainz.android.api.data.ReleaseArtist in project musicbrainz-android by jdamcd.
the class RecordingLookupTest method tstRecordingArtist.
@Test
public void tstRecordingArtist() {
ReleaseArtist artist = recording.getArtists().get(0);
assertEquals("b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d", artist.getMbid());
assertEquals("The Beatles", artist.getName());
}
use of org.musicbrainz.android.api.data.ReleaseArtist in project musicbrainz-android by jdamcd.
the class RecordingSearchTest method testSearchResult.
@Test
public void testSearchResult() {
RecordingInfo searchResult = recordings.get(2);
assertEquals("1003744a-48eb-4839-bac6-a43a2b09d09b", searchResult.getMbid());
assertEquals("Pleaser", searchResult.getTitle());
ReleaseArtist artist = searchResult.getArtist();
assertEquals("a459df95-6a50-4b22-8df8-076642ce62a7", artist.getMbid());
assertEquals("Lemuria", artist.getName());
assertEquals(236000, searchResult.getLength());
}
use of org.musicbrainz.android.api.data.ReleaseArtist in project musicbrainz-android by jdamcd.
the class RecordingLookupHandler method startElement.
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
if (localName.equals("recording")) {
recording.setMbid(atts.getValue("id"));
} else if (localName.equals("title")) {
buildString();
} else if (localName.equals("length")) {
buildString();
} else if (localName.equals("artist")) {
inArtist = true;
artist = new ReleaseArtist();
artist.setMbid(atts.getValue("id"));
} else if (localName.equals("name")) {
buildString();
} else if (localName.equals("tag-list")) {
inTags = true;
} else if (localName.equals("tag") && !inArtist) {
buildString();
tag = new Tag();
tag.setCount(Integer.parseInt(atts.getValue("count")));
} else if (localName.equals("rating")) {
recording.setRatingCount(Integer.parseInt(atts.getValue("votes-count")));
buildString();
}
}
use of org.musicbrainz.android.api.data.ReleaseArtist in project musicbrainz-android by jdamcd.
the class ReleaseLookupHandler method startElement.
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
if (localName.equals("release")) {
release.setReleaseMbid(atts.getValue("id"));
} else if (localName.equals("title")) {
buildString();
} else if (localName.equals("status")) {
buildString();
} else if (localName.equals("barcode")) {
buildString();
} else if (localName.equals("asin")) {
buildString();
} else if (localName.equals("artist")) {
inArtist = true;
releaseArtist = new ReleaseArtist();
releaseArtist.setMbid(atts.getValue("id"));
} else if (localName.equals("name")) {
buildString();
} else if (localName.equals("date")) {
buildString();
} else if (localName.equals("label")) {
inLabel = true;
} else if (localName.equals("release-group")) {
inReleaseGroup = true;
release.setReleaseGroupMbid(atts.getValue("id"));
} else if (localName.equals("track")) {
inTrack = true;
track = new Track();
} else if (localName.equals("recording")) {
inRecording = true;
track.setRecordingMbid(atts.getValue("id"));
} else if (localName.equals("position")) {
buildString();
} else if (localName.equals("length")) {
buildString();
} else if (localName.equals("tag")) {
inTag = true;
buildString();
tag = new Tag();
tag.setCount(Integer.parseInt(atts.getValue("count")));
} else if (localName.equals("rating") && inReleaseGroup) {
release.setReleaseGroupRatingCount(Integer.parseInt(atts.getValue("votes-count")));
buildString();
} else if (localName.equals("relation-list")) {
inRelationships = true;
} else if (localName.equals("medium")) {
inMedium = true;
}
}
use of org.musicbrainz.android.api.data.ReleaseArtist in project musicbrainz-android by jdamcd.
the class ReleaseGroupLookupTest method testReleaseGroupArtist.
@Test
public void testReleaseGroupArtist() {
ReleaseArtist artist = releaseGroup.getArtists().get(0);
assertEquals("The Dillinger Escape Plan", artist.getName());
assertEquals("1bc41dff-5397-4c53-bb50-469d2c277197", artist.getMbid());
}
Aggregations