Clover Coverage Report - Subsonic-Android Coverage Report
Coverage timestamp: ven dic 19 2014 17:57:13 EST
../../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
23   59   3   11,5
2   32   0,13   2
2     1,5  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  MusicDirectoryEntryParser       Line # 27 23 3 100% 1.0
 
No Tests
 
1    /*
2    This file is part of Subsonic.
3   
4    Subsonic is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8   
9    Subsonic is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12    GNU General Public License for more details.
13   
14    You should have received a copy of the GNU General Public License
15    along with Subsonic. If not, see <http://www.gnu.org/licenses/>.
16   
17    Copyright 2009 (C) Sindre Mehus
18    */
19    package net.sourceforge.subsonic.androidapp.service.parser;
20   
21    import android.content.Context;
22    import net.sourceforge.subsonic.androidapp.domain.MusicDirectory;
23   
24    /**
25    * @author Sindre Mehus
26    */
 
27    public class MusicDirectoryEntryParser extends AbstractParser {
28   
 
29  16 toggle public MusicDirectoryEntryParser(Context context) {
30  16 super(context);
31    }
32   
 
33  263 toggle protected MusicDirectory.Entry parseEntry() {
34  263 MusicDirectory.Entry entry = new MusicDirectory.Entry();
35  263 entry.setId(get("id"));
36  263 entry.setParent(get("parent"));
37  263 entry.setTitle(get("title"));
38  263 entry.setDirectory(getBoolean("isDir"));
39  263 entry.setCoverArt(get("coverArt"));
40  263 entry.setArtist(get("artist"));
41   
42  263 if (!entry.isDirectory()) {
43  202 entry.setAlbum(get("album"));
44  202 entry.setTrack(getInteger("track"));
45  202 entry.setYear(getInteger("year"));
46  202 entry.setGenre(get("genre"));
47  202 entry.setContentType(get("contentType"));
48  202 entry.setSuffix(get("suffix"));
49  202 entry.setTranscodedContentType(get("transcodedContentType"));
50  202 entry.setTranscodedSuffix(get("transcodedSuffix"));
51  202 entry.setSize(getLong("size"));
52  202 entry.setDuration(getInteger("duration"));
53  202 entry.setBitRate(getInteger("bitRate"));
54  202 entry.setPath(get("path"));
55  202 entry.setVideo(getBoolean("isVideo"));
56    }
57  263 return entry;
58    }
59    }