示例#1
0
  private ReleaseBrowseFilterWs2 getDefaultReleaseBrowseFilter() {

    ReleaseBrowseFilterWs2 f = new ReleaseBrowseFilterWs2();

    f.getReleaseTypeFilter().setTypeAll(true);
    f.getReleaseStatusFilter().setStatusAll(true);

    f.setLimit((long) getBrowseLimit());
    f.setOffset((long) 0);

    return f;
  }
示例#2
0
  private void initBrowses() {

    if (getIncludes().isArtists() && artistBrowse == null) {

      ArtistIncludesWs2 relInc = getArtistIncludes();
      relInc.setRecordingLevelRelations(false); // invalid request
      relInc.setWorkLevelRelations(false); // invalid request

      ArtistBrowseFilterWs2 f = getArtistBrowseFilter();

      f.setRelatedEntity(AREA);
      f.setRelatedId(getArea().getId());

      artistBrowse = new ArtistBrowseWs2(getQueryWs(), f, relInc);

      getIncluded().setArtists(true);
    }
    if (getIncludes().isLabels() && labelBrowse == null) {

      LabelIncludesWs2 relInc = getLabelIncludes();
      relInc.setRecordingLevelRelations(false); // invalid request
      relInc.setWorkLevelRelations(false); // invalid request

      LabelBrowseFilterWs2 f = getLabelBrowseFilter();

      f.setRelatedEntity(AREA);
      f.setRelatedId(getArea().getId());

      labelBrowse = new LabelBrowseWs2(getQueryWs(), f, relInc);

      getIncluded().setLabels(true);
    }

    if (getIncludes().isReleases() && releaseBrowse == null) {
      ReleaseIncludesWs2 relInc = getReleaseIncludes();
      relInc.setRecordingLevelRelations(false); // invalid request
      relInc.setWorkLevelRelations(false); // invalid request

      ReleaseBrowseFilterWs2 f = getReleaseBrowseFilter();

      f.setRelatedEntity(AREA);
      f.setRelatedId(getArea().getId());

      releaseBrowse = new ReleaseBrowseWs2(getQueryWs(), f, relInc);

      getIncluded().setReleases(true);
    }
    if (getIncludes().isPlaces() && placeBrowse == null) {

      PlaceIncludesWs2 relInc = getPlaceIncludes();
      relInc.setRecordingLevelRelations(false); // invalid request
      relInc.setWorkLevelRelations(false); // invalid request

      PlaceBrowseFilterWs2 f = getPlaceBrowseFilter();

      f.setRelatedEntity(AREA);
      f.setRelatedId(getArea().getId());

      placeBrowse = new PlaceBrowseWs2(getQueryWs(), f, relInc);

      getIncluded().setPlaces(true);
    }
  }