Example #1
0
  private PlaceIncludesWs2 getDefaultPlaceInclude(AreaIncludesWs2 areainc) {

    PlaceIncludesWs2 inc = new PlaceIncludesWs2();

    inc.setAliases(false);

    inc.setUrlRelations(false);
    inc.setPlaceRelations(false);
    inc.setPlaceRelations(false);
    inc.setReleaseGroupRelations(false);
    inc.setPlaceRelations(false);
    inc.setRecordingRelations(false);
    inc.setWorkRelations(false);

    inc.setAreaRelations(false);
    inc.setPlaceRelations(false);
    inc.setInstrumentRelations(false);
    inc.setSeriesRelations(false);

    if (areainc == null) return inc;

    // if (areainc.isDiscids()) inc.setDiscids(true);
    // if (areainc.isRecordingLevelRelations()) inc.setRecordingLevelRelations(true);
    // if (areainc.isWorkLevelRelations()) inc.setWorkLevelRelations(true);

    return inc;
  }
Example #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);
    }
  }