Skip to content

Package: Track

Track

nameinstructionbranchcomplexitylinemethod
static {...}
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

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.time.Duration;
31: import java.util.Optional;
32: import it.tidalwave.role.Identifiable;
33: import it.tidalwave.bluemarine2.model.MediaItem.Metadata;
34: import it.tidalwave.bluemarine2.model.spi.Entity;
35: import it.tidalwave.bluemarine2.model.spi.SourceAware;
36:
37: /***********************************************************************************************************************
38: *
39: * Represents an audio track in a record. Maps the homonymous concept from the Music Ontology.
40: *
41: * NOTE: a Track is an abstract concept - it is associated to MediaItems (as AudioFiles), but it's not a MediaItem.
42: *
43: * @stereotype Datum
44: *
45: * @author Fabrizio Giudici
46: *
47: **********************************************************************************************************************/
48: public interface Track extends Entity, SourceAware, Identifiable
49: {
50: public static final Class<Track> _Track_ = Track.class;
51:
52: /*******************************************************************************************************************
53: *
54: * A {@link Record} property that it's handy to have here. See {@link Record#getDiskNumber()}.
55: *
56: * @see Record#getDiskNumber()
57: *
58: * @return the disk number
59: *
60: ******************************************************************************************************************/
61: @Nonnull
62: public Optional<Integer> getDiskNumber();
63:
64: /*******************************************************************************************************************
65: *
66: * A {@link Record} property that it's handy to have here. See {@link Record#getDiskCount()}.
67: *
68: * @see Record#getDiskCount()
69: *
70: * @return the disk count
71: *
72: ******************************************************************************************************************/
73: @Nonnull
74: public Optional<Integer> getDiskCount();
75:
76: /*******************************************************************************************************************
77: *
78: * The position of this track in the containing record
79: *
80: * @return the track position
81: *
82: ******************************************************************************************************************/
83: @Nonnull
84: public Optional<Integer> getTrackNumber();
85:
86: /*******************************************************************************************************************
87: *
88: * The duration of this track
89: *
90: * @return the duration
91: *
92: ******************************************************************************************************************/
93: @Nonnull
94: public Optional<Duration> getDuration();
95:
96: /*******************************************************************************************************************
97: *
98: * Returns the {@link Metadata}.
99: *
100: * @return the metadata
101: *
102: ******************************************************************************************************************/
103: @Nonnull
104: public Metadata getMetadata();
105:
106: /*******************************************************************************************************************
107: *
108: * Returns the {@link Record} that contains this track
109: *
110: * @return the record
111: *
112: ******************************************************************************************************************/
113: @Nonnull
114: public Optional<Record> getRecord();
115:
116: /*******************************************************************************************************************
117: *
118: * Returns the {@link Performance} that this track is a recording of.
119: *
120: * @return the performance
121: *
122: ******************************************************************************************************************/
123: @Nonnull
124: public Optional<Performance> getPerformance();
125: }