Beispiel #1
0
  private LabelIncludesWs2 getDefaultLabelInclude(AreaIncludesWs2 areainc) {

    LabelIncludesWs2 inc = new LabelIncludesWs2();

    inc.setAliases(false);
    inc.setReleases(false);
    inc.setMedia(false);

    inc.setUrlRelations(false);
    inc.setLabelRelations(false);
    inc.setLabelRelations(false);
    inc.setReleaseGroupRelations(false);
    inc.setLabelRelations(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;
  }
Beispiel #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);
    }
  }