Skip to contentPackage: Record
Record
Coverage
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.audio;
28:
29: import javax.annotation.Nonnull;
30: import java.util.Optional;
31: import java.net.URL;
32: import it.tidalwave.role.Identifiable;
33: import it.tidalwave.bluemarine2.model.finder.audio.TrackFinder;
34: import it.tidalwave.bluemarine2.model.spi.Entity;
35: import it.tidalwave.bluemarine2.model.spi.SourceAware;
36:
37: /***********************************************************************************************************************
38: *
39: * Represents a record made of audio tracks. Maps the homonymous concept from the Music Ontology.
40: *
41: * @stereotype Datum
42: *
43: * @author Fabrizio Giudici
44: *
45: **********************************************************************************************************************/
46: public interface Record extends Entity, SourceAware, Identifiable
47: {
48: public static final Class<Record> _Record_ = Record.class;
49:
50: /*******************************************************************************************************************
51: *
52: * If this record is part of a multiple record release, return its disk number.
53: *
54: * @return the disk number
55: *
56: ******************************************************************************************************************/
57: @Nonnull
58: public Optional<Integer> getDiskNumber();
59:
60: /*******************************************************************************************************************
61: *
62: * If this record is part of a multiple record release, return the count of disks in the release.
63: *
64: * @return the disk count
65: *
66: ******************************************************************************************************************/
67: @Nonnull
68: public Optional<Integer> getDiskCount();
69:
70: /*******************************************************************************************************************
71: *
72: * Returns the number of tracks in this record, if available. Note that this value is the number of tracks
73: * contained in the release, and might differ from {@code findTracks().count()} if only a subset of tracks is
74: * available in the catalog (for instance, if not all of them have been bought/imported).
75: *
76: * @see #findTracks()
77: *
78: * @return the track count
79: *
80: ******************************************************************************************************************/
81: @Nonnull
82: public Optional<Integer> getTrackCount();
83:
84: /*******************************************************************************************************************
85: *
86: * Finds the {@link Track}s in this record.
87: *
88: * @see #getTrackCount()
89: *
90: * @return a {@code Finder} for the tracks
91: *
92: ******************************************************************************************************************/
93: @Nonnull
94: public TrackFinder findTracks();
95:
96: /*******************************************************************************************************************
97: *
98: * Returns the Amazon ASIN of this record.
99: *
100: * @return the Amazon ASIN
101: *
102: ******************************************************************************************************************/
103: @Nonnull
104: public Optional<String> getAsin();
105:
106: /*******************************************************************************************************************
107: *
108: * Returns the bar code of this record.
109: *
110: * @return the bar code
111: *
112: ******************************************************************************************************************/
113: @Nonnull
114: public Optional<String> getGtin();
115:
116: /*******************************************************************************************************************
117: *
118: * Returns the cover image URL of this record.
119: *
120: * @return the cover image URL
121: *
122: ******************************************************************************************************************/
123: @Nonnull
124: public Optional<URL> getImageUrl();
125: }