2 * Copyright (c) 2015. Developed by Hedgecode.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.hedgecode.xml.xspf;
19 import java.util.List;
21 import org.hedgecode.xml.xspf.bind.Binder;
22 import org.hedgecode.xml.xspf.bind.BinderFactory;
23 import org.hedgecode.xml.xspf.bind.TrackBinder;
25 import static org.hedgecode.xml.xspf.XSPFConstants.Format;
30 * @author Dmitry Samoshin aka gotty
32 public class XMLBindTrack extends AbstractXMLBindElement implements Track {
34 private TrackBinder binder;
36 protected XMLBindTrack(TrackBinder binder) {
38 this.binder = BinderFactory.createTrackBinder();
43 protected XMLBindTrack(Format format) {
44 this.binder = BinderFactory.createTrackBinder(format);
48 protected Binder getBinder() {
53 public List<String> getLocations() {
54 return binder.getLocations();
58 public void addLocation(String location) {
59 binder.addLocation(location);
63 public List<String> getIdentifiers() {
64 return binder.getIdentifiers();
68 public void addIdentifier(String identifier) {
69 binder.addIdentifier(identifier);
73 public String getAlbum() {
74 return binder.getAlbum();
78 public void setAlbum(String album) {
79 binder.setAlbum(album);
83 public Integer getTrackNum() {
84 return binder.getTrackNum();
88 public void setTrackNum(Integer trackNum) {
89 binder.setTrackNum(trackNum);
93 public Integer getDuration() {
94 return binder.getDuration();
98 public void setDuration(Integer duration) {
99 binder.setDuration(duration);