Search in sources :

Example 1 with LabelSearchResult

use of org.musicbrainz.android.api.data.LabelSearchResult in project musicbrainz-android by jdamcd.

the class MusicBrainzWebClient method searchLabel.

@Override
public LinkedList<LabelSearchResult> searchLabel(String searchTerm) throws IOException {
    HttpEntity entity = get(QueryBuilder.labelSearch(searchTerm));
    LinkedList<LabelSearchResult> labels = responseParser.parseLabelSearch(entity.getContent());
    entity.consumeContent();
    return labels;
}
Also used : LabelSearchResult(org.musicbrainz.android.api.data.LabelSearchResult) HttpEntity(org.apache.http.HttpEntity)

Example 2 with LabelSearchResult

use of org.musicbrainz.android.api.data.LabelSearchResult in project musicbrainz-android by jdamcd.

the class LabelSearchHandler method startElement.

public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
    if (localName.equals("label")) {
        result = new LabelSearchResult();
        result.setMbid(atts.getValue("id"));
    } else if (localName.equals("name") && !inTag) {
        buildString();
    } else if (localName.equals("country")) {
        buildString();
    } else if (localName.equals("tag")) {
        inTag = true;
    }
}
Also used : LabelSearchResult(org.musicbrainz.android.api.data.LabelSearchResult)

Aggregations

LabelSearchResult (org.musicbrainz.android.api.data.LabelSearchResult)2 HttpEntity (org.apache.http.HttpEntity)1