RepositoryAudioFileFinder.java

  1. /*
  2.  * *********************************************************************************************************************
  3.  *
  4.  * blueMarine II: Semantic Media Centre
  5.  * http://tidalwave.it/projects/bluemarine2
  6.  *
  7.  * Copyright (C) 2015 - 2021 by Tidalwave s.a.s. (http://tidalwave.it)
  8.  *
  9.  * *********************************************************************************************************************
  10.  *
  11.  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
  12.  * the License. You may obtain a copy of the License at
  13.  *
  14.  *     http://www.apache.org/licenses/LICENSE-2.0
  15.  *
  16.  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
  17.  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
  18.  * specific language governing permissions and limitations under the License.
  19.  *
  20.  * *********************************************************************************************************************
  21.  *
  22.  * git clone https://bitbucket.org/tidalwave/bluemarine2-src
  23.  * git clone https://github.com/tidalwave-it/bluemarine2-src
  24.  *
  25.  * *********************************************************************************************************************
  26.  */
  27. package it.tidalwave.bluemarine2.model.impl.catalog.finder;

  28. import javax.annotation.Nonnull;
  29. import org.eclipse.rdf4j.repository.Repository;
  30. import it.tidalwave.bluemarine2.model.audio.AudioFile;
  31. import it.tidalwave.bluemarine2.model.finder.audio.AudioFileFinder;
  32. import lombok.ToString;

  33. /***********************************************************************************************************************
  34.  *
  35.  * @stereotype      Finder
  36.  *
  37.  * @author  Fabrizio Giudici
  38.  *
  39.  **********************************************************************************************************************/
  40. @ToString
  41. public class RepositoryAudioFileFinder extends RepositoryFinderSupport<AudioFile, AudioFileFinder>
  42.                                          implements AudioFileFinder
  43.   {
  44.     private static final long serialVersionUID = -5065322643235453428L;

  45.     private static final String QUERY_PERFORMANCES = readSparql(RepositoryAudioFileFinder.class, "AudioFiles.sparql");

  46.     /*******************************************************************************************************************
  47.      *
  48.      * Default constructor.
  49.      *
  50.      ******************************************************************************************************************/
  51.     public RepositoryAudioFileFinder (@Nonnull final Repository repository)
  52.       {
  53.         super(repository, "audioFile");
  54.       }

  55.     /*******************************************************************************************************************
  56.      *
  57.      * Clone constructor.
  58.      *
  59.      ******************************************************************************************************************/
  60.     public RepositoryAudioFileFinder (@Nonnull final RepositoryAudioFileFinder other,
  61.                                       @Nonnull final Object override)
  62.       {
  63.         super(other, override);
  64. //        final RepositoryAudioFileFinder source = getSource(RepositoryAudioFileFinder.class, other, override);
  65.       }

  66.     /*******************************************************************************************************************
  67.      *
  68.      * {@inheritDoc}
  69.      *
  70.      ******************************************************************************************************************/
  71.     @Override @Nonnull
  72.     protected QueryAndParameters prepareQuery()
  73.       {
  74.         return QueryAndParameters.withSparql(QUERY_PERFORMANCES);
  75. //                                 .withParameter("track",  trackId.map(this::iriFor))
  76. //                                 .withParameter("artist", performerId.map(this::iriFor));
  77.       }
  78.   }