Class XSPFFile
- java.lang.Object
-
- cz.martlin.xspf.playlist.base.XSPFNode
-
- cz.martlin.xspf.playlist.elements.XSPFFile
-
public class XSPFFile extends XSPFNode
The whole xspf file. ContainsXSPFPlaylistinstance. Can be created (create()) or loaded (load(File)). Then can be saved (save(File)).- Author:
- martin
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringXSPF_STANDART_VERSIONThe supported version of the XSPF file standart.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XSPFFilecreate()Creates empty xspf file.booleanequals(Object obj)DocumentgetDocument()Returns the playlist XML document.NodegetNode()XSPFPlaylistgetPlaylist()Returns the (copy of) the playlist.inthashCode()static XSPFFileload(File file)Loads the XSPF playlist from the given file.XSPFAttributionnewAttribution()Creates new attribution.XSPFExtensionsnewExtensions()Creates new collection of extensions.XSPFLinksnewLinks()Creates new collection of links.XSPFMetasnewMetas()Creates new collection of metas.XSPFPlaylistnewPlaylist()Creates new playlist.XSPFTracksnewTracks()Creates new collection of tracks.XSPFPlaylistplaylist()Return the (view of) the playlist.voidsave(File file)Saves this xspf file to the given file.voidsetPlaylist(XSPFPlaylist playlist)Sets the (copy of) the playlist.StringtoString()
-
-
-
Field Detail
-
XSPF_STANDART_VERSION
protected static final String XSPF_STANDART_VERSION
The supported version of the XSPF file standart.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDocument
public Document getDocument()
Returns the playlist XML document.- Returns:
-
getPlaylist
public XSPFPlaylist getPlaylist() throws XSPFException
Returns the (copy of) the playlist.- Returns:
- Throws:
XSPFException
-
playlist
public XSPFPlaylist playlist() throws XSPFException
Return the (view of) the playlist.- Returns:
- Throws:
XSPFException
-
setPlaylist
public void setPlaylist(XSPFPlaylist playlist) throws XSPFException
Sets the (copy of) the playlist.- Parameters:
playlist-- Throws:
XSPFException
-
newMetas
public XSPFMetas newMetas() throws XSPFException
Creates new collection of metas.- Returns:
- Throws:
XSPFException
-
newLinks
public XSPFLinks newLinks() throws XSPFException
Creates new collection of links.- Returns:
- Throws:
XSPFException
-
newExtensions
public XSPFExtensions newExtensions() throws XSPFException
Creates new collection of extensions.- Returns:
- Throws:
XSPFException
-
newTracks
public XSPFTracks newTracks() throws XSPFException
Creates new collection of tracks.- Returns:
- Throws:
XSPFException
-
newPlaylist
public XSPFPlaylist newPlaylist() throws XSPFException
Creates new playlist.- Returns:
- Throws:
XSPFException
-
newAttribution
public XSPFAttribution newAttribution() throws XSPFException
Creates new attribution.- Returns:
- Throws:
XSPFException
-
load
public static XSPFFile load(File file) throws XSPFException
Loads the XSPF playlist from the given file.- Parameters:
file-- Returns:
- Throws:
XSPFException
-
create
public static XSPFFile create() throws XSPFException
Creates empty xspf file.- Returns:
- Throws:
XSPFException
-
save
public void save(File file) throws XSPFException
Saves this xspf file to the given file.- Parameters:
file-- Throws:
XSPFException
-
-