00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 package org.xbmc.android.jsonrpc.api.model;
00022
00023 import android.os.Parcel;
00024 import android.os.Parcelable;
00025 import java.util.ArrayList;
00026 import java.util.Arrays;
00027 import java.util.HashMap;
00028 import java.util.HashSet;
00029 import java.util.List;
00030 import java.util.Set;
00031 import org.codehaus.jackson.JsonNode;
00032 import org.codehaus.jackson.node.ArrayNode;
00033 import org.codehaus.jackson.node.ObjectNode;
00034 import org.codehaus.jackson.node.TextNode;
00035 import org.xbmc.android.jsonrpc.api.AbstractModel;
00036
00037 public final class ListModel {
00038
00045 public static class AlbumFilter extends AbstractModel {
00046 public final static String API_TYPE = "List.Filter.Albums";
00047
00048
00049 public final And and;
00050 public final AlbumFilterRule filterRuleAlbums;
00051 public final Or or;
00052
00056 public AlbumFilter(And and) {
00057 this.and = and;
00058 this.filterRuleAlbums = null;
00059 this.or = null;
00060 }
00061
00065 public AlbumFilter(AlbumFilterRule filterRuleAlbums) {
00066 this.filterRuleAlbums = filterRuleAlbums;
00067 this.and = null;
00068 this.or = null;
00069 }
00070
00074 public AlbumFilter(Or or) {
00075 this.or = or;
00076 this.and = null;
00077 this.filterRuleAlbums = null;
00078 }
00079
00080 @Override
00081 public JsonNode toJsonNode() {
00082 if (and != null) {
00083 return and.toJsonNode();
00084 }
00085 if (filterRuleAlbums != null) {
00086 return filterRuleAlbums.toJsonNode();
00087 }
00088 if (or != null) {
00089 return or.toJsonNode();
00090 }
00091 return null;
00092 }
00093
00099 @Override
00100 public void writeToParcel(Parcel parcel, int flags) {
00101 parcel.writeValue(and);
00102 parcel.writeValue(filterRuleAlbums);
00103 parcel.writeValue(or);
00104 }
00105
00109 protected AlbumFilter(Parcel parcel) {
00110 and = parcel.<And>readParcelable(And.class.getClassLoader());
00111 filterRuleAlbums = parcel.<AlbumFilterRule>readParcelable(AlbumFilterRule.class.getClassLoader());
00112 or = parcel.<Or>readParcelable(Or.class.getClassLoader());
00113 }
00114
00118 public static final Parcelable.Creator<AlbumFilter> CREATOR = new Parcelable.Creator<AlbumFilter>() {
00119 @Override
00120 public AlbumFilter createFromParcel(Parcel parcel) {
00121 return new AlbumFilter(parcel);
00122 }
00123 @Override
00124 public AlbumFilter[] newArray(int n) {
00125 return new AlbumFilter[n];
00126 }
00127 };
00128
00129 @Override
00130 public int describeContents() {
00131 return 0;
00132 }
00133
00138 public static class And extends AbstractModel {
00139
00140
00141 public static final String AND = "and";
00142
00143
00144 public final List<AlbumFilter> and;
00145
00149 public And(List<AlbumFilter> and) {
00150 this.and = and;
00151 }
00152
00153 @Override
00154 public JsonNode toJsonNode() {
00155 final ObjectNode node = OM.createObjectNode();
00156 final ArrayNode andArray = OM.createArrayNode();
00157 for (AlbumFilter item : and) {
00158 andArray.add(item.toJsonNode());
00159 }
00160 node.put(AND, andArray);
00161 return node;
00162 }
00163
00169 @Override
00170 public void writeToParcel(Parcel parcel, int flags) {
00171 parcel.writeInt(and.size());
00172 for (AlbumFilter item : and) {
00173 parcel.writeParcelable(item, flags);
00174 }
00175 }
00176
00180 protected And(Parcel parcel) {
00181 final int andSize = parcel.readInt();
00182 and = new ArrayList<AlbumFilter>(andSize);
00183 for (int i = 0; i < andSize; i++) {
00184 and.add(parcel.<AlbumFilter>readParcelable(AlbumFilter.class.getClassLoader()));
00185 }
00186 }
00187
00191 public static final Parcelable.Creator<And> CREATOR = new Parcelable.Creator<And>() {
00192 @Override
00193 public And createFromParcel(Parcel parcel) {
00194 return new And(parcel);
00195 }
00196 @Override
00197 public And[] newArray(int n) {
00198 return new And[n];
00199 }
00200 };
00201
00202 @Override
00203 public int describeContents() {
00204 return 0;
00205 }
00206 }
00207
00212 public static class Or extends AbstractModel {
00213
00214
00215 public static final String OR = "or";
00216
00217
00218 public final List<AlbumFilter> or;
00219
00223 public Or(List<AlbumFilter> or) {
00224 this.or = or;
00225 }
00226
00227 @Override
00228 public JsonNode toJsonNode() {
00229 final ObjectNode node = OM.createObjectNode();
00230 final ArrayNode orArray = OM.createArrayNode();
00231 for (AlbumFilter item : or) {
00232 orArray.add(item.toJsonNode());
00233 }
00234 node.put(OR, orArray);
00235 return node;
00236 }
00237
00243 @Override
00244 public void writeToParcel(Parcel parcel, int flags) {
00245 parcel.writeInt(or.size());
00246 for (AlbumFilter item : or) {
00247 parcel.writeParcelable(item, flags);
00248 }
00249 }
00250
00254 protected Or(Parcel parcel) {
00255 final int orSize = parcel.readInt();
00256 or = new ArrayList<AlbumFilter>(orSize);
00257 for (int i = 0; i < orSize; i++) {
00258 or.add(parcel.<AlbumFilter>readParcelable(AlbumFilter.class.getClassLoader()));
00259 }
00260 }
00261
00265 public static final Parcelable.Creator<Or> CREATOR = new Parcelable.Creator<Or>() {
00266 @Override
00267 public Or createFromParcel(Parcel parcel) {
00268 return new Or(parcel);
00269 }
00270 @Override
00271 public Or[] newArray(int n) {
00272 return new Or[n];
00273 }
00274 };
00275
00276 @Override
00277 public int describeContents() {
00278 return 0;
00279 }
00280 }
00281 }
00282
00289 public static class ArtistFilter extends AbstractModel {
00290 public final static String API_TYPE = "List.Filter.Artists";
00291
00292
00293 public final And and;
00294 public final ArtistFilterRule filterRuleArtists;
00295 public final Or or;
00296
00300 public ArtistFilter(And and) {
00301 this.and = and;
00302 this.filterRuleArtists = null;
00303 this.or = null;
00304 }
00305
00309 public ArtistFilter(ArtistFilterRule filterRuleArtists) {
00310 this.filterRuleArtists = filterRuleArtists;
00311 this.and = null;
00312 this.or = null;
00313 }
00314
00318 public ArtistFilter(Or or) {
00319 this.or = or;
00320 this.and = null;
00321 this.filterRuleArtists = null;
00322 }
00323
00324 @Override
00325 public JsonNode toJsonNode() {
00326 if (and != null) {
00327 return and.toJsonNode();
00328 }
00329 if (filterRuleArtists != null) {
00330 return filterRuleArtists.toJsonNode();
00331 }
00332 if (or != null) {
00333 return or.toJsonNode();
00334 }
00335 return null;
00336 }
00337
00343 @Override
00344 public void writeToParcel(Parcel parcel, int flags) {
00345 parcel.writeValue(and);
00346 parcel.writeValue(filterRuleArtists);
00347 parcel.writeValue(or);
00348 }
00349
00353 protected ArtistFilter(Parcel parcel) {
00354 and = parcel.<And>readParcelable(And.class.getClassLoader());
00355 filterRuleArtists = parcel.<ArtistFilterRule>readParcelable(ArtistFilterRule.class.getClassLoader());
00356 or = parcel.<Or>readParcelable(Or.class.getClassLoader());
00357 }
00358
00362 public static final Parcelable.Creator<ArtistFilter> CREATOR = new Parcelable.Creator<ArtistFilter>() {
00363 @Override
00364 public ArtistFilter createFromParcel(Parcel parcel) {
00365 return new ArtistFilter(parcel);
00366 }
00367 @Override
00368 public ArtistFilter[] newArray(int n) {
00369 return new ArtistFilter[n];
00370 }
00371 };
00372
00373 @Override
00374 public int describeContents() {
00375 return 0;
00376 }
00377
00382 public static class And extends AbstractModel {
00383
00384
00385 public static final String AND = "and";
00386
00387
00388 public final List<ArtistFilter> and;
00389
00393 public And(List<ArtistFilter> and) {
00394 this.and = and;
00395 }
00396
00397 @Override
00398 public JsonNode toJsonNode() {
00399 final ObjectNode node = OM.createObjectNode();
00400 final ArrayNode andArray = OM.createArrayNode();
00401 for (ArtistFilter item : and) {
00402 andArray.add(item.toJsonNode());
00403 }
00404 node.put(AND, andArray);
00405 return node;
00406 }
00407
00413 @Override
00414 public void writeToParcel(Parcel parcel, int flags) {
00415 parcel.writeInt(and.size());
00416 for (ArtistFilter item : and) {
00417 parcel.writeParcelable(item, flags);
00418 }
00419 }
00420
00424 protected And(Parcel parcel) {
00425 final int andSize = parcel.readInt();
00426 and = new ArrayList<ArtistFilter>(andSize);
00427 for (int i = 0; i < andSize; i++) {
00428 and.add(parcel.<ArtistFilter>readParcelable(ArtistFilter.class.getClassLoader()));
00429 }
00430 }
00431
00435 public static final Parcelable.Creator<And> CREATOR = new Parcelable.Creator<And>() {
00436 @Override
00437 public And createFromParcel(Parcel parcel) {
00438 return new And(parcel);
00439 }
00440 @Override
00441 public And[] newArray(int n) {
00442 return new And[n];
00443 }
00444 };
00445
00446 @Override
00447 public int describeContents() {
00448 return 0;
00449 }
00450 }
00451
00456 public static class Or extends AbstractModel {
00457
00458
00459 public static final String OR = "or";
00460
00461
00462 public final List<ArtistFilter> or;
00463
00467 public Or(List<ArtistFilter> or) {
00468 this.or = or;
00469 }
00470
00471 @Override
00472 public JsonNode toJsonNode() {
00473 final ObjectNode node = OM.createObjectNode();
00474 final ArrayNode orArray = OM.createArrayNode();
00475 for (ArtistFilter item : or) {
00476 orArray.add(item.toJsonNode());
00477 }
00478 node.put(OR, orArray);
00479 return node;
00480 }
00481
00487 @Override
00488 public void writeToParcel(Parcel parcel, int flags) {
00489 parcel.writeInt(or.size());
00490 for (ArtistFilter item : or) {
00491 parcel.writeParcelable(item, flags);
00492 }
00493 }
00494
00498 protected Or(Parcel parcel) {
00499 final int orSize = parcel.readInt();
00500 or = new ArrayList<ArtistFilter>(orSize);
00501 for (int i = 0; i < orSize; i++) {
00502 or.add(parcel.<ArtistFilter>readParcelable(ArtistFilter.class.getClassLoader()));
00503 }
00504 }
00505
00509 public static final Parcelable.Creator<Or> CREATOR = new Parcelable.Creator<Or>() {
00510 @Override
00511 public Or createFromParcel(Parcel parcel) {
00512 return new Or(parcel);
00513 }
00514 @Override
00515 public Or[] newArray(int n) {
00516 return new Or[n];
00517 }
00518 };
00519
00520 @Override
00521 public int describeContents() {
00522 return 0;
00523 }
00524 }
00525 }
00526
00533 public static class EpisodeFilter extends AbstractModel {
00534 public final static String API_TYPE = "List.Filter.Episodes";
00535
00536
00537 public final And and;
00538 public final EpisodeFilterRule filterRuleEpisodes;
00539 public final Or or;
00540
00544 public EpisodeFilter(And and) {
00545 this.and = and;
00546 this.filterRuleEpisodes = null;
00547 this.or = null;
00548 }
00549
00553 public EpisodeFilter(EpisodeFilterRule filterRuleEpisodes) {
00554 this.filterRuleEpisodes = filterRuleEpisodes;
00555 this.and = null;
00556 this.or = null;
00557 }
00558
00562 public EpisodeFilter(Or or) {
00563 this.or = or;
00564 this.and = null;
00565 this.filterRuleEpisodes = null;
00566 }
00567
00568 @Override
00569 public JsonNode toJsonNode() {
00570 if (and != null) {
00571 return and.toJsonNode();
00572 }
00573 if (filterRuleEpisodes != null) {
00574 return filterRuleEpisodes.toJsonNode();
00575 }
00576 if (or != null) {
00577 return or.toJsonNode();
00578 }
00579 return null;
00580 }
00581
00587 @Override
00588 public void writeToParcel(Parcel parcel, int flags) {
00589 parcel.writeValue(and);
00590 parcel.writeValue(filterRuleEpisodes);
00591 parcel.writeValue(or);
00592 }
00593
00597 protected EpisodeFilter(Parcel parcel) {
00598 and = parcel.<And>readParcelable(And.class.getClassLoader());
00599 filterRuleEpisodes = parcel.<EpisodeFilterRule>readParcelable(EpisodeFilterRule.class.getClassLoader());
00600 or = parcel.<Or>readParcelable(Or.class.getClassLoader());
00601 }
00602
00606 public static final Parcelable.Creator<EpisodeFilter> CREATOR = new Parcelable.Creator<EpisodeFilter>() {
00607 @Override
00608 public EpisodeFilter createFromParcel(Parcel parcel) {
00609 return new EpisodeFilter(parcel);
00610 }
00611 @Override
00612 public EpisodeFilter[] newArray(int n) {
00613 return new EpisodeFilter[n];
00614 }
00615 };
00616
00617 @Override
00618 public int describeContents() {
00619 return 0;
00620 }
00621
00626 public static class And extends AbstractModel {
00627
00628
00629 public static final String AND = "and";
00630
00631
00632 public final List<EpisodeFilter> and;
00633
00637 public And(List<EpisodeFilter> and) {
00638 this.and = and;
00639 }
00640
00641 @Override
00642 public JsonNode toJsonNode() {
00643 final ObjectNode node = OM.createObjectNode();
00644 final ArrayNode andArray = OM.createArrayNode();
00645 for (EpisodeFilter item : and) {
00646 andArray.add(item.toJsonNode());
00647 }
00648 node.put(AND, andArray);
00649 return node;
00650 }
00651
00657 @Override
00658 public void writeToParcel(Parcel parcel, int flags) {
00659 parcel.writeInt(and.size());
00660 for (EpisodeFilter item : and) {
00661 parcel.writeParcelable(item, flags);
00662 }
00663 }
00664
00668 protected And(Parcel parcel) {
00669 final int andSize = parcel.readInt();
00670 and = new ArrayList<EpisodeFilter>(andSize);
00671 for (int i = 0; i < andSize; i++) {
00672 and.add(parcel.<EpisodeFilter>readParcelable(EpisodeFilter.class.getClassLoader()));
00673 }
00674 }
00675
00679 public static final Parcelable.Creator<And> CREATOR = new Parcelable.Creator<And>() {
00680 @Override
00681 public And createFromParcel(Parcel parcel) {
00682 return new And(parcel);
00683 }
00684 @Override
00685 public And[] newArray(int n) {
00686 return new And[n];
00687 }
00688 };
00689
00690 @Override
00691 public int describeContents() {
00692 return 0;
00693 }
00694 }
00695
00700 public static class Or extends AbstractModel {
00701
00702
00703 public static final String OR = "or";
00704
00705
00706 public final List<EpisodeFilter> or;
00707
00711 public Or(List<EpisodeFilter> or) {
00712 this.or = or;
00713 }
00714
00715 @Override
00716 public JsonNode toJsonNode() {
00717 final ObjectNode node = OM.createObjectNode();
00718 final ArrayNode orArray = OM.createArrayNode();
00719 for (EpisodeFilter item : or) {
00720 orArray.add(item.toJsonNode());
00721 }
00722 node.put(OR, orArray);
00723 return node;
00724 }
00725
00731 @Override
00732 public void writeToParcel(Parcel parcel, int flags) {
00733 parcel.writeInt(or.size());
00734 for (EpisodeFilter item : or) {
00735 parcel.writeParcelable(item, flags);
00736 }
00737 }
00738
00742 protected Or(Parcel parcel) {
00743 final int orSize = parcel.readInt();
00744 or = new ArrayList<EpisodeFilter>(orSize);
00745 for (int i = 0; i < orSize; i++) {
00746 or.add(parcel.<EpisodeFilter>readParcelable(EpisodeFilter.class.getClassLoader()));
00747 }
00748 }
00749
00753 public static final Parcelable.Creator<Or> CREATOR = new Parcelable.Creator<Or>() {
00754 @Override
00755 public Or createFromParcel(Parcel parcel) {
00756 return new Or(parcel);
00757 }
00758 @Override
00759 public Or[] newArray(int n) {
00760 return new Or[n];
00761 }
00762 };
00763
00764 @Override
00765 public int describeContents() {
00766 return 0;
00767 }
00768 }
00769 }
00770
00777 public static class MovieFilter extends AbstractModel {
00778 public final static String API_TYPE = "List.Filter.Movies";
00779
00780
00781 public final And and;
00782 public final MovieFilterRule filterRuleMovies;
00783 public final Or or;
00784
00788 public MovieFilter(And and) {
00789 this.and = and;
00790 this.filterRuleMovies = null;
00791 this.or = null;
00792 }
00793
00797 public MovieFilter(MovieFilterRule filterRuleMovies) {
00798 this.filterRuleMovies = filterRuleMovies;
00799 this.and = null;
00800 this.or = null;
00801 }
00802
00806 public MovieFilter(Or or) {
00807 this.or = or;
00808 this.and = null;
00809 this.filterRuleMovies = null;
00810 }
00811
00812 @Override
00813 public JsonNode toJsonNode() {
00814 if (and != null) {
00815 return and.toJsonNode();
00816 }
00817 if (filterRuleMovies != null) {
00818 return filterRuleMovies.toJsonNode();
00819 }
00820 if (or != null) {
00821 return or.toJsonNode();
00822 }
00823 return null;
00824 }
00825
00831 @Override
00832 public void writeToParcel(Parcel parcel, int flags) {
00833 parcel.writeValue(and);
00834 parcel.writeValue(filterRuleMovies);
00835 parcel.writeValue(or);
00836 }
00837
00841 protected MovieFilter(Parcel parcel) {
00842 and = parcel.<And>readParcelable(And.class.getClassLoader());
00843 filterRuleMovies = parcel.<MovieFilterRule>readParcelable(MovieFilterRule.class.getClassLoader());
00844 or = parcel.<Or>readParcelable(Or.class.getClassLoader());
00845 }
00846
00850 public static final Parcelable.Creator<MovieFilter> CREATOR = new Parcelable.Creator<MovieFilter>() {
00851 @Override
00852 public MovieFilter createFromParcel(Parcel parcel) {
00853 return new MovieFilter(parcel);
00854 }
00855 @Override
00856 public MovieFilter[] newArray(int n) {
00857 return new MovieFilter[n];
00858 }
00859 };
00860
00861 @Override
00862 public int describeContents() {
00863 return 0;
00864 }
00865
00870 public static class And extends AbstractModel {
00871
00872
00873 public static final String AND = "and";
00874
00875
00876 public final List<MovieFilter> and;
00877
00881 public And(List<MovieFilter> and) {
00882 this.and = and;
00883 }
00884
00885 @Override
00886 public JsonNode toJsonNode() {
00887 final ObjectNode node = OM.createObjectNode();
00888 final ArrayNode andArray = OM.createArrayNode();
00889 for (MovieFilter item : and) {
00890 andArray.add(item.toJsonNode());
00891 }
00892 node.put(AND, andArray);
00893 return node;
00894 }
00895
00901 @Override
00902 public void writeToParcel(Parcel parcel, int flags) {
00903 parcel.writeInt(and.size());
00904 for (MovieFilter item : and) {
00905 parcel.writeParcelable(item, flags);
00906 }
00907 }
00908
00912 protected And(Parcel parcel) {
00913 final int andSize = parcel.readInt();
00914 and = new ArrayList<MovieFilter>(andSize);
00915 for (int i = 0; i < andSize; i++) {
00916 and.add(parcel.<MovieFilter>readParcelable(MovieFilter.class.getClassLoader()));
00917 }
00918 }
00919
00923 public static final Parcelable.Creator<And> CREATOR = new Parcelable.Creator<And>() {
00924 @Override
00925 public And createFromParcel(Parcel parcel) {
00926 return new And(parcel);
00927 }
00928 @Override
00929 public And[] newArray(int n) {
00930 return new And[n];
00931 }
00932 };
00933
00934 @Override
00935 public int describeContents() {
00936 return 0;
00937 }
00938 }
00939
00944 public static class Or extends AbstractModel {
00945
00946
00947 public static final String OR = "or";
00948
00949
00950 public final List<MovieFilter> or;
00951
00955 public Or(List<MovieFilter> or) {
00956 this.or = or;
00957 }
00958
00959 @Override
00960 public JsonNode toJsonNode() {
00961 final ObjectNode node = OM.createObjectNode();
00962 final ArrayNode orArray = OM.createArrayNode();
00963 for (MovieFilter item : or) {
00964 orArray.add(item.toJsonNode());
00965 }
00966 node.put(OR, orArray);
00967 return node;
00968 }
00969
00975 @Override
00976 public void writeToParcel(Parcel parcel, int flags) {
00977 parcel.writeInt(or.size());
00978 for (MovieFilter item : or) {
00979 parcel.writeParcelable(item, flags);
00980 }
00981 }
00982
00986 protected Or(Parcel parcel) {
00987 final int orSize = parcel.readInt();
00988 or = new ArrayList<MovieFilter>(orSize);
00989 for (int i = 0; i < orSize; i++) {
00990 or.add(parcel.<MovieFilter>readParcelable(MovieFilter.class.getClassLoader()));
00991 }
00992 }
00993
00997 public static final Parcelable.Creator<Or> CREATOR = new Parcelable.Creator<Or>() {
00998 @Override
00999 public Or createFromParcel(Parcel parcel) {
01000 return new Or(parcel);
01001 }
01002 @Override
01003 public Or[] newArray(int n) {
01004 return new Or[n];
01005 }
01006 };
01007
01008 @Override
01009 public int describeContents() {
01010 return 0;
01011 }
01012 }
01013 }
01014
01021 public static class MusicVideoFilter extends AbstractModel {
01022 public final static String API_TYPE = "List.Filter.MusicVideos";
01023
01024
01025 public final And and;
01026 public final MusicVideoFilterRule filterRuleMusicVideos;
01027 public final Or or;
01028
01032 public MusicVideoFilter(And and) {
01033 this.and = and;
01034 this.filterRuleMusicVideos = null;
01035 this.or = null;
01036 }
01037
01041 public MusicVideoFilter(MusicVideoFilterRule filterRuleMusicVideos) {
01042 this.filterRuleMusicVideos = filterRuleMusicVideos;
01043 this.and = null;
01044 this.or = null;
01045 }
01046
01050 public MusicVideoFilter(Or or) {
01051 this.or = or;
01052 this.and = null;
01053 this.filterRuleMusicVideos = null;
01054 }
01055
01056 @Override
01057 public JsonNode toJsonNode() {
01058 if (and != null) {
01059 return and.toJsonNode();
01060 }
01061 if (filterRuleMusicVideos != null) {
01062 return filterRuleMusicVideos.toJsonNode();
01063 }
01064 if (or != null) {
01065 return or.toJsonNode();
01066 }
01067 return null;
01068 }
01069
01075 @Override
01076 public void writeToParcel(Parcel parcel, int flags) {
01077 parcel.writeValue(and);
01078 parcel.writeValue(filterRuleMusicVideos);
01079 parcel.writeValue(or);
01080 }
01081
01085 protected MusicVideoFilter(Parcel parcel) {
01086 and = parcel.<And>readParcelable(And.class.getClassLoader());
01087 filterRuleMusicVideos = parcel.<MusicVideoFilterRule>readParcelable(MusicVideoFilterRule.class.getClassLoader());
01088 or = parcel.<Or>readParcelable(Or.class.getClassLoader());
01089 }
01090
01094 public static final Parcelable.Creator<MusicVideoFilter> CREATOR = new Parcelable.Creator<MusicVideoFilter>() {
01095 @Override
01096 public MusicVideoFilter createFromParcel(Parcel parcel) {
01097 return new MusicVideoFilter(parcel);
01098 }
01099 @Override
01100 public MusicVideoFilter[] newArray(int n) {
01101 return new MusicVideoFilter[n];
01102 }
01103 };
01104
01105 @Override
01106 public int describeContents() {
01107 return 0;
01108 }
01109
01114 public static class And extends AbstractModel {
01115
01116
01117 public static final String AND = "and";
01118
01119
01120 public final List<MusicVideoFilter> and;
01121
01125 public And(List<MusicVideoFilter> and) {
01126 this.and = and;
01127 }
01128
01129 @Override
01130 public JsonNode toJsonNode() {
01131 final ObjectNode node = OM.createObjectNode();
01132 final ArrayNode andArray = OM.createArrayNode();
01133 for (MusicVideoFilter item : and) {
01134 andArray.add(item.toJsonNode());
01135 }
01136 node.put(AND, andArray);
01137 return node;
01138 }
01139
01145 @Override
01146 public void writeToParcel(Parcel parcel, int flags) {
01147 parcel.writeInt(and.size());
01148 for (MusicVideoFilter item : and) {
01149 parcel.writeParcelable(item, flags);
01150 }
01151 }
01152
01156 protected And(Parcel parcel) {
01157 final int andSize = parcel.readInt();
01158 and = new ArrayList<MusicVideoFilter>(andSize);
01159 for (int i = 0; i < andSize; i++) {
01160 and.add(parcel.<MusicVideoFilter>readParcelable(MusicVideoFilter.class.getClassLoader()));
01161 }
01162 }
01163
01167 public static final Parcelable.Creator<And> CREATOR = new Parcelable.Creator<And>() {
01168 @Override
01169 public And createFromParcel(Parcel parcel) {
01170 return new And(parcel);
01171 }
01172 @Override
01173 public And[] newArray(int n) {
01174 return new And[n];
01175 }
01176 };
01177
01178 @Override
01179 public int describeContents() {
01180 return 0;
01181 }
01182 }
01183
01188 public static class Or extends AbstractModel {
01189
01190
01191 public static final String OR = "or";
01192
01193
01194 public final List<MusicVideoFilter> or;
01195
01199 public Or(List<MusicVideoFilter> or) {
01200 this.or = or;
01201 }
01202
01203 @Override
01204 public JsonNode toJsonNode() {
01205 final ObjectNode node = OM.createObjectNode();
01206 final ArrayNode orArray = OM.createArrayNode();
01207 for (MusicVideoFilter item : or) {
01208 orArray.add(item.toJsonNode());
01209 }
01210 node.put(OR, orArray);
01211 return node;
01212 }
01213
01219 @Override
01220 public void writeToParcel(Parcel parcel, int flags) {
01221 parcel.writeInt(or.size());
01222 for (MusicVideoFilter item : or) {
01223 parcel.writeParcelable(item, flags);
01224 }
01225 }
01226
01230 protected Or(Parcel parcel) {
01231 final int orSize = parcel.readInt();
01232 or = new ArrayList<MusicVideoFilter>(orSize);
01233 for (int i = 0; i < orSize; i++) {
01234 or.add(parcel.<MusicVideoFilter>readParcelable(MusicVideoFilter.class.getClassLoader()));
01235 }
01236 }
01237
01241 public static final Parcelable.Creator<Or> CREATOR = new Parcelable.Creator<Or>() {
01242 @Override
01243 public Or createFromParcel(Parcel parcel) {
01244 return new Or(parcel);
01245 }
01246 @Override
01247 public Or[] newArray(int n) {
01248 return new Or[n];
01249 }
01250 };
01251
01252 @Override
01253 public int describeContents() {
01254 return 0;
01255 }
01256 }
01257 }
01258
01265 public static class FilterRule extends AbstractModel {
01266 public final static String API_TYPE = "List.Filter.Rule";
01267
01268
01269 public static final String OPERATOR = "operator";
01270 public static final String VALUE = "value";
01271
01272
01273 public final String operator;
01274 public final Value value;
01275
01280 public FilterRule(String operator, Value value) {
01281 this.operator = operator;
01282 this.value = value;
01283 }
01284
01285 @Override
01286 public JsonNode toJsonNode() {
01287 final ObjectNode node = OM.createObjectNode();
01288 node.put(OPERATOR, operator);
01289 node.put(VALUE, value.toJsonNode());
01290 return node;
01291 }
01292
01298 @Override
01299 public void writeToParcel(Parcel parcel, int flags) {
01300 parcel.writeValue(operator);
01301 parcel.writeValue(value);
01302 }
01303
01307 protected FilterRule(Parcel parcel) {
01308 operator = parcel.readString();
01309 value = parcel.<Value>readParcelable(Value.class.getClassLoader());
01310 }
01311
01315 public static final Parcelable.Creator<FilterRule> CREATOR = new Parcelable.Creator<FilterRule>() {
01316 @Override
01317 public FilterRule createFromParcel(Parcel parcel) {
01318 return new FilterRule(parcel);
01319 }
01320 @Override
01321 public FilterRule[] newArray(int n) {
01322 return new FilterRule[n];
01323 }
01324 };
01325
01326 @Override
01327 public int describeContents() {
01328 return 0;
01329 }
01330
01335 public static class Value extends AbstractModel {
01336
01337
01338 public final String stringArg;
01339 public final List<String> stringArgList;
01340
01344 public Value(String stringArg) {
01345 this.stringArg = stringArg;
01346 this.stringArgList = null;
01347 }
01348
01352 public Value(List<String> stringArgList) {
01353 this.stringArgList = stringArgList;
01354 this.stringArg = null;
01355 }
01356
01357 @Override
01358 public JsonNode toJsonNode() {
01359 if (stringArg != null) {
01360 return new TextNode(stringArg);
01361 }
01362 if (stringArgList != null) {
01363 final ArrayNode an = OM.createArrayNode();
01364 for (String item : stringArgList) {
01365 an.add(item);
01366 };
01367 return an;
01368 }
01369 return null;
01370 }
01371
01377 @Override
01378 public void writeToParcel(Parcel parcel, int flags) {
01379 parcel.writeValue(stringArg);
01380 parcel.writeInt(stringArgList.size());
01381 for (String item : stringArgList) {
01382 parcel.writeValue(item);
01383 }
01384 }
01385
01389 protected Value(Parcel parcel) {
01390 stringArg = parcel.readString();
01391 final int stringArgListSize = parcel.readInt();
01392 stringArgList = new ArrayList<String>(stringArgListSize);
01393 for (int i = 0; i < stringArgListSize; i++) {
01394 stringArgList.add(parcel.readString());
01395 }
01396 }
01397
01401 public static final Parcelable.Creator<Value> CREATOR = new Parcelable.Creator<Value>() {
01402 @Override
01403 public Value createFromParcel(Parcel parcel) {
01404 return new Value(parcel);
01405 }
01406 @Override
01407 public Value[] newArray(int n) {
01408 return new Value[n];
01409 }
01410 };
01411
01412 @Override
01413 public int describeContents() {
01414 return 0;
01415 }
01416 }
01417
01421 public interface Operator {
01422
01423 public final String CONTAINS = "contains";
01424 public final String DOESNOTCONTAIN = "doesnotcontain";
01425 public final String IS = "is";
01426 public final String ISNOT = "isnot";
01427 public final String STARTSWITH = "startswith";
01428 public final String ENDSWITH = "endswith";
01429 public final String GREATERTHAN = "greaterthan";
01430 public final String LESSTHAN = "lessthan";
01431 public final String AFTER = "after";
01432 public final String BEFORE = "before";
01433 public final String INTHELAST = "inthelast";
01434 public final String NOTINTHELAST = "notinthelast";
01435 public final String TRUE = "true";
01436 public final String FALSE = "false";
01437 public final String BETWEEN = "between";
01438
01439 public final static Set<String> values = new HashSet<String>(Arrays.asList(CONTAINS, DOESNOTCONTAIN, IS, ISNOT, STARTSWITH, ENDSWITH, GREATERTHAN, LESSTHAN, AFTER, BEFORE, INTHELAST, NOTINTHELAST, TRUE, FALSE, BETWEEN));
01440 }
01441 }
01442
01449 public static class AlbumFilterRule extends FilterRule {
01450 public final static String API_TYPE = "List.Filter.Rule.Albums";
01451
01452
01453 public static final String FIELD = "field";
01454
01455
01456 public final String field;
01457
01463 public AlbumFilterRule(String operator, Value value, String field) {
01464 super(operator, value);
01465 this.field = field;
01466 }
01467
01468 @Override
01469 public JsonNode toJsonNode() {
01470 final ObjectNode node = (ObjectNode)super.toJsonNode();
01471 node.put(FIELD, field);
01472 return node;
01473 }
01474
01480 @Override
01481 public void writeToParcel(Parcel parcel, int flags) {
01482 super.writeToParcel(parcel, flags);
01483 parcel.writeValue(field);
01484 }
01485
01489 protected AlbumFilterRule(Parcel parcel) {
01490 super(parcel);
01491 field = parcel.readString();
01492 }
01493
01497 public static final Parcelable.Creator<AlbumFilterRule> CREATOR = new Parcelable.Creator<AlbumFilterRule>() {
01498 @Override
01499 public AlbumFilterRule createFromParcel(Parcel parcel) {
01500 return new AlbumFilterRule(parcel);
01501 }
01502 @Override
01503 public AlbumFilterRule[] newArray(int n) {
01504 return new AlbumFilterRule[n];
01505 }
01506 };
01507
01508 @Override
01509 public int describeContents() {
01510 return 0;
01511 }
01512
01516 public interface Field {
01517
01518 public final String GENRE = "genre";
01519 public final String ALBUM = "album";
01520 public final String ARTIST = "artist";
01521 public final String ALBUMARTIST = "albumartist";
01522 public final String YEAR = "year";
01523 public final String REVIEW = "review";
01524 public final String THEMES = "themes";
01525 public final String MOODS = "moods";
01526 public final String STYLES = "styles";
01527 public final String TYPE = "type";
01528 public final String LABEL = "label";
01529 public final String RATING = "rating";
01530 public final String PLAYCOUNT = "playcount";
01531 public final String PLAYLIST = "playlist";
01532 public final String VIRTUALFOLDER = "virtualfolder";
01533
01534 public final static Set<String> values = new HashSet<String>(Arrays.asList(GENRE, ALBUM, ARTIST, ALBUMARTIST, YEAR, REVIEW, THEMES, MOODS, STYLES, TYPE, LABEL, RATING, PLAYCOUNT, PLAYLIST, VIRTUALFOLDER));
01535 }
01536 }
01537
01544 public static class ArtistFilterRule extends FilterRule {
01545 public final static String API_TYPE = "List.Filter.Rule.Artists";
01546
01547
01548 public static final String FIELD = "field";
01549
01550
01551 public final String field;
01552
01558 public ArtistFilterRule(String operator, Value value, String field) {
01559 super(operator, value);
01560 this.field = field;
01561 }
01562
01563 @Override
01564 public JsonNode toJsonNode() {
01565 final ObjectNode node = (ObjectNode)super.toJsonNode();
01566 node.put(FIELD, field);
01567 return node;
01568 }
01569
01575 @Override
01576 public void writeToParcel(Parcel parcel, int flags) {
01577 super.writeToParcel(parcel, flags);
01578 parcel.writeValue(field);
01579 }
01580
01584 protected ArtistFilterRule(Parcel parcel) {
01585 super(parcel);
01586 field = parcel.readString();
01587 }
01588
01592 public static final Parcelable.Creator<ArtistFilterRule> CREATOR = new Parcelable.Creator<ArtistFilterRule>() {
01593 @Override
01594 public ArtistFilterRule createFromParcel(Parcel parcel) {
01595 return new ArtistFilterRule(parcel);
01596 }
01597 @Override
01598 public ArtistFilterRule[] newArray(int n) {
01599 return new ArtistFilterRule[n];
01600 }
01601 };
01602
01603 @Override
01604 public int describeContents() {
01605 return 0;
01606 }
01607
01611 public interface Field {
01612
01613 public final String ARTIST = "artist";
01614 public final String GENRE = "genre";
01615 public final String MOODS = "moods";
01616 public final String STYLES = "styles";
01617 public final String INSTRUMENTS = "instruments";
01618 public final String BIOGRAPHY = "biography";
01619 public final String BORN = "born";
01620 public final String BANDFORMED = "bandformed";
01621 public final String DISBANDED = "disbanded";
01622 public final String DIED = "died";
01623 public final String PLAYLIST = "playlist";
01624 public final String VIRTUALFOLDER = "virtualfolder";
01625
01626 public final static Set<String> values = new HashSet<String>(Arrays.asList(ARTIST, GENRE, MOODS, STYLES, INSTRUMENTS, BIOGRAPHY, BORN, BANDFORMED, DISBANDED, DIED, PLAYLIST, VIRTUALFOLDER));
01627 }
01628 }
01629
01636 public static class EpisodeFilterRule extends FilterRule {
01637 public final static String API_TYPE = "List.Filter.Rule.Episodes";
01638
01639
01640 public static final String FIELD = "field";
01641
01642
01643 public final String field;
01644
01650 public EpisodeFilterRule(String operator, Value value, String field) {
01651 super(operator, value);
01652 this.field = field;
01653 }
01654
01655 @Override
01656 public JsonNode toJsonNode() {
01657 final ObjectNode node = (ObjectNode)super.toJsonNode();
01658 node.put(FIELD, field);
01659 return node;
01660 }
01661
01667 @Override
01668 public void writeToParcel(Parcel parcel, int flags) {
01669 super.writeToParcel(parcel, flags);
01670 parcel.writeValue(field);
01671 }
01672
01676 protected EpisodeFilterRule(Parcel parcel) {
01677 super(parcel);
01678 field = parcel.readString();
01679 }
01680
01684 public static final Parcelable.Creator<EpisodeFilterRule> CREATOR = new Parcelable.Creator<EpisodeFilterRule>() {
01685 @Override
01686 public EpisodeFilterRule createFromParcel(Parcel parcel) {
01687 return new EpisodeFilterRule(parcel);
01688 }
01689 @Override
01690 public EpisodeFilterRule[] newArray(int n) {
01691 return new EpisodeFilterRule[n];
01692 }
01693 };
01694
01695 @Override
01696 public int describeContents() {
01697 return 0;
01698 }
01699
01703 public interface Field {
01704
01705 public final String TITLE = "title";
01706 public final String TVSHOW = "tvshow";
01707 public final String PLOT = "plot";
01708 public final String VOTES = "votes";
01709 public final String RATING = "rating";
01710 public final String TIME = "time";
01711 public final String WRITERS = "writers";
01712 public final String AIRDATE = "airdate";
01713 public final String PLAYCOUNT = "playcount";
01714 public final String LASTPLAYED = "lastplayed";
01715 public final String INPROGRESS = "inprogress";
01716 public final String GENRE = "genre";
01717 public final String YEAR = "year";
01718 public final String DIRECTOR = "director";
01719 public final String ACTOR = "actor";
01720 public final String EPISODE = "episode";
01721 public final String SEASON = "season";
01722 public final String FILENAME = "filename";
01723 public final String PATH = "path";
01724 public final String STUDIO = "studio";
01725 public final String MPAARATING = "mpaarating";
01726 public final String DATEADDED = "dateadded";
01727 public final String VIDEORESOLUTION = "videoresolution";
01728 public final String AUDIOCHANNELS = "audiochannels";
01729 public final String VIDEOCODEC = "videocodec";
01730 public final String AUDIOCODEC = "audiocodec";
01731 public final String AUDIOLANGUAGE = "audiolanguage";
01732 public final String SUBTITLELANGUAGE = "subtitlelanguage";
01733 public final String VIDEOASPECT = "videoaspect";
01734 public final String PLAYLIST = "playlist";
01735 public final String VIRTUALFOLDER = "virtualfolder";
01736
01737 public final static Set<String> values = new HashSet<String>(Arrays.asList(TITLE, TVSHOW, PLOT, VOTES, RATING, TIME, WRITERS, AIRDATE, PLAYCOUNT, LASTPLAYED, INPROGRESS, GENRE, YEAR, DIRECTOR, ACTOR, EPISODE, SEASON, FILENAME, PATH, STUDIO, MPAARATING, DATEADDED, VIDEORESOLUTION, AUDIOCHANNELS, VIDEOCODEC, AUDIOCODEC, AUDIOLANGUAGE, SUBTITLELANGUAGE, VIDEOASPECT, PLAYLIST, VIRTUALFOLDER));
01738 }
01739 }
01740
01747 public static class MovieFilterRule extends FilterRule {
01748 public final static String API_TYPE = "List.Filter.Rule.Movies";
01749
01750
01751 public static final String FIELD = "field";
01752
01753
01754 public final String field;
01755
01761 public MovieFilterRule(String operator, Value value, String field) {
01762 super(operator, value);
01763 this.field = field;
01764 }
01765
01766 @Override
01767 public JsonNode toJsonNode() {
01768 final ObjectNode node = (ObjectNode)super.toJsonNode();
01769 node.put(FIELD, field);
01770 return node;
01771 }
01772
01778 @Override
01779 public void writeToParcel(Parcel parcel, int flags) {
01780 super.writeToParcel(parcel, flags);
01781 parcel.writeValue(field);
01782 }
01783
01787 protected MovieFilterRule(Parcel parcel) {
01788 super(parcel);
01789 field = parcel.readString();
01790 }
01791
01795 public static final Parcelable.Creator<MovieFilterRule> CREATOR = new Parcelable.Creator<MovieFilterRule>() {
01796 @Override
01797 public MovieFilterRule createFromParcel(Parcel parcel) {
01798 return new MovieFilterRule(parcel);
01799 }
01800 @Override
01801 public MovieFilterRule[] newArray(int n) {
01802 return new MovieFilterRule[n];
01803 }
01804 };
01805
01806 @Override
01807 public int describeContents() {
01808 return 0;
01809 }
01810
01814 public interface Field {
01815
01816 public final String TITLE = "title";
01817 public final String PLOT = "plot";
01818 public final String PLOTOUTLINE = "plotoutline";
01819 public final String TAGLINE = "tagline";
01820 public final String VOTES = "votes";
01821 public final String RATING = "rating";
01822 public final String TIME = "time";
01823 public final String WRITERS = "writers";
01824 public final String PLAYCOUNT = "playcount";
01825 public final String LASTPLAYED = "lastplayed";
01826 public final String INPROGRESS = "inprogress";
01827 public final String GENRE = "genre";
01828 public final String COUNTRY = "country";
01829 public final String YEAR = "year";
01830 public final String DIRECTOR = "director";
01831 public final String ACTOR = "actor";
01832 public final String MPAARATING = "mpaarating";
01833 public final String TOP250 = "top250";
01834 public final String STUDIO = "studio";
01835 public final String HASTRAILER = "hastrailer";
01836 public final String FILENAME = "filename";
01837 public final String PATH = "path";
01838 public final String SET = "set";
01839 public final String TAG = "tag";
01840 public final String DATEADDED = "dateadded";
01841 public final String VIDEORESOLUTION = "videoresolution";
01842 public final String AUDIOCHANNELS = "audiochannels";
01843 public final String VIDEOCODEC = "videocodec";
01844 public final String AUDIOCODEC = "audiocodec";
01845 public final String AUDIOLANGUAGE = "audiolanguage";
01846 public final String SUBTITLELANGUAGE = "subtitlelanguage";
01847 public final String VIDEOASPECT = "videoaspect";
01848 public final String PLAYLIST = "playlist";
01849 public final String VIRTUALFOLDER = "virtualfolder";
01850
01851 public final static Set<String> values = new HashSet<String>(Arrays.asList(TITLE, PLOT, PLOTOUTLINE, TAGLINE, VOTES, RATING, TIME, WRITERS, PLAYCOUNT, LASTPLAYED, INPROGRESS, GENRE, COUNTRY, YEAR, DIRECTOR, ACTOR, MPAARATING, TOP250, STUDIO, HASTRAILER, FILENAME, PATH, SET, TAG, DATEADDED, VIDEORESOLUTION, AUDIOCHANNELS, VIDEOCODEC, AUDIOCODEC, AUDIOLANGUAGE, SUBTITLELANGUAGE, VIDEOASPECT, PLAYLIST, VIRTUALFOLDER));
01852 }
01853 }
01854
01861 public static class MusicVideoFilterRule extends FilterRule {
01862 public final static String API_TYPE = "List.Filter.Rule.MusicVideos";
01863
01864
01865 public static final String FIELD = "field";
01866
01867
01868 public final String field;
01869
01875 public MusicVideoFilterRule(String operator, Value value, String field) {
01876 super(operator, value);
01877 this.field = field;
01878 }
01879
01880 @Override
01881 public JsonNode toJsonNode() {
01882 final ObjectNode node = (ObjectNode)super.toJsonNode();
01883 node.put(FIELD, field);
01884 return node;
01885 }
01886
01892 @Override
01893 public void writeToParcel(Parcel parcel, int flags) {
01894 super.writeToParcel(parcel, flags);
01895 parcel.writeValue(field);
01896 }
01897
01901 protected MusicVideoFilterRule(Parcel parcel) {
01902 super(parcel);
01903 field = parcel.readString();
01904 }
01905
01909 public static final Parcelable.Creator<MusicVideoFilterRule> CREATOR = new Parcelable.Creator<MusicVideoFilterRule>() {
01910 @Override
01911 public MusicVideoFilterRule createFromParcel(Parcel parcel) {
01912 return new MusicVideoFilterRule(parcel);
01913 }
01914 @Override
01915 public MusicVideoFilterRule[] newArray(int n) {
01916 return new MusicVideoFilterRule[n];
01917 }
01918 };
01919
01920 @Override
01921 public int describeContents() {
01922 return 0;
01923 }
01924
01928 public interface Field {
01929
01930 public final String TITLE = "title";
01931 public final String GENRE = "genre";
01932 public final String ALBUM = "album";
01933 public final String YEAR = "year";
01934 public final String ARTIST = "artist";
01935 public final String FILENAME = "filename";
01936 public final String PATH = "path";
01937 public final String PLAYCOUNT = "playcount";
01938 public final String LASTPLAYED = "lastplayed";
01939 public final String TIME = "time";
01940 public final String DIRECTOR = "director";
01941 public final String STUDIO = "studio";
01942 public final String PLOT = "plot";
01943 public final String TAG = "tag";
01944 public final String DATEADDED = "dateadded";
01945 public final String VIDEORESOLUTION = "videoresolution";
01946 public final String AUDIOCHANNELS = "audiochannels";
01947 public final String VIDEOCODEC = "videocodec";
01948 public final String AUDIOCODEC = "audiocodec";
01949 public final String AUDIOLANGUAGE = "audiolanguage";
01950 public final String SUBTITLELANGUAGE = "subtitlelanguage";
01951 public final String VIDEOASPECT = "videoaspect";
01952 public final String PLAYLIST = "playlist";
01953 public final String VIRTUALFOLDER = "virtualfolder";
01954
01955 public final static Set<String> values = new HashSet<String>(Arrays.asList(TITLE, GENRE, ALBUM, YEAR, ARTIST, FILENAME, PATH, PLAYCOUNT, LASTPLAYED, TIME, DIRECTOR, STUDIO, PLOT, TAG, DATEADDED, VIDEORESOLUTION, AUDIOCHANNELS, VIDEOCODEC, AUDIOCODEC, AUDIOLANGUAGE, SUBTITLELANGUAGE, VIDEOASPECT, PLAYLIST, VIRTUALFOLDER));
01956 }
01957 }
01958
01965 public static class SongFilterRule extends FilterRule {
01966 public final static String API_TYPE = "List.Filter.Rule.Songs";
01967
01968
01969 public static final String FIELD = "field";
01970
01971
01972 public final String field;
01973
01979 public SongFilterRule(String operator, Value value, String field) {
01980 super(operator, value);
01981 this.field = field;
01982 }
01983
01984 @Override
01985 public JsonNode toJsonNode() {
01986 final ObjectNode node = (ObjectNode)super.toJsonNode();
01987 node.put(FIELD, field);
01988 return node;
01989 }
01990
01996 @Override
01997 public void writeToParcel(Parcel parcel, int flags) {
01998 super.writeToParcel(parcel, flags);
01999 parcel.writeValue(field);
02000 }
02001
02005 protected SongFilterRule(Parcel parcel) {
02006 super(parcel);
02007 field = parcel.readString();
02008 }
02009
02013 public static final Parcelable.Creator<SongFilterRule> CREATOR = new Parcelable.Creator<SongFilterRule>() {
02014 @Override
02015 public SongFilterRule createFromParcel(Parcel parcel) {
02016 return new SongFilterRule(parcel);
02017 }
02018 @Override
02019 public SongFilterRule[] newArray(int n) {
02020 return new SongFilterRule[n];
02021 }
02022 };
02023
02024 @Override
02025 public int describeContents() {
02026 return 0;
02027 }
02028
02032 public interface Field {
02033
02034 public final String GENRE = "genre";
02035 public final String ALBUM = "album";
02036 public final String ARTIST = "artist";
02037 public final String ALBUMARTIST = "albumartist";
02038 public final String TITLE = "title";
02039 public final String YEAR = "year";
02040 public final String TIME = "time";
02041 public final String TRACKNUMBER = "tracknumber";
02042 public final String FILENAME = "filename";
02043 public final String PATH = "path";
02044 public final String PLAYCOUNT = "playcount";
02045 public final String LASTPLAYED = "lastplayed";
02046 public final String RATING = "rating";
02047 public final String COMMENT = "comment";
02048 public final String PLAYLIST = "playlist";
02049 public final String VIRTUALFOLDER = "virtualfolder";
02050
02051 public final static Set<String> values = new HashSet<String>(Arrays.asList(GENRE, ALBUM, ARTIST, ALBUMARTIST, TITLE, YEAR, TIME, TRACKNUMBER, FILENAME, PATH, PLAYCOUNT, LASTPLAYED, RATING, COMMENT, PLAYLIST, VIRTUALFOLDER));
02052 }
02053 }
02054
02061 public static class TVShowFilterRule extends FilterRule {
02062 public final static String API_TYPE = "List.Filter.Rule.TVShows";
02063
02064
02065 public static final String FIELD = "field";
02066
02067
02068 public final String field;
02069
02075 public TVShowFilterRule(String operator, Value value, String field) {
02076 super(operator, value);
02077 this.field = field;
02078 }
02079
02080 @Override
02081 public JsonNode toJsonNode() {
02082 final ObjectNode node = (ObjectNode)super.toJsonNode();
02083 node.put(FIELD, field);
02084 return node;
02085 }
02086
02092 @Override
02093 public void writeToParcel(Parcel parcel, int flags) {
02094 super.writeToParcel(parcel, flags);
02095 parcel.writeValue(field);
02096 }
02097
02101 protected TVShowFilterRule(Parcel parcel) {
02102 super(parcel);
02103 field = parcel.readString();
02104 }
02105
02109 public static final Parcelable.Creator<TVShowFilterRule> CREATOR = new Parcelable.Creator<TVShowFilterRule>() {
02110 @Override
02111 public TVShowFilterRule createFromParcel(Parcel parcel) {
02112 return new TVShowFilterRule(parcel);
02113 }
02114 @Override
02115 public TVShowFilterRule[] newArray(int n) {
02116 return new TVShowFilterRule[n];
02117 }
02118 };
02119
02120 @Override
02121 public int describeContents() {
02122 return 0;
02123 }
02124
02128 public interface Field {
02129
02130 public final String TITLE = "title";
02131 public final String PLOT = "plot";
02132 public final String STATUS = "status";
02133 public final String VOTES = "votes";
02134 public final String RATING = "rating";
02135 public final String YEAR = "year";
02136 public final String GENRE = "genre";
02137 public final String DIRECTOR = "director";
02138 public final String ACTOR = "actor";
02139 public final String NUMEPISODES = "numepisodes";
02140 public final String NUMWATCHED = "numwatched";
02141 public final String PLAYCOUNT = "playcount";
02142 public final String PATH = "path";
02143 public final String STUDIO = "studio";
02144 public final String MPAARATING = "mpaarating";
02145 public final String DATEADDED = "dateadded";
02146 public final String LASTPLAYED = "lastplayed";
02147 public final String INPROGRESS = "inprogress";
02148 public final String TAG = "tag";
02149 public final String PLAYLIST = "playlist";
02150 public final String VIRTUALFOLDER = "virtualfolder";
02151
02152 public final static Set<String> values = new HashSet<String>(Arrays.asList(TITLE, PLOT, STATUS, VOTES, RATING, YEAR, GENRE, DIRECTOR, ACTOR, NUMEPISODES, NUMWATCHED, PLAYCOUNT, PATH, STUDIO, MPAARATING, DATEADDED, LASTPLAYED, INPROGRESS, TAG, PLAYLIST, VIRTUALFOLDER));
02153 }
02154 }
02155
02162 public static class SongFilter extends AbstractModel {
02163 public final static String API_TYPE = "List.Filter.Songs";
02164
02165
02166 public final And and;
02167 public final SongFilterRule filterRuleSongs;
02168 public final Or or;
02169
02173 public SongFilter(And and) {
02174 this.and = and;
02175 this.filterRuleSongs = null;
02176 this.or = null;
02177 }
02178
02182 public SongFilter(SongFilterRule filterRuleSongs) {
02183 this.filterRuleSongs = filterRuleSongs;
02184 this.and = null;
02185 this.or = null;
02186 }
02187
02191 public SongFilter(Or or) {
02192 this.or = or;
02193 this.and = null;
02194 this.filterRuleSongs = null;
02195 }
02196
02197 @Override
02198 public JsonNode toJsonNode() {
02199 if (and != null) {
02200 return and.toJsonNode();
02201 }
02202 if (filterRuleSongs != null) {
02203 return filterRuleSongs.toJsonNode();
02204 }
02205 if (or != null) {
02206 return or.toJsonNode();
02207 }
02208 return null;
02209 }
02210
02216 @Override
02217 public void writeToParcel(Parcel parcel, int flags) {
02218 parcel.writeValue(and);
02219 parcel.writeValue(filterRuleSongs);
02220 parcel.writeValue(or);
02221 }
02222
02226 protected SongFilter(Parcel parcel) {
02227 and = parcel.<And>readParcelable(And.class.getClassLoader());
02228 filterRuleSongs = parcel.<SongFilterRule>readParcelable(SongFilterRule.class.getClassLoader());
02229 or = parcel.<Or>readParcelable(Or.class.getClassLoader());
02230 }
02231
02235 public static final Parcelable.Creator<SongFilter> CREATOR = new Parcelable.Creator<SongFilter>() {
02236 @Override
02237 public SongFilter createFromParcel(Parcel parcel) {
02238 return new SongFilter(parcel);
02239 }
02240 @Override
02241 public SongFilter[] newArray(int n) {
02242 return new SongFilter[n];
02243 }
02244 };
02245
02246 @Override
02247 public int describeContents() {
02248 return 0;
02249 }
02250
02255 public static class And extends AbstractModel {
02256
02257
02258 public static final String AND = "and";
02259
02260
02261 public final List<SongFilter> and;
02262
02266 public And(List<SongFilter> and) {
02267 this.and = and;
02268 }
02269
02270 @Override
02271 public JsonNode toJsonNode() {
02272 final ObjectNode node = OM.createObjectNode();
02273 final ArrayNode andArray = OM.createArrayNode();
02274 for (SongFilter item : and) {
02275 andArray.add(item.toJsonNode());
02276 }
02277 node.put(AND, andArray);
02278 return node;
02279 }
02280
02286 @Override
02287 public void writeToParcel(Parcel parcel, int flags) {
02288 parcel.writeInt(and.size());
02289 for (SongFilter item : and) {
02290 parcel.writeParcelable(item, flags);
02291 }
02292 }
02293
02297 protected And(Parcel parcel) {
02298 final int andSize = parcel.readInt();
02299 and = new ArrayList<SongFilter>(andSize);
02300 for (int i = 0; i < andSize; i++) {
02301 and.add(parcel.<SongFilter>readParcelable(SongFilter.class.getClassLoader()));
02302 }
02303 }
02304
02308 public static final Parcelable.Creator<And> CREATOR = new Parcelable.Creator<And>() {
02309 @Override
02310 public And createFromParcel(Parcel parcel) {
02311 return new And(parcel);
02312 }
02313 @Override
02314 public And[] newArray(int n) {
02315 return new And[n];
02316 }
02317 };
02318
02319 @Override
02320 public int describeContents() {
02321 return 0;
02322 }
02323 }
02324
02329 public static class Or extends AbstractModel {
02330
02331
02332 public static final String OR = "or";
02333
02334
02335 public final List<SongFilter> or;
02336
02340 public Or(List<SongFilter> or) {
02341 this.or = or;
02342 }
02343
02344 @Override
02345 public JsonNode toJsonNode() {
02346 final ObjectNode node = OM.createObjectNode();
02347 final ArrayNode orArray = OM.createArrayNode();
02348 for (SongFilter item : or) {
02349 orArray.add(item.toJsonNode());
02350 }
02351 node.put(OR, orArray);
02352 return node;
02353 }
02354
02360 @Override
02361 public void writeToParcel(Parcel parcel, int flags) {
02362 parcel.writeInt(or.size());
02363 for (SongFilter item : or) {
02364 parcel.writeParcelable(item, flags);
02365 }
02366 }
02367
02371 protected Or(Parcel parcel) {
02372 final int orSize = parcel.readInt();
02373 or = new ArrayList<SongFilter>(orSize);
02374 for (int i = 0; i < orSize; i++) {
02375 or.add(parcel.<SongFilter>readParcelable(SongFilter.class.getClassLoader()));
02376 }
02377 }
02378
02382 public static final Parcelable.Creator<Or> CREATOR = new Parcelable.Creator<Or>() {
02383 @Override
02384 public Or createFromParcel(Parcel parcel) {
02385 return new Or(parcel);
02386 }
02387 @Override
02388 public Or[] newArray(int n) {
02389 return new Or[n];
02390 }
02391 };
02392
02393 @Override
02394 public int describeContents() {
02395 return 0;
02396 }
02397 }
02398 }
02399
02406 public static class TVShowFilter extends AbstractModel {
02407 public final static String API_TYPE = "List.Filter.TVShows";
02408
02409
02410 public final And and;
02411 public final TVShowFilterRule filterRuleTVShows;
02412 public final Or or;
02413
02417 public TVShowFilter(And and) {
02418 this.and = and;
02419 this.filterRuleTVShows = null;
02420 this.or = null;
02421 }
02422
02426 public TVShowFilter(TVShowFilterRule filterRuleTVShows) {
02427 this.filterRuleTVShows = filterRuleTVShows;
02428 this.and = null;
02429 this.or = null;
02430 }
02431
02435 public TVShowFilter(Or or) {
02436 this.or = or;
02437 this.and = null;
02438 this.filterRuleTVShows = null;
02439 }
02440
02441 @Override
02442 public JsonNode toJsonNode() {
02443 if (and != null) {
02444 return and.toJsonNode();
02445 }
02446 if (filterRuleTVShows != null) {
02447 return filterRuleTVShows.toJsonNode();
02448 }
02449 if (or != null) {
02450 return or.toJsonNode();
02451 }
02452 return null;
02453 }
02454
02460 @Override
02461 public void writeToParcel(Parcel parcel, int flags) {
02462 parcel.writeValue(and);
02463 parcel.writeValue(filterRuleTVShows);
02464 parcel.writeValue(or);
02465 }
02466
02470 protected TVShowFilter(Parcel parcel) {
02471 and = parcel.<And>readParcelable(And.class.getClassLoader());
02472 filterRuleTVShows = parcel.<TVShowFilterRule>readParcelable(TVShowFilterRule.class.getClassLoader());
02473 or = parcel.<Or>readParcelable(Or.class.getClassLoader());
02474 }
02475
02479 public static final Parcelable.Creator<TVShowFilter> CREATOR = new Parcelable.Creator<TVShowFilter>() {
02480 @Override
02481 public TVShowFilter createFromParcel(Parcel parcel) {
02482 return new TVShowFilter(parcel);
02483 }
02484 @Override
02485 public TVShowFilter[] newArray(int n) {
02486 return new TVShowFilter[n];
02487 }
02488 };
02489
02490 @Override
02491 public int describeContents() {
02492 return 0;
02493 }
02494
02499 public static class And extends AbstractModel {
02500
02501
02502 public static final String AND = "and";
02503
02504
02505 public final List<TVShowFilter> and;
02506
02510 public And(List<TVShowFilter> and) {
02511 this.and = and;
02512 }
02513
02514 @Override
02515 public JsonNode toJsonNode() {
02516 final ObjectNode node = OM.createObjectNode();
02517 final ArrayNode andArray = OM.createArrayNode();
02518 for (TVShowFilter item : and) {
02519 andArray.add(item.toJsonNode());
02520 }
02521 node.put(AND, andArray);
02522 return node;
02523 }
02524
02530 @Override
02531 public void writeToParcel(Parcel parcel, int flags) {
02532 parcel.writeInt(and.size());
02533 for (TVShowFilter item : and) {
02534 parcel.writeParcelable(item, flags);
02535 }
02536 }
02537
02541 protected And(Parcel parcel) {
02542 final int andSize = parcel.readInt();
02543 and = new ArrayList<TVShowFilter>(andSize);
02544 for (int i = 0; i < andSize; i++) {
02545 and.add(parcel.<TVShowFilter>readParcelable(TVShowFilter.class.getClassLoader()));
02546 }
02547 }
02548
02552 public static final Parcelable.Creator<And> CREATOR = new Parcelable.Creator<And>() {
02553 @Override
02554 public And createFromParcel(Parcel parcel) {
02555 return new And(parcel);
02556 }
02557 @Override
02558 public And[] newArray(int n) {
02559 return new And[n];
02560 }
02561 };
02562
02563 @Override
02564 public int describeContents() {
02565 return 0;
02566 }
02567 }
02568
02573 public static class Or extends AbstractModel {
02574
02575
02576 public static final String OR = "or";
02577
02578
02579 public final List<TVShowFilter> or;
02580
02584 public Or(List<TVShowFilter> or) {
02585 this.or = or;
02586 }
02587
02588 @Override
02589 public JsonNode toJsonNode() {
02590 final ObjectNode node = OM.createObjectNode();
02591 final ArrayNode orArray = OM.createArrayNode();
02592 for (TVShowFilter item : or) {
02593 orArray.add(item.toJsonNode());
02594 }
02595 node.put(OR, orArray);
02596 return node;
02597 }
02598
02604 @Override
02605 public void writeToParcel(Parcel parcel, int flags) {
02606 parcel.writeInt(or.size());
02607 for (TVShowFilter item : or) {
02608 parcel.writeParcelable(item, flags);
02609 }
02610 }
02611
02615 protected Or(Parcel parcel) {
02616 final int orSize = parcel.readInt();
02617 or = new ArrayList<TVShowFilter>(orSize);
02618 for (int i = 0; i < orSize; i++) {
02619 or.add(parcel.<TVShowFilter>readParcelable(TVShowFilter.class.getClassLoader()));
02620 }
02621 }
02622
02626 public static final Parcelable.Creator<Or> CREATOR = new Parcelable.Creator<Or>() {
02627 @Override
02628 public Or createFromParcel(Parcel parcel) {
02629 return new Or(parcel);
02630 }
02631 @Override
02632 public Or[] newArray(int n) {
02633 return new Or[n];
02634 }
02635 };
02636
02637 @Override
02638 public int describeContents() {
02639 return 0;
02640 }
02641 }
02642 }
02643
02650 public static class AllItems extends BaseItem {
02651 public final static String API_TYPE = "List.Item.All";
02652
02653
02654 public static final String CHANNEL = "channel";
02655 public static final String CHANNELNUMBER = "channelnumber";
02656 public static final String CHANNELTYPE = "channeltype";
02657 public static final String ENDTIME = "endtime";
02658 public static final String HIDDEN = "hidden";
02659 public static final String LOCKED = "locked";
02660 public static final String STARTTIME = "starttime";
02661
02662
02663 public final String channel;
02664 public final Integer channelnumber;
02665 public final String channeltype;
02666 public final String endtime;
02667 public final Boolean hidden;
02668 public final Boolean locked;
02669 public final String starttime;
02670
02675 public AllItems(JsonNode node) {
02676 super(node);
02677 channel = parseString(node, CHANNEL);
02678 channelnumber = parseInt(node, CHANNELNUMBER);
02679 channeltype = parseString(node, CHANNELTYPE);
02680 endtime = parseString(node, ENDTIME);
02681 hidden = parseBoolean(node, HIDDEN);
02682 locked = parseBoolean(node, LOCKED);
02683 starttime = parseString(node, STARTTIME);
02684 }
02685
02686 @Override
02687 public JsonNode toJsonNode() {
02688 final ObjectNode node = (ObjectNode)super.toJsonNode();
02689 node.put(CHANNEL, channel);
02690 node.put(CHANNELNUMBER, channelnumber);
02691 node.put(CHANNELTYPE, channeltype);
02692 node.put(ENDTIME, endtime);
02693 node.put(HIDDEN, hidden);
02694 node.put(LOCKED, locked);
02695 node.put(STARTTIME, starttime);
02696 return node;
02697 }
02698
02704 static List<AllItems> getListModelAllItemsList(JsonNode node, String key) {
02705 if (node.has(key)) {
02706 final ArrayNode a = (ArrayNode)node.get(key);
02707 final List<AllItems> l = new ArrayList<AllItems>(a.size());
02708 for (int i = 0; i < a.size(); i++) {
02709 l.add(new AllItems((JsonNode)a.get(i)));
02710 }
02711 return l;
02712 }
02713 return new ArrayList<AllItems>(0);
02714 }
02715
02721 @Override
02722 public void writeToParcel(Parcel parcel, int flags) {
02723 super.writeToParcel(parcel, flags);
02724 parcel.writeValue(channel);
02725 parcel.writeValue(channelnumber);
02726 parcel.writeValue(channeltype);
02727 parcel.writeValue(endtime);
02728 parcel.writeInt(hidden ? 1 : 0);
02729 parcel.writeInt(locked ? 1 : 0);
02730 parcel.writeValue(starttime);
02731 }
02732
02736 protected AllItems(Parcel parcel) {
02737 super(parcel);
02738 channel = parcel.readString();
02739 channelnumber = parcel.readInt();
02740 channeltype = parcel.readString();
02741 endtime = parcel.readString();
02742 hidden = parcel.readInt() == 1;
02743 locked = parcel.readInt() == 1;
02744 starttime = parcel.readString();
02745 }
02746
02750 public static final Parcelable.Creator<AllItems> CREATOR = new Parcelable.Creator<AllItems>() {
02751 @Override
02752 public AllItems createFromParcel(Parcel parcel) {
02753 return new AllItems(parcel);
02754 }
02755 @Override
02756 public AllItems[] newArray(int n) {
02757 return new AllItems[n];
02758 }
02759 };
02760
02761 @Override
02762 public int describeContents() {
02763 return 0;
02764 }
02765
02769 public interface Channeltype {
02770
02771 public final String TV = "tv";
02772 public final String RADIO = "radio";
02773
02774 public final static Set<String> values = new HashSet<String>(Arrays.asList(TV, RADIO));
02775 }
02776 }
02777
02784 public static class BaseItem extends AbstractModel {
02785 public final static String API_TYPE = "List.Item.Base";
02786
02787
02788 public static final String ALBUM = "album";
02789 public static final String ALBUMARTIST = "albumartist";
02790 public static final String ALBUMARTISTID = "albumartistid";
02791 public static final String ALBUMID = "albumid";
02792 public static final String ALBUMLABEL = "albumlabel";
02793 public static final String ART = "art";
02794 public static final String ARTIST = "artist";
02795 public static final String ARTISTID = "artistid";
02796 public static final String CAST = "cast";
02797 public static final String COMMENT = "comment";
02798 public static final String COUNTRY = "country";
02799 public static final String DATEADDED = "dateadded";
02800 public static final String DESCRIPTION = "description";
02801 public static final String DIRECTOR = "director";
02802 public static final String DISC = "disc";
02803 public static final String DISPLAYARTIST = "displayartist";
02804 public static final String DURATION = "duration";
02805 public static final String EPISODE = "episode";
02806 public static final String EPISODEGUIDE = "episodeguide";
02807 public static final String FANART = "fanart";
02808 public static final String FILE = "file";
02809 public static final String FIRSTAIRED = "firstaired";
02810 public static final String GENRE = "genre";
02811 public static final String GENREID = "genreid";
02812 public static final String ID = "id";
02813 public static final String IMDBNUMBER = "imdbnumber";
02814 public static final String LABEL = "label";
02815 public static final String LASTPLAYED = "lastplayed";
02816 public static final String LYRICS = "lyrics";
02817 public static final String MOOD = "mood";
02818 public static final String MPAA = "mpaa";
02819 public static final String MUSICBRAINZALBUMARTISTID = "musicbrainzalbumartistid";
02820 public static final String MUSICBRAINZALBUMID = "musicbrainzalbumid";
02821 public static final String MUSICBRAINZARTISTID = "musicbrainzartistid";
02822 public static final String MUSICBRAINZTRACKID = "musicbrainztrackid";
02823 public static final String ORIGINALTITLE = "originaltitle";
02824 public static final String PLAYCOUNT = "playcount";
02825 public static final String PLOT = "plot";
02826 public static final String PLOTOUTLINE = "plotoutline";
02827 public static final String PREMIERED = "premiered";
02828 public static final String PRODUCTIONCODE = "productioncode";
02829 public static final String RATING = "rating";
02830 public static final String RESUME = "resume";
02831 public static final String RUNTIME = "runtime";
02832 public static final String SEASON = "season";
02833 public static final String SET = "set";
02834 public static final String SETID = "setid";
02835 public static final String SHOWLINK = "showlink";
02836 public static final String SHOWTITLE = "showtitle";
02837 public static final String SORTTITLE = "sorttitle";
02838 public static final String STREAMDETAILS = "streamdetails";
02839 public static final String STUDIO = "studio";
02840 public static final String STYLE = "style";
02841 public static final String TAG = "tag";
02842 public static final String TAGLINE = "tagline";
02843 public static final String THEME = "theme";
02844 public static final String THUMBNAIL = "thumbnail";
02845 public static final String TITLE = "title";
02846 public static final String TOP250 = "top250";
02847 public static final String TRACK = "track";
02848 public static final String TRAILER = "trailer";
02849 public static final String TVSHOWID = "tvshowid";
02850 public static final String TYPE = "type";
02851 public static final String UNIQUEID = "uniqueid";
02852 public static final String VOTES = "votes";
02853 public static final String WATCHEDEPISODES = "watchedepisodes";
02854 public static final String WRITER = "writer";
02855 public static final String YEAR = "year";
02856
02857
02858 public final String album;
02859 public final List<String> albumartist;
02860 public final List<Integer> albumartistid;
02861 public final Integer albumid;
02862 public final String albumlabel;
02866 public final MediaModel.Artwork art;
02870 public final List<String> artist;
02874 public final List<Integer> artistid;
02875 public final List<VideoModel.Cast> cast;
02876 public final String comment;
02877 public final List<String> country;
02881 public final String dateadded;
02882 public final String description;
02886 public final List<String> director;
02887 public final Integer disc;
02891 public final String displayartist;
02892 public final Integer duration;
02893 public final Integer episode;
02894 public final String episodeguide;
02898 public final String fanart;
02902 public final String file;
02903 public final String firstaired;
02907 public final List<String> genre;
02911 public final List<Integer> genreid;
02912 public final Integer id;
02913 public final String imdbnumber;
02917 public final String label;
02921 public final String lastplayed;
02922 public final String lyrics;
02923 public final List<String> mood;
02924 public final String mpaa;
02928 public final String musicbrainzalbumartistid;
02932 public final String musicbrainzalbumid;
02933 public final String musicbrainzartistid;
02934 public final String musicbrainztrackid;
02935 public final String originaltitle;
02939 public final Integer playcount;
02943 public final String plot;
02944 public final String plotoutline;
02945 public final String premiered;
02946 public final String productioncode;
02950 public final Integer rating;
02954 public final VideoModel.Resume resume;
02958 public final Integer runtime;
02959 public final Integer season;
02960 public final String set;
02961 public final Integer setid;
02962 public final List<String> showlink;
02963 public final String showtitle;
02964 public final String sorttitle;
02968 public final VideoModel.Streams streamdetails;
02969 public final List<String> studio;
02970 public final List<String> style;
02971 public final List<String> tag;
02972 public final String tagline;
02973 public final List<String> theme;
02977 public final String thumbnail;
02981 public final String title;
02982 public final Integer top250;
02983 public final Integer track;
02984 public final String trailer;
02985 public final Integer tvshowid;
02986 public final String type;
02987 public final HashMap<String, String> uniqueid;
02988 public final String votes;
02989 public final Integer watchedepisodes;
02990 public final List<String> writer;
02994 public final Integer year;
02995
03066 public BaseItem(String album, List<String> albumartist, List<Integer> albumartistid, Integer albumid, String albumlabel, MediaModel.Artwork art, List<String> artist, List<Integer> artistid, List<VideoModel.Cast> cast, String comment, List<String> country, String dateadded, String description, List<String> director, Integer disc, String displayartist, Integer duration, Integer episode, String episodeguide, String fanart, String file, String firstaired, List<String> genre, List<Integer> genreid, Integer id, String imdbnumber, String label, String lastplayed, String lyrics, List<String> mood, String mpaa, String musicbrainzalbumartistid, String musicbrainzalbumid, String musicbrainzartistid, String musicbrainztrackid, String originaltitle, Integer playcount, String plot, String plotoutline, String premiered, String productioncode, Integer rating, VideoModel.Resume resume, Integer runtime, Integer season, String set, Integer setid, List<String> showlink, String showtitle, String sorttitle, VideoModel.Streams streamdetails, List<String> studio, List<String> style, List<String> tag, String tagline, List<String> theme, String thumbnail, String title, Integer top250, Integer track, String trailer, Integer tvshowid, String type, HashMap<String, String> uniqueid, String votes, Integer watchedepisodes, List<String> writer, Integer year) {
03067 this.album = album;
03068 this.albumartist = albumartist;
03069 this.albumartistid = albumartistid;
03070 this.albumid = albumid;
03071 this.albumlabel = albumlabel;
03072 this.art = art;
03073 this.artist = artist;
03074 this.artistid = artistid;
03075 this.cast = cast;
03076 this.comment = comment;
03077 this.country = country;
03078 this.dateadded = dateadded;
03079 this.description = description;
03080 this.director = director;
03081 this.disc = disc;
03082 this.displayartist = displayartist;
03083 this.duration = duration;
03084 this.episode = episode;
03085 this.episodeguide = episodeguide;
03086 this.fanart = fanart;
03087 this.file = file;
03088 this.firstaired = firstaired;
03089 this.genre = genre;
03090 this.genreid = genreid;
03091 this.id = id;
03092 this.imdbnumber = imdbnumber;
03093 this.label = label;
03094 this.lastplayed = lastplayed;
03095 this.lyrics = lyrics;
03096 this.mood = mood;
03097 this.mpaa = mpaa;
03098 this.musicbrainzalbumartistid = musicbrainzalbumartistid;
03099 this.musicbrainzalbumid = musicbrainzalbumid;
03100 this.musicbrainzartistid = musicbrainzartistid;
03101 this.musicbrainztrackid = musicbrainztrackid;
03102 this.originaltitle = originaltitle;
03103 this.playcount = playcount;
03104 this.plot = plot;
03105 this.plotoutline = plotoutline;
03106 this.premiered = premiered;
03107 this.productioncode = productioncode;
03108 this.rating = rating;
03109 this.resume = resume;
03110 this.runtime = runtime;
03111 this.season = season;
03112 this.set = set;
03113 this.setid = setid;
03114 this.showlink = showlink;
03115 this.showtitle = showtitle;
03116 this.sorttitle = sorttitle;
03117 this.streamdetails = streamdetails;
03118 this.studio = studio;
03119 this.style = style;
03120 this.tag = tag;
03121 this.tagline = tagline;
03122 this.theme = theme;
03123 this.thumbnail = thumbnail;
03124 this.title = title;
03125 this.top250 = top250;
03126 this.track = track;
03127 this.trailer = trailer;
03128 this.tvshowid = tvshowid;
03129 this.type = type;
03130 this.uniqueid = uniqueid;
03131 this.votes = votes;
03132 this.watchedepisodes = watchedepisodes;
03133 this.writer = writer;
03134 this.year = year;
03135 }
03136
03141 public BaseItem(JsonNode node) {
03142 album = parseString(node, ALBUM);
03143 albumartist = getStringArray(node, ALBUMARTIST);
03144 albumartistid = getIntegerArray(node, ALBUMARTISTID);
03145 albumid = parseInt(node, ALBUMID);
03146 albumlabel = parseString(node, ALBUMLABEL);
03147 art = node.has(ART) ? new MediaModel.Artwork(node.get(ART)) : null;
03148 artist = getStringArray(node, ARTIST);
03149 artistid = getIntegerArray(node, ARTISTID);
03150 cast = VideoModel.Cast.getVideoModelCastList(node, CAST);
03151 comment = parseString(node, COMMENT);
03152 country = getStringArray(node, COUNTRY);
03153 dateadded = parseString(node, DATEADDED);
03154 description = parseString(node, DESCRIPTION);
03155 director = getStringArray(node, DIRECTOR);
03156 disc = parseInt(node, DISC);
03157 displayartist = parseString(node, DISPLAYARTIST);
03158 duration = parseInt(node, DURATION);
03159 episode = parseInt(node, EPISODE);
03160 episodeguide = parseString(node, EPISODEGUIDE);
03161 fanart = parseString(node, FANART);
03162 file = parseString(node, FILE);
03163 firstaired = parseString(node, FIRSTAIRED);
03164 genre = getStringArray(node, GENRE);
03165 genreid = getIntegerArray(node, GENREID);
03166 id = parseInt(node, ID);
03167 imdbnumber = parseString(node, IMDBNUMBER);
03168 label = node.get(LABEL).getTextValue();
03169 lastplayed = parseString(node, LASTPLAYED);
03170 lyrics = parseString(node, LYRICS);
03171 mood = getStringArray(node, MOOD);
03172 mpaa = parseString(node, MPAA);
03173 musicbrainzalbumartistid = parseString(node, MUSICBRAINZALBUMARTISTID);
03174 musicbrainzalbumid = parseString(node, MUSICBRAINZALBUMID);
03175 musicbrainzartistid = parseString(node, MUSICBRAINZARTISTID);
03176 musicbrainztrackid = parseString(node, MUSICBRAINZTRACKID);
03177 originaltitle = parseString(node, ORIGINALTITLE);
03178 playcount = parseInt(node, PLAYCOUNT);
03179 plot = parseString(node, PLOT);
03180 plotoutline = parseString(node, PLOTOUTLINE);
03181 premiered = parseString(node, PREMIERED);
03182 productioncode = parseString(node, PRODUCTIONCODE);
03183 rating = parseInt(node, RATING);
03184 resume = node.has(RESUME) ? new VideoModel.Resume(node.get(RESUME)) : null;
03185 runtime = parseInt(node, RUNTIME);
03186 season = parseInt(node, SEASON);
03187 set = parseString(node, SET);
03188 setid = parseInt(node, SETID);
03189 showlink = getStringArray(node, SHOWLINK);
03190 showtitle = parseString(node, SHOWTITLE);
03191 sorttitle = parseString(node, SORTTITLE);
03192 streamdetails = node.has(STREAMDETAILS) ? new VideoModel.Streams(node.get(STREAMDETAILS)) : null;
03193 studio = getStringArray(node, STUDIO);
03194 style = getStringArray(node, STYLE);
03195 tag = getStringArray(node, TAG);
03196 tagline = parseString(node, TAGLINE);
03197 theme = getStringArray(node, THEME);
03198 thumbnail = parseString(node, THUMBNAIL);
03199 title = parseString(node, TITLE);
03200 top250 = parseInt(node, TOP250);
03201 track = parseInt(node, TRACK);
03202 trailer = parseString(node, TRAILER);
03203 tvshowid = parseInt(node, TVSHOWID);
03204 type = parseString(node, TYPE);
03205 uniqueid = getStringMap(node, UNIQUEID);
03206 votes = parseString(node, VOTES);
03207 watchedepisodes = parseInt(node, WATCHEDEPISODES);
03208 writer = getStringArray(node, WRITER);
03209 year = parseInt(node, YEAR);
03210 }
03211
03212 @Override
03213 public JsonNode toJsonNode() {
03214 final ObjectNode node = OM.createObjectNode();
03215 node.put(ALBUM, album);
03216 final ArrayNode albumartistArray = OM.createArrayNode();
03217 for (String item : albumartist) {
03218 albumartistArray.add(item);
03219 }
03220 node.put(ALBUMARTIST, albumartistArray);
03221 final ArrayNode albumartistidArray = OM.createArrayNode();
03222 for (Integer item : albumartistid) {
03223 albumartistidArray.add(item);
03224 }
03225 node.put(ALBUMARTISTID, albumartistidArray);
03226 node.put(ALBUMID, albumid);
03227 node.put(ALBUMLABEL, albumlabel);
03228 node.put(ART, art.toJsonNode());
03229 final ArrayNode artistArray = OM.createArrayNode();
03230 for (String item : artist) {
03231 artistArray.add(item);
03232 }
03233 node.put(ARTIST, artistArray);
03234 final ArrayNode artistidArray = OM.createArrayNode();
03235 for (Integer item : artistid) {
03236 artistidArray.add(item);
03237 }
03238 node.put(ARTISTID, artistidArray);
03239 final ArrayNode castArray = OM.createArrayNode();
03240 for (VideoModel.Cast item : cast) {
03241 castArray.add(item.toJsonNode());
03242 }
03243 node.put(CAST, castArray);
03244 node.put(COMMENT, comment);
03245 final ArrayNode countryArray = OM.createArrayNode();
03246 for (String item : country) {
03247 countryArray.add(item);
03248 }
03249 node.put(COUNTRY, countryArray);
03250 node.put(DATEADDED, dateadded);
03251 node.put(DESCRIPTION, description);
03252 final ArrayNode directorArray = OM.createArrayNode();
03253 for (String item : director) {
03254 directorArray.add(item);
03255 }
03256 node.put(DIRECTOR, directorArray);
03257 node.put(DISC, disc);
03258 node.put(DISPLAYARTIST, displayartist);
03259 node.put(DURATION, duration);
03260 node.put(EPISODE, episode);
03261 node.put(EPISODEGUIDE, episodeguide);
03262 node.put(FANART, fanart);
03263 node.put(FILE, file);
03264 node.put(FIRSTAIRED, firstaired);
03265 final ArrayNode genreArray = OM.createArrayNode();
03266 for (String item : genre) {
03267 genreArray.add(item);
03268 }
03269 node.put(GENRE, genreArray);
03270 final ArrayNode genreidArray = OM.createArrayNode();
03271 for (Integer item : genreid) {
03272 genreidArray.add(item);
03273 }
03274 node.put(GENREID, genreidArray);
03275 node.put(ID, id);
03276 node.put(IMDBNUMBER, imdbnumber);
03277 node.put(LABEL, label);
03278 node.put(LASTPLAYED, lastplayed);
03279 node.put(LYRICS, lyrics);
03280 final ArrayNode moodArray = OM.createArrayNode();
03281 for (String item : mood) {
03282 moodArray.add(item);
03283 }
03284 node.put(MOOD, moodArray);
03285 node.put(MPAA, mpaa);
03286 node.put(MUSICBRAINZALBUMARTISTID, musicbrainzalbumartistid);
03287 node.put(MUSICBRAINZALBUMID, musicbrainzalbumid);
03288 node.put(MUSICBRAINZARTISTID, musicbrainzartistid);
03289 node.put(MUSICBRAINZTRACKID, musicbrainztrackid);
03290 node.put(ORIGINALTITLE, originaltitle);
03291 node.put(PLAYCOUNT, playcount);
03292 node.put(PLOT, plot);
03293 node.put(PLOTOUTLINE, plotoutline);
03294 node.put(PREMIERED, premiered);
03295 node.put(PRODUCTIONCODE, productioncode);
03296 node.put(RATING, rating);
03297 node.put(RESUME, resume.toJsonNode());
03298 node.put(RUNTIME, runtime);
03299 node.put(SEASON, season);
03300 node.put(SET, set);
03301 node.put(SETID, setid);
03302 final ArrayNode showlinkArray = OM.createArrayNode();
03303 for (String item : showlink) {
03304 showlinkArray.add(item);
03305 }
03306 node.put(SHOWLINK, showlinkArray);
03307 node.put(SHOWTITLE, showtitle);
03308 node.put(SORTTITLE, sorttitle);
03309 node.put(STREAMDETAILS, streamdetails.toJsonNode());
03310 final ArrayNode studioArray = OM.createArrayNode();
03311 for (String item : studio) {
03312 studioArray.add(item);
03313 }
03314 node.put(STUDIO, studioArray);
03315 final ArrayNode styleArray = OM.createArrayNode();
03316 for (String item : style) {
03317 styleArray.add(item);
03318 }
03319 node.put(STYLE, styleArray);
03320 final ArrayNode tagArray = OM.createArrayNode();
03321 for (String item : tag) {
03322 tagArray.add(item);
03323 }
03324 node.put(TAG, tagArray);
03325 node.put(TAGLINE, tagline);
03326 final ArrayNode themeArray = OM.createArrayNode();
03327 for (String item : theme) {
03328 themeArray.add(item);
03329 }
03330 node.put(THEME, themeArray);
03331 node.put(THUMBNAIL, thumbnail);
03332 node.put(TITLE, title);
03333 node.put(TOP250, top250);
03334 node.put(TRACK, track);
03335 node.put(TRAILER, trailer);
03336 node.put(TVSHOWID, tvshowid);
03337 node.put(TYPE, type);
03338 final ObjectNode uniqueidMap = OM.createObjectNode();
03339 for (String key : uniqueid.values()) {
03340 uniqueidMap.put(key, uniqueid.get(key));
03341 }
03342 node.put(UNIQUEID, uniqueidMap);
03343 node.put(VOTES, votes);
03344 node.put(WATCHEDEPISODES, watchedepisodes);
03345 final ArrayNode writerArray = OM.createArrayNode();
03346 for (String item : writer) {
03347 writerArray.add(item);
03348 }
03349 node.put(WRITER, writerArray);
03350 node.put(YEAR, year);
03351 return node;
03352 }
03353
03359 static List<BaseItem> getListModelBaseItemList(JsonNode node, String key) {
03360 if (node.has(key)) {
03361 final ArrayNode a = (ArrayNode)node.get(key);
03362 final List<BaseItem> l = new ArrayList<BaseItem>(a.size());
03363 for (int i = 0; i < a.size(); i++) {
03364 l.add(new BaseItem((JsonNode)a.get(i)));
03365 }
03366 return l;
03367 }
03368 return new ArrayList<BaseItem>(0);
03369 }
03370
03376 @Override
03377 public void writeToParcel(Parcel parcel, int flags) {
03378 parcel.writeValue(album);
03379 parcel.writeInt(albumartist.size());
03380 for (String item : albumartist) {
03381 parcel.writeValue(item);
03382 }
03383 parcel.writeInt(albumartistid.size());
03384 for (Integer item : albumartistid) {
03385 parcel.writeValue(item);
03386 }
03387 parcel.writeValue(albumid);
03388 parcel.writeValue(albumlabel);
03389 parcel.writeValue(art);
03390 parcel.writeInt(artist.size());
03391 for (String item : artist) {
03392 parcel.writeValue(item);
03393 }
03394 parcel.writeInt(artistid.size());
03395 for (Integer item : artistid) {
03396 parcel.writeValue(item);
03397 }
03398 parcel.writeInt(cast.size());
03399 for (VideoModel.Cast item : cast) {
03400 parcel.writeParcelable(item, flags);
03401 }
03402 parcel.writeValue(comment);
03403 parcel.writeInt(country.size());
03404 for (String item : country) {
03405 parcel.writeValue(item);
03406 }
03407 parcel.writeValue(dateadded);
03408 parcel.writeValue(description);
03409 parcel.writeInt(director.size());
03410 for (String item : director) {
03411 parcel.writeValue(item);
03412 }
03413 parcel.writeValue(disc);
03414 parcel.writeValue(displayartist);
03415 parcel.writeValue(duration);
03416 parcel.writeValue(episode);
03417 parcel.writeValue(episodeguide);
03418 parcel.writeValue(fanart);
03419 parcel.writeValue(file);
03420 parcel.writeValue(firstaired);
03421 parcel.writeInt(genre.size());
03422 for (String item : genre) {
03423 parcel.writeValue(item);
03424 }
03425 parcel.writeInt(genreid.size());
03426 for (Integer item : genreid) {
03427 parcel.writeValue(item);
03428 }
03429 parcel.writeValue(id);
03430 parcel.writeValue(imdbnumber);
03431 parcel.writeValue(label);
03432 parcel.writeValue(lastplayed);
03433 parcel.writeValue(lyrics);
03434 parcel.writeInt(mood.size());
03435 for (String item : mood) {
03436 parcel.writeValue(item);
03437 }
03438 parcel.writeValue(mpaa);
03439 parcel.writeValue(musicbrainzalbumartistid);
03440 parcel.writeValue(musicbrainzalbumid);
03441 parcel.writeValue(musicbrainzartistid);
03442 parcel.writeValue(musicbrainztrackid);
03443 parcel.writeValue(originaltitle);
03444 parcel.writeValue(playcount);
03445 parcel.writeValue(plot);
03446 parcel.writeValue(plotoutline);
03447 parcel.writeValue(premiered);
03448 parcel.writeValue(productioncode);
03449 parcel.writeValue(rating);
03450 parcel.writeValue(resume);
03451 parcel.writeValue(runtime);
03452 parcel.writeValue(season);
03453 parcel.writeValue(set);
03454 parcel.writeValue(setid);
03455 parcel.writeInt(showlink.size());
03456 for (String item : showlink) {
03457 parcel.writeValue(item);
03458 }
03459 parcel.writeValue(showtitle);
03460 parcel.writeValue(sorttitle);
03461 parcel.writeValue(streamdetails);
03462 parcel.writeInt(studio.size());
03463 for (String item : studio) {
03464 parcel.writeValue(item);
03465 }
03466 parcel.writeInt(style.size());
03467 for (String item : style) {
03468 parcel.writeValue(item);
03469 }
03470 parcel.writeInt(tag.size());
03471 for (String item : tag) {
03472 parcel.writeValue(item);
03473 }
03474 parcel.writeValue(tagline);
03475 parcel.writeInt(theme.size());
03476 for (String item : theme) {
03477 parcel.writeValue(item);
03478 }
03479 parcel.writeValue(thumbnail);
03480 parcel.writeValue(title);
03481 parcel.writeValue(top250);
03482 parcel.writeValue(track);
03483 parcel.writeValue(trailer);
03484 parcel.writeValue(tvshowid);
03485 parcel.writeValue(type);
03486 parcel.writeInt(uniqueid.size());
03487 for (String key : uniqueid.values()) {
03488 parcel.writeValue(key);
03489 parcel.writeValue(uniqueid.get(key));
03490 }
03491 parcel.writeValue(votes);
03492 parcel.writeValue(watchedepisodes);
03493 parcel.writeInt(writer.size());
03494 for (String item : writer) {
03495 parcel.writeValue(item);
03496 }
03497 parcel.writeValue(year);
03498 }
03499
03503 protected BaseItem(Parcel parcel) {
03504 album = parcel.readString();
03505 final int albumartistSize = parcel.readInt();
03506 albumartist = new ArrayList<String>(albumartistSize);
03507 for (int i = 0; i < albumartistSize; i++) {
03508 albumartist.add(parcel.readString());
03509 }
03510 final int albumartistidSize = parcel.readInt();
03511 albumartistid = new ArrayList<Integer>(albumartistidSize);
03512 for (int i = 0; i < albumartistidSize; i++) {
03513 albumartistid.add(parcel.readInt());
03514 }
03515 albumid = parcel.readInt();
03516 albumlabel = parcel.readString();
03517 art = parcel.<MediaModel.Artwork>readParcelable(MediaModel.Artwork.class.getClassLoader());
03518 final int artistSize = parcel.readInt();
03519 artist = new ArrayList<String>(artistSize);
03520 for (int i = 0; i < artistSize; i++) {
03521 artist.add(parcel.readString());
03522 }
03523 final int artistidSize = parcel.readInt();
03524 artistid = new ArrayList<Integer>(artistidSize);
03525 for (int i = 0; i < artistidSize; i++) {
03526 artistid.add(parcel.readInt());
03527 }
03528 final int castSize = parcel.readInt();
03529 cast = new ArrayList<VideoModel.Cast>(castSize);
03530 for (int i = 0; i < castSize; i++) {
03531 cast.add(parcel.<VideoModel.Cast>readParcelable(VideoModel.Cast.class.getClassLoader()));
03532 }
03533 comment = parcel.readString();
03534 final int countrySize = parcel.readInt();
03535 country = new ArrayList<String>(countrySize);
03536 for (int i = 0; i < countrySize; i++) {
03537 country.add(parcel.readString());
03538 }
03539 dateadded = parcel.readString();
03540 description = parcel.readString();
03541 final int directorSize = parcel.readInt();
03542 director = new ArrayList<String>(directorSize);
03543 for (int i = 0; i < directorSize; i++) {
03544 director.add(parcel.readString());
03545 }
03546 disc = parcel.readInt();
03547 displayartist = parcel.readString();
03548 duration = parcel.readInt();
03549 episode = parcel.readInt();
03550 episodeguide = parcel.readString();
03551 fanart = parcel.readString();
03552 file = parcel.readString();
03553 firstaired = parcel.readString();
03554 final int genreSize = parcel.readInt();
03555 genre = new ArrayList<String>(genreSize);
03556 for (int i = 0; i < genreSize; i++) {
03557 genre.add(parcel.readString());
03558 }
03559 final int genreidSize = parcel.readInt();
03560 genreid = new ArrayList<Integer>(genreidSize);
03561 for (int i = 0; i < genreidSize; i++) {
03562 genreid.add(parcel.readInt());
03563 }
03564 id = parcel.readInt();
03565 imdbnumber = parcel.readString();
03566 label = parcel.readString();
03567 lastplayed = parcel.readString();
03568 lyrics = parcel.readString();
03569 final int moodSize = parcel.readInt();
03570 mood = new ArrayList<String>(moodSize);
03571 for (int i = 0; i < moodSize; i++) {
03572 mood.add(parcel.readString());
03573 }
03574 mpaa = parcel.readString();
03575 musicbrainzalbumartistid = parcel.readString();
03576 musicbrainzalbumid = parcel.readString();
03577 musicbrainzartistid = parcel.readString();
03578 musicbrainztrackid = parcel.readString();
03579 originaltitle = parcel.readString();
03580 playcount = parcel.readInt();
03581 plot = parcel.readString();
03582 plotoutline = parcel.readString();
03583 premiered = parcel.readString();
03584 productioncode = parcel.readString();
03585 rating = parcel.readInt();
03586 resume = parcel.<VideoModel.Resume>readParcelable(VideoModel.Resume.class.getClassLoader());
03587 runtime = parcel.readInt();
03588 season = parcel.readInt();
03589 set = parcel.readString();
03590 setid = parcel.readInt();
03591 final int showlinkSize = parcel.readInt();
03592 showlink = new ArrayList<String>(showlinkSize);
03593 for (int i = 0; i < showlinkSize; i++) {
03594 showlink.add(parcel.readString());
03595 }
03596 showtitle = parcel.readString();
03597 sorttitle = parcel.readString();
03598 streamdetails = parcel.<VideoModel.Streams>readParcelable(VideoModel.Streams.class.getClassLoader());
03599 final int studioSize = parcel.readInt();
03600 studio = new ArrayList<String>(studioSize);
03601 for (int i = 0; i < studioSize; i++) {
03602 studio.add(parcel.readString());
03603 }
03604 final int styleSize = parcel.readInt();
03605 style = new ArrayList<String>(styleSize);
03606 for (int i = 0; i < styleSize; i++) {
03607 style.add(parcel.readString());
03608 }
03609 final int tagSize = parcel.readInt();
03610 tag = new ArrayList<String>(tagSize);
03611 for (int i = 0; i < tagSize; i++) {
03612 tag.add(parcel.readString());
03613 }
03614 tagline = parcel.readString();
03615 final int themeSize = parcel.readInt();
03616 theme = new ArrayList<String>(themeSize);
03617 for (int i = 0; i < themeSize; i++) {
03618 theme.add(parcel.readString());
03619 }
03620 thumbnail = parcel.readString();
03621 title = parcel.readString();
03622 top250 = parcel.readInt();
03623 track = parcel.readInt();
03624 trailer = parcel.readString();
03625 tvshowid = parcel.readInt();
03626 type = parcel.readString();
03627 final int uniqueidSize = parcel.readInt();
03628 uniqueid = new HashMap<String, String>();
03629 for (int i = 0; i < uniqueidSize; i++) {
03630 uniqueid.put(parcel.readString(), parcel.readString());
03631 }
03632 votes = parcel.readString();
03633 watchedepisodes = parcel.readInt();
03634 final int writerSize = parcel.readInt();
03635 writer = new ArrayList<String>(writerSize);
03636 for (int i = 0; i < writerSize; i++) {
03637 writer.add(parcel.readString());
03638 }
03639 year = parcel.readInt();
03640 }
03641
03645 public static final Parcelable.Creator<BaseItem> CREATOR = new Parcelable.Creator<BaseItem>() {
03646 @Override
03647 public BaseItem createFromParcel(Parcel parcel) {
03648 return new BaseItem(parcel);
03649 }
03650 @Override
03651 public BaseItem[] newArray(int n) {
03652 return new BaseItem[n];
03653 }
03654 };
03655
03656 @Override
03657 public int describeContents() {
03658 return 0;
03659 }
03660
03664 public interface Type {
03665
03666 public final String UNKNOWN = "unknown";
03667 public final String MOVIE = "movie";
03668 public final String EPISODE = "episode";
03669 public final String MUSICVIDEO = "musicvideo";
03670 public final String SONG = "song";
03671 public final String PICTURE = "picture";
03672 public final String CHANNEL = "channel";
03673
03674 public final static Set<String> values = new HashSet<String>(Arrays.asList(UNKNOWN, MOVIE, EPISODE, MUSICVIDEO, SONG, PICTURE, CHANNEL));
03675 }
03676 }
03677
03684 public static class FileItem extends BaseItem {
03685 public final static String API_TYPE = "List.Item.File";
03686
03687
03688 public static final String FILE = "file";
03689 public static final String FILETYPE = "filetype";
03690 public static final String LASTMODIFIED = "lastmodified";
03691 public static final String MIMETYPE = "mimetype";
03692 public static final String SIZE = "size";
03693
03694
03695 public final String file;
03696 public final String filetype;
03697 public final String lastmodified;
03698 public final String mimetype;
03699 public final Integer size;
03700
03705 public FileItem(JsonNode node) {
03706 super(node);
03707 file = node.get(FILE).getTextValue();
03708 filetype = parseString(node, FILETYPE);
03709 lastmodified = parseString(node, LASTMODIFIED);
03710 mimetype = parseString(node, MIMETYPE);
03711 size = parseInt(node, SIZE);
03712 }
03713
03714 @Override
03715 public JsonNode toJsonNode() {
03716 final ObjectNode node = (ObjectNode)super.toJsonNode();
03717 node.put(FILE, file);
03718 node.put(FILETYPE, filetype);
03719 node.put(LASTMODIFIED, lastmodified);
03720 node.put(MIMETYPE, mimetype);
03721 node.put(SIZE, size);
03722 return node;
03723 }
03724
03730 static List<FileItem> getListModelFileItemList(JsonNode node, String key) {
03731 if (node.has(key)) {
03732 final ArrayNode a = (ArrayNode)node.get(key);
03733 final List<FileItem> l = new ArrayList<FileItem>(a.size());
03734 for (int i = 0; i < a.size(); i++) {
03735 l.add(new FileItem((JsonNode)a.get(i)));
03736 }
03737 return l;
03738 }
03739 return new ArrayList<FileItem>(0);
03740 }
03741
03747 @Override
03748 public void writeToParcel(Parcel parcel, int flags) {
03749 super.writeToParcel(parcel, flags);
03750 parcel.writeValue(file);
03751 parcel.writeValue(filetype);
03752 parcel.writeValue(lastmodified);
03753 parcel.writeValue(mimetype);
03754 parcel.writeValue(size);
03755 }
03756
03760 protected FileItem(Parcel parcel) {
03761 super(parcel);
03762 file = parcel.readString();
03763 filetype = parcel.readString();
03764 lastmodified = parcel.readString();
03765 mimetype = parcel.readString();
03766 size = parcel.readInt();
03767 }
03768
03772 public static final Parcelable.Creator<FileItem> CREATOR = new Parcelable.Creator<FileItem>() {
03773 @Override
03774 public FileItem createFromParcel(Parcel parcel) {
03775 return new FileItem(parcel);
03776 }
03777 @Override
03778 public FileItem[] newArray(int n) {
03779 return new FileItem[n];
03780 }
03781 };
03782
03783 @Override
03784 public int describeContents() {
03785 return 0;
03786 }
03787
03791 public interface Filetype {
03792
03793 public final String FILE = "file";
03794 public final String DIRECTORY = "directory";
03795
03796 public final static Set<String> values = new HashSet<String>(Arrays.asList(FILE, DIRECTORY));
03797 }
03798 }
03799
03806 public static class SourceItem extends ItemModel.BaseDetail {
03807
03808
03809 public static final String FILE = "file";
03810
03811
03812 public final String file;
03813
03818 public SourceItem(JsonNode node) {
03819 super(node);
03820 file = node.get(FILE).getTextValue();
03821 }
03822
03823 @Override
03824 public JsonNode toJsonNode() {
03825 final ObjectNode node = (ObjectNode)super.toJsonNode();
03826 node.put(FILE, file);
03827 return node;
03828 }
03829
03835 static List<SourceItem> getListModelSourceItemList(JsonNode node, String key) {
03836 if (node.has(key)) {
03837 final ArrayNode a = (ArrayNode)node.get(key);
03838 final List<SourceItem> l = new ArrayList<SourceItem>(a.size());
03839 for (int i = 0; i < a.size(); i++) {
03840 l.add(new SourceItem((JsonNode)a.get(i)));
03841 }
03842 return l;
03843 }
03844 return new ArrayList<SourceItem>(0);
03845 }
03846
03852 @Override
03853 public void writeToParcel(Parcel parcel, int flags) {
03854 super.writeToParcel(parcel, flags);
03855 parcel.writeValue(file);
03856 }
03857
03861 protected SourceItem(Parcel parcel) {
03862 super(parcel);
03863 file = parcel.readString();
03864 }
03865
03869 public static final Parcelable.Creator<SourceItem> CREATOR = new Parcelable.Creator<SourceItem>() {
03870 @Override
03871 public SourceItem createFromParcel(Parcel parcel) {
03872 return new SourceItem(parcel);
03873 }
03874 @Override
03875 public SourceItem[] newArray(int n) {
03876 return new SourceItem[n];
03877 }
03878 };
03879
03880 @Override
03881 public int describeContents() {
03882 return 0;
03883 }
03884 }
03885
03894 public static class Limits extends AbstractModel {
03895 public final static String API_TYPE = "List.Limits";
03896
03897
03898 public static final String END = "end";
03899 public static final String START = "start";
03900
03901
03902 public final Integer end;
03903 public final Integer start;
03904
03910 public Limits(Integer end, Integer start) {
03911 this.end = end;
03912 this.start = start;
03913 }
03914
03915 @Override
03916 public JsonNode toJsonNode() {
03917 final ObjectNode node = OM.createObjectNode();
03918 node.put(END, end);
03919 node.put(START, start);
03920 return node;
03921 }
03922
03928 @Override
03929 public void writeToParcel(Parcel parcel, int flags) {
03930 parcel.writeValue(end);
03931 parcel.writeValue(start);
03932 }
03933
03937 protected Limits(Parcel parcel) {
03938 end = parcel.readInt();
03939 start = parcel.readInt();
03940 }
03941
03945 public static final Parcelable.Creator<Limits> CREATOR = new Parcelable.Creator<Limits>() {
03946 @Override
03947 public Limits createFromParcel(Parcel parcel) {
03948 return new Limits(parcel);
03949 }
03950 @Override
03951 public Limits[] newArray(int n) {
03952 return new Limits[n];
03953 }
03954 };
03955
03956 @Override
03957 public int describeContents() {
03958 return 0;
03959 }
03960 }
03961
03968 public static class LimitsReturned extends AbstractModel {
03969 public final static String API_TYPE = "List.LimitsReturned";
03970
03971
03972 public static final String END = "end";
03973 public static final String START = "start";
03974 public static final String TOTAL = "total";
03975
03976
03977 public final Integer end;
03978 public final Integer start;
03979 public final Integer total;
03980
03986 public LimitsReturned(Integer end, Integer start, Integer total) {
03987 this.end = end;
03988 this.start = start;
03989 this.total = total;
03990 }
03991
03996 public LimitsReturned(JsonNode node) {
03997 end = parseInt(node, END);
03998 start = parseInt(node, START);
03999 total = node.get(TOTAL).getIntValue();
04000 }
04001
04002 @Override
04003 public JsonNode toJsonNode() {
04004 final ObjectNode node = OM.createObjectNode();
04005 node.put(END, end);
04006 node.put(START, start);
04007 node.put(TOTAL, total);
04008 return node;
04009 }
04010
04016 static List<LimitsReturned> getListModelLimitsReturnedList(JsonNode node, String key) {
04017 if (node.has(key)) {
04018 final ArrayNode a = (ArrayNode)node.get(key);
04019 final List<LimitsReturned> l = new ArrayList<LimitsReturned>(a.size());
04020 for (int i = 0; i < a.size(); i++) {
04021 l.add(new LimitsReturned((JsonNode)a.get(i)));
04022 }
04023 return l;
04024 }
04025 return new ArrayList<LimitsReturned>(0);
04026 }
04027
04033 @Override
04034 public void writeToParcel(Parcel parcel, int flags) {
04035 parcel.writeValue(end);
04036 parcel.writeValue(start);
04037 parcel.writeValue(total);
04038 }
04039
04043 protected LimitsReturned(Parcel parcel) {
04044 end = parcel.readInt();
04045 start = parcel.readInt();
04046 total = parcel.readInt();
04047 }
04048
04052 public static final Parcelable.Creator<LimitsReturned> CREATOR = new Parcelable.Creator<LimitsReturned>() {
04053 @Override
04054 public LimitsReturned createFromParcel(Parcel parcel) {
04055 return new LimitsReturned(parcel);
04056 }
04057 @Override
04058 public LimitsReturned[] newArray(int n) {
04059 return new LimitsReturned[n];
04060 }
04061 };
04062
04063 @Override
04064 public int describeContents() {
04065 return 0;
04066 }
04067 }
04068
04075 public static class Sort extends AbstractModel {
04076 public final static String API_TYPE = "List.Sort";
04077
04078
04079 public static final String IGNOREARTICLE = "ignorearticle";
04080 public static final String METHOD = "method";
04081 public static final String ORDER = "order";
04082
04083
04084 public final Boolean ignorearticle;
04085 public final String method;
04086 public final String order;
04087
04093 public Sort(Boolean ignorearticle, String method, String order) {
04094 this.ignorearticle = ignorearticle;
04095 this.method = method;
04096 this.order = order;
04097 }
04098
04099 @Override
04100 public JsonNode toJsonNode() {
04101 final ObjectNode node = OM.createObjectNode();
04102 node.put(IGNOREARTICLE, ignorearticle);
04103 node.put(METHOD, method);
04104 node.put(ORDER, order);
04105 return node;
04106 }
04107
04113 @Override
04114 public void writeToParcel(Parcel parcel, int flags) {
04115 parcel.writeInt(ignorearticle ? 1 : 0);
04116 parcel.writeValue(method);
04117 parcel.writeValue(order);
04118 }
04119
04123 protected Sort(Parcel parcel) {
04124 ignorearticle = parcel.readInt() == 1;
04125 method = parcel.readString();
04126 order = parcel.readString();
04127 }
04128
04132 public static final Parcelable.Creator<Sort> CREATOR = new Parcelable.Creator<Sort>() {
04133 @Override
04134 public Sort createFromParcel(Parcel parcel) {
04135 return new Sort(parcel);
04136 }
04137 @Override
04138 public Sort[] newArray(int n) {
04139 return new Sort[n];
04140 }
04141 };
04142
04143 @Override
04144 public int describeContents() {
04145 return 0;
04146 }
04147
04151 public interface Order {
04152
04153 public final String ASCENDING = "ascending";
04154 public final String DESCENDING = "descending";
04155
04156 public final static Set<String> values = new HashSet<String>(Arrays.asList(ASCENDING, DESCENDING));
04157 }
04158
04162 public interface Method {
04163
04164 public final String NONE = "none";
04165 public final String LABEL = "label";
04166 public final String DATE = "date";
04167 public final String SIZE = "size";
04168 public final String FILE = "file";
04169 public final String PATH = "path";
04170 public final String DRIVETYPE = "drivetype";
04171 public final String TITLE = "title";
04172 public final String TRACK = "track";
04173 public final String TIME = "time";
04174 public final String ARTIST = "artist";
04175 public final String ALBUM = "album";
04176 public final String ALBUMTYPE = "albumtype";
04177 public final String GENRE = "genre";
04178 public final String COUNTRY = "country";
04179 public final String YEAR = "year";
04180 public final String RATING = "rating";
04181 public final String VOTES = "votes";
04182 public final String TOP250 = "top250";
04183 public final String PROGRAMCOUNT = "programcount";
04184 public final String PLAYLIST = "playlist";
04185 public final String EPISODE = "episode";
04186 public final String SEASON = "season";
04187 public final String TOTALEPISODES = "totalepisodes";
04188 public final String WATCHEDEPISODES = "watchedepisodes";
04189 public final String TVSHOWSTATUS = "tvshowstatus";
04190 public final String TVSHOWTITLE = "tvshowtitle";
04191 public final String SORTTITLE = "sorttitle";
04192 public final String PRODUCTIONCODE = "productioncode";
04193 public final String MPAA = "mpaa";
04194 public final String STUDIO = "studio";
04195 public final String DATEADDED = "dateadded";
04196 public final String LASTPLAYED = "lastplayed";
04197 public final String PLAYCOUNT = "playcount";
04198 public final String LISTENERS = "listeners";
04199 public final String BITRATE = "bitrate";
04200 public final String RANDOM = "random";
04201
04202 public final static Set<String> values = new HashSet<String>(Arrays.asList(NONE, LABEL, DATE, SIZE, FILE, PATH, DRIVETYPE, TITLE, TRACK, TIME, ARTIST, ALBUM, ALBUMTYPE, GENRE, COUNTRY, YEAR, RATING, VOTES, TOP250, PROGRAMCOUNT, PLAYLIST, EPISODE, SEASON, TOTALEPISODES, WATCHEDEPISODES, TVSHOWSTATUS, TVSHOWTITLE, SORTTITLE, PRODUCTIONCODE, MPAA, STUDIO, DATEADDED, LASTPLAYED, PLAYCOUNT, LISTENERS, BITRATE, RANDOM));
04203 }
04204 }
04205
04209 public interface AllFields {
04210
04211 public final String TITLE = "title";
04212 public final String ARTIST = "artist";
04213 public final String ALBUMARTIST = "albumartist";
04214 public final String GENRE = "genre";
04215 public final String YEAR = "year";
04216 public final String RATING = "rating";
04217 public final String ALBUM = "album";
04218 public final String TRACK = "track";
04219 public final String DURATION = "duration";
04220 public final String COMMENT = "comment";
04221 public final String LYRICS = "lyrics";
04222 public final String MUSICBRAINZTRACKID = "musicbrainztrackid";
04223 public final String MUSICBRAINZARTISTID = "musicbrainzartistid";
04224 public final String MUSICBRAINZALBUMID = "musicbrainzalbumid";
04225 public final String MUSICBRAINZALBUMARTISTID = "musicbrainzalbumartistid";
04226 public final String PLAYCOUNT = "playcount";
04227 public final String FANART = "fanart";
04228 public final String DIRECTOR = "director";
04229 public final String TRAILER = "trailer";
04230 public final String TAGLINE = "tagline";
04231 public final String PLOT = "plot";
04232 public final String PLOTOUTLINE = "plotoutline";
04233 public final String ORIGINALTITLE = "originaltitle";
04234 public final String LASTPLAYED = "lastplayed";
04235 public final String WRITER = "writer";
04236 public final String STUDIO = "studio";
04237 public final String MPAA = "mpaa";
04238 public final String CAST = "cast";
04239 public final String COUNTRY = "country";
04240 public final String IMDBNUMBER = "imdbnumber";
04241 public final String PREMIERED = "premiered";
04242 public final String PRODUCTIONCODE = "productioncode";
04243 public final String RUNTIME = "runtime";
04244 public final String SET = "set";
04245 public final String SHOWLINK = "showlink";
04246 public final String STREAMDETAILS = "streamdetails";
04247 public final String TOP250 = "top250";
04248 public final String VOTES = "votes";
04249 public final String FIRSTAIRED = "firstaired";
04250 public final String SEASON = "season";
04251 public final String EPISODE = "episode";
04252 public final String SHOWTITLE = "showtitle";
04253 public final String THUMBNAIL = "thumbnail";
04254 public final String FILE = "file";
04255 public final String RESUME = "resume";
04256 public final String ARTISTID = "artistid";
04257 public final String ALBUMID = "albumid";
04258 public final String TVSHOWID = "tvshowid";
04259 public final String SETID = "setid";
04260 public final String WATCHEDEPISODES = "watchedepisodes";
04261 public final String DISC = "disc";
04262 public final String TAG = "tag";
04263 public final String ART = "art";
04264 public final String GENREID = "genreid";
04265 public final String DISPLAYARTIST = "displayartist";
04266 public final String ALBUMARTISTID = "albumartistid";
04267 public final String DESCRIPTION = "description";
04268 public final String THEME = "theme";
04269 public final String MOOD = "mood";
04270 public final String STYLE = "style";
04271 public final String ALBUMLABEL = "albumlabel";
04272 public final String SORTTITLE = "sorttitle";
04273 public final String EPISODEGUIDE = "episodeguide";
04274 public final String UNIQUEID = "uniqueid";
04275 public final String DATEADDED = "dateadded";
04276 public final String CHANNEL = "channel";
04277 public final String CHANNELTYPE = "channeltype";
04278 public final String HIDDEN = "hidden";
04279 public final String LOCKED = "locked";
04280 public final String CHANNELNUMBER = "channelnumber";
04281 public final String STARTTIME = "starttime";
04282 public final String ENDTIME = "endtime";
04283
04284 public final static Set<String> values = new HashSet<String>(Arrays.asList(TITLE, ARTIST, ALBUMARTIST, GENRE, YEAR, RATING, ALBUM, TRACK, DURATION, COMMENT, LYRICS, MUSICBRAINZTRACKID, MUSICBRAINZARTISTID, MUSICBRAINZALBUMID, MUSICBRAINZALBUMARTISTID, PLAYCOUNT, FANART, DIRECTOR, TRAILER, TAGLINE, PLOT, PLOTOUTLINE, ORIGINALTITLE, LASTPLAYED, WRITER, STUDIO, MPAA, CAST, COUNTRY, IMDBNUMBER, PREMIERED, PRODUCTIONCODE, RUNTIME, SET, SHOWLINK, STREAMDETAILS, TOP250, VOTES, FIRSTAIRED, SEASON, EPISODE, SHOWTITLE, THUMBNAIL, FILE, RESUME, ARTISTID, ALBUMID, TVSHOWID, SETID, WATCHEDEPISODES, DISC, TAG, ART, GENREID, DISPLAYARTIST, ALBUMARTISTID, DESCRIPTION, THEME, MOOD, STYLE, ALBUMLABEL, SORTTITLE, EPISODEGUIDE, UNIQUEID, DATEADDED, CHANNEL, CHANNELTYPE, HIDDEN, LOCKED, CHANNELNUMBER, STARTTIME, ENDTIME));
04285 }
04286
04290 public interface FileFields {
04291
04292 public final String TITLE = "title";
04293 public final String ARTIST = "artist";
04294 public final String ALBUMARTIST = "albumartist";
04295 public final String GENRE = "genre";
04296 public final String YEAR = "year";
04297 public final String RATING = "rating";
04298 public final String ALBUM = "album";
04299 public final String TRACK = "track";
04300 public final String DURATION = "duration";
04301 public final String COMMENT = "comment";
04302 public final String LYRICS = "lyrics";
04303 public final String MUSICBRAINZTRACKID = "musicbrainztrackid";
04304 public final String MUSICBRAINZARTISTID = "musicbrainzartistid";
04305 public final String MUSICBRAINZALBUMID = "musicbrainzalbumid";
04306 public final String MUSICBRAINZALBUMARTISTID = "musicbrainzalbumartistid";
04307 public final String PLAYCOUNT = "playcount";
04308 public final String FANART = "fanart";
04309 public final String DIRECTOR = "director";
04310 public final String TRAILER = "trailer";
04311 public final String TAGLINE = "tagline";
04312 public final String PLOT = "plot";
04313 public final String PLOTOUTLINE = "plotoutline";
04314 public final String ORIGINALTITLE = "originaltitle";
04315 public final String LASTPLAYED = "lastplayed";
04316 public final String WRITER = "writer";
04317 public final String STUDIO = "studio";
04318 public final String MPAA = "mpaa";
04319 public final String CAST = "cast";
04320 public final String COUNTRY = "country";
04321 public final String IMDBNUMBER = "imdbnumber";
04322 public final String PREMIERED = "premiered";
04323 public final String PRODUCTIONCODE = "productioncode";
04324 public final String RUNTIME = "runtime";
04325 public final String SET = "set";
04326 public final String SHOWLINK = "showlink";
04327 public final String STREAMDETAILS = "streamdetails";
04328 public final String TOP250 = "top250";
04329 public final String VOTES = "votes";
04330 public final String FIRSTAIRED = "firstaired";
04331 public final String SEASON = "season";
04332 public final String EPISODE = "episode";
04333 public final String SHOWTITLE = "showtitle";
04334 public final String THUMBNAIL = "thumbnail";
04335 public final String FILE = "file";
04336 public final String RESUME = "resume";
04337 public final String ARTISTID = "artistid";
04338 public final String ALBUMID = "albumid";
04339 public final String TVSHOWID = "tvshowid";
04340 public final String SETID = "setid";
04341 public final String WATCHEDEPISODES = "watchedepisodes";
04342 public final String DISC = "disc";
04343 public final String TAG = "tag";
04344 public final String ART = "art";
04345 public final String GENREID = "genreid";
04346 public final String DISPLAYARTIST = "displayartist";
04347 public final String ALBUMARTISTID = "albumartistid";
04348 public final String DESCRIPTION = "description";
04349 public final String THEME = "theme";
04350 public final String MOOD = "mood";
04351 public final String STYLE = "style";
04352 public final String ALBUMLABEL = "albumlabel";
04353 public final String SORTTITLE = "sorttitle";
04354 public final String EPISODEGUIDE = "episodeguide";
04355 public final String UNIQUEID = "uniqueid";
04356 public final String DATEADDED = "dateadded";
04357 public final String SIZE = "size";
04358 public final String LASTMODIFIED = "lastmodified";
04359 public final String MIMETYPE = "mimetype";
04360
04361 public final static Set<String> values = new HashSet<String>(Arrays.asList(TITLE, ARTIST, ALBUMARTIST, GENRE, YEAR, RATING, ALBUM, TRACK, DURATION, COMMENT, LYRICS, MUSICBRAINZTRACKID, MUSICBRAINZARTISTID, MUSICBRAINZALBUMID, MUSICBRAINZALBUMARTISTID, PLAYCOUNT, FANART, DIRECTOR, TRAILER, TAGLINE, PLOT, PLOTOUTLINE, ORIGINALTITLE, LASTPLAYED, WRITER, STUDIO, MPAA, CAST, COUNTRY, IMDBNUMBER, PREMIERED, PRODUCTIONCODE, RUNTIME, SET, SHOWLINK, STREAMDETAILS, TOP250, VOTES, FIRSTAIRED, SEASON, EPISODE, SHOWTITLE, THUMBNAIL, FILE, RESUME, ARTISTID, ALBUMID, TVSHOWID, SETID, WATCHEDEPISODES, DISC, TAG, ART, GENREID, DISPLAYARTIST, ALBUMARTISTID, DESCRIPTION, THEME, MOOD, STYLE, ALBUMLABEL, SORTTITLE, EPISODEGUIDE, UNIQUEID, DATEADDED, SIZE, LASTMODIFIED, MIMETYPE));
04362 }
04363
04367 public interface AlbumFilterFields {
04368
04369 public final String GENRE = "genre";
04370 public final String ALBUM = "album";
04371 public final String ARTIST = "artist";
04372 public final String ALBUMARTIST = "albumartist";
04373 public final String YEAR = "year";
04374 public final String REVIEW = "review";
04375 public final String THEMES = "themes";
04376 public final String MOODS = "moods";
04377 public final String STYLES = "styles";
04378 public final String TYPE = "type";
04379 public final String LABEL = "label";
04380 public final String RATING = "rating";
04381 public final String PLAYCOUNT = "playcount";
04382 public final String PLAYLIST = "playlist";
04383 public final String VIRTUALFOLDER = "virtualfolder";
04384
04385 public final static Set<String> values = new HashSet<String>(Arrays.asList(GENRE, ALBUM, ARTIST, ALBUMARTIST, YEAR, REVIEW, THEMES, MOODS, STYLES, TYPE, LABEL, RATING, PLAYCOUNT, PLAYLIST, VIRTUALFOLDER));
04386 }
04387
04391 public interface ArtistFilterFields {
04392
04393 public final String ARTIST = "artist";
04394 public final String GENRE = "genre";
04395 public final String MOODS = "moods";
04396 public final String STYLES = "styles";
04397 public final String INSTRUMENTS = "instruments";
04398 public final String BIOGRAPHY = "biography";
04399 public final String BORN = "born";
04400 public final String BANDFORMED = "bandformed";
04401 public final String DISBANDED = "disbanded";
04402 public final String DIED = "died";
04403 public final String PLAYLIST = "playlist";
04404 public final String VIRTUALFOLDER = "virtualfolder";
04405
04406 public final static Set<String> values = new HashSet<String>(Arrays.asList(ARTIST, GENRE, MOODS, STYLES, INSTRUMENTS, BIOGRAPHY, BORN, BANDFORMED, DISBANDED, DIED, PLAYLIST, VIRTUALFOLDER));
04407 }
04408
04412 public interface EpisodeFilterFields {
04413
04414 public final String TITLE = "title";
04415 public final String TVSHOW = "tvshow";
04416 public final String PLOT = "plot";
04417 public final String VOTES = "votes";
04418 public final String RATING = "rating";
04419 public final String TIME = "time";
04420 public final String WRITERS = "writers";
04421 public final String AIRDATE = "airdate";
04422 public final String PLAYCOUNT = "playcount";
04423 public final String LASTPLAYED = "lastplayed";
04424 public final String INPROGRESS = "inprogress";
04425 public final String GENRE = "genre";
04426 public final String YEAR = "year";
04427 public final String DIRECTOR = "director";
04428 public final String ACTOR = "actor";
04429 public final String EPISODE = "episode";
04430 public final String SEASON = "season";
04431 public final String FILENAME = "filename";
04432 public final String PATH = "path";
04433 public final String STUDIO = "studio";
04434 public final String MPAARATING = "mpaarating";
04435 public final String DATEADDED = "dateadded";
04436 public final String VIDEORESOLUTION = "videoresolution";
04437 public final String AUDIOCHANNELS = "audiochannels";
04438 public final String VIDEOCODEC = "videocodec";
04439 public final String AUDIOCODEC = "audiocodec";
04440 public final String AUDIOLANGUAGE = "audiolanguage";
04441 public final String SUBTITLELANGUAGE = "subtitlelanguage";
04442 public final String VIDEOASPECT = "videoaspect";
04443 public final String PLAYLIST = "playlist";
04444 public final String VIRTUALFOLDER = "virtualfolder";
04445
04446 public final static Set<String> values = new HashSet<String>(Arrays.asList(TITLE, TVSHOW, PLOT, VOTES, RATING, TIME, WRITERS, AIRDATE, PLAYCOUNT, LASTPLAYED, INPROGRESS, GENRE, YEAR, DIRECTOR, ACTOR, EPISODE, SEASON, FILENAME, PATH, STUDIO, MPAARATING, DATEADDED, VIDEORESOLUTION, AUDIOCHANNELS, VIDEOCODEC, AUDIOCODEC, AUDIOLANGUAGE, SUBTITLELANGUAGE, VIDEOASPECT, PLAYLIST, VIRTUALFOLDER));
04447 }
04448
04452 public interface MovieFilterFields {
04453
04454 public final String TITLE = "title";
04455 public final String PLOT = "plot";
04456 public final String PLOTOUTLINE = "plotoutline";
04457 public final String TAGLINE = "tagline";
04458 public final String VOTES = "votes";
04459 public final String RATING = "rating";
04460 public final String TIME = "time";
04461 public final String WRITERS = "writers";
04462 public final String PLAYCOUNT = "playcount";
04463 public final String LASTPLAYED = "lastplayed";
04464 public final String INPROGRESS = "inprogress";
04465 public final String GENRE = "genre";
04466 public final String COUNTRY = "country";
04467 public final String YEAR = "year";
04468 public final String DIRECTOR = "director";
04469 public final String ACTOR = "actor";
04470 public final String MPAARATING = "mpaarating";
04471 public final String TOP250 = "top250";
04472 public final String STUDIO = "studio";
04473 public final String HASTRAILER = "hastrailer";
04474 public final String FILENAME = "filename";
04475 public final String PATH = "path";
04476 public final String SET = "set";
04477 public final String TAG = "tag";
04478 public final String DATEADDED = "dateadded";
04479 public final String VIDEORESOLUTION = "videoresolution";
04480 public final String AUDIOCHANNELS = "audiochannels";
04481 public final String VIDEOCODEC = "videocodec";
04482 public final String AUDIOCODEC = "audiocodec";
04483 public final String AUDIOLANGUAGE = "audiolanguage";
04484 public final String SUBTITLELANGUAGE = "subtitlelanguage";
04485 public final String VIDEOASPECT = "videoaspect";
04486 public final String PLAYLIST = "playlist";
04487 public final String VIRTUALFOLDER = "virtualfolder";
04488
04489 public final static Set<String> values = new HashSet<String>(Arrays.asList(TITLE, PLOT, PLOTOUTLINE, TAGLINE, VOTES, RATING, TIME, WRITERS, PLAYCOUNT, LASTPLAYED, INPROGRESS, GENRE, COUNTRY, YEAR, DIRECTOR, ACTOR, MPAARATING, TOP250, STUDIO, HASTRAILER, FILENAME, PATH, SET, TAG, DATEADDED, VIDEORESOLUTION, AUDIOCHANNELS, VIDEOCODEC, AUDIOCODEC, AUDIOLANGUAGE, SUBTITLELANGUAGE, VIDEOASPECT, PLAYLIST, VIRTUALFOLDER));
04490 }
04491
04495 public interface MusicVideoFilterFields {
04496
04497 public final String TITLE = "title";
04498 public final String GENRE = "genre";
04499 public final String ALBUM = "album";
04500 public final String YEAR = "year";
04501 public final String ARTIST = "artist";
04502 public final String FILENAME = "filename";
04503 public final String PATH = "path";
04504 public final String PLAYCOUNT = "playcount";
04505 public final String LASTPLAYED = "lastplayed";
04506 public final String TIME = "time";
04507 public final String DIRECTOR = "director";
04508 public final String STUDIO = "studio";
04509 public final String PLOT = "plot";
04510 public final String TAG = "tag";
04511 public final String DATEADDED = "dateadded";
04512 public final String VIDEORESOLUTION = "videoresolution";
04513 public final String AUDIOCHANNELS = "audiochannels";
04514 public final String VIDEOCODEC = "videocodec";
04515 public final String AUDIOCODEC = "audiocodec";
04516 public final String AUDIOLANGUAGE = "audiolanguage";
04517 public final String SUBTITLELANGUAGE = "subtitlelanguage";
04518 public final String VIDEOASPECT = "videoaspect";
04519 public final String PLAYLIST = "playlist";
04520 public final String VIRTUALFOLDER = "virtualfolder";
04521
04522 public final static Set<String> values = new HashSet<String>(Arrays.asList(TITLE, GENRE, ALBUM, YEAR, ARTIST, FILENAME, PATH, PLAYCOUNT, LASTPLAYED, TIME, DIRECTOR, STUDIO, PLOT, TAG, DATEADDED, VIDEORESOLUTION, AUDIOCHANNELS, VIDEOCODEC, AUDIOCODEC, AUDIOLANGUAGE, SUBTITLELANGUAGE, VIDEOASPECT, PLAYLIST, VIRTUALFOLDER));
04523 }
04524
04528 public interface SongFilterFields {
04529
04530 public final String GENRE = "genre";
04531 public final String ALBUM = "album";
04532 public final String ARTIST = "artist";
04533 public final String ALBUMARTIST = "albumartist";
04534 public final String TITLE = "title";
04535 public final String YEAR = "year";
04536 public final String TIME = "time";
04537 public final String TRACKNUMBER = "tracknumber";
04538 public final String FILENAME = "filename";
04539 public final String PATH = "path";
04540 public final String PLAYCOUNT = "playcount";
04541 public final String LASTPLAYED = "lastplayed";
04542 public final String RATING = "rating";
04543 public final String COMMENT = "comment";
04544 public final String PLAYLIST = "playlist";
04545 public final String VIRTUALFOLDER = "virtualfolder";
04546
04547 public final static Set<String> values = new HashSet<String>(Arrays.asList(GENRE, ALBUM, ARTIST, ALBUMARTIST, TITLE, YEAR, TIME, TRACKNUMBER, FILENAME, PATH, PLAYCOUNT, LASTPLAYED, RATING, COMMENT, PLAYLIST, VIRTUALFOLDER));
04548 }
04549
04553 public interface TVShowFilterFields {
04554
04555 public final String TITLE = "title";
04556 public final String PLOT = "plot";
04557 public final String STATUS = "status";
04558 public final String VOTES = "votes";
04559 public final String RATING = "rating";
04560 public final String YEAR = "year";
04561 public final String GENRE = "genre";
04562 public final String DIRECTOR = "director";
04563 public final String ACTOR = "actor";
04564 public final String NUMEPISODES = "numepisodes";
04565 public final String NUMWATCHED = "numwatched";
04566 public final String PLAYCOUNT = "playcount";
04567 public final String PATH = "path";
04568 public final String STUDIO = "studio";
04569 public final String MPAARATING = "mpaarating";
04570 public final String DATEADDED = "dateadded";
04571 public final String LASTPLAYED = "lastplayed";
04572 public final String INPROGRESS = "inprogress";
04573 public final String TAG = "tag";
04574 public final String PLAYLIST = "playlist";
04575 public final String VIRTUALFOLDER = "virtualfolder";
04576
04577 public final static Set<String> values = new HashSet<String>(Arrays.asList(TITLE, PLOT, STATUS, VOTES, RATING, YEAR, GENRE, DIRECTOR, ACTOR, NUMEPISODES, NUMWATCHED, PLAYCOUNT, PATH, STUDIO, MPAARATING, DATEADDED, LASTPLAYED, INPROGRESS, TAG, PLAYLIST, VIRTUALFOLDER));
04578 }
04579
04583 public interface OperatorFilters {
04584
04585 public final String CONTAINS = "contains";
04586 public final String DOESNOTCONTAIN = "doesnotcontain";
04587 public final String IS = "is";
04588 public final String ISNOT = "isnot";
04589 public final String STARTSWITH = "startswith";
04590 public final String ENDSWITH = "endswith";
04591 public final String GREATERTHAN = "greaterthan";
04592 public final String LESSTHAN = "lessthan";
04593 public final String AFTER = "after";
04594 public final String BEFORE = "before";
04595 public final String INTHELAST = "inthelast";
04596 public final String NOTINTHELAST = "notinthelast";
04597 public final String TRUE = "true";
04598 public final String FALSE = "false";
04599 public final String BETWEEN = "between";
04600
04601 public final static Set<String> values = new HashSet<String>(Arrays.asList(CONTAINS, DOESNOTCONTAIN, IS, ISNOT, STARTSWITH, ENDSWITH, GREATERTHAN, LESSTHAN, AFTER, BEFORE, INTHELAST, NOTINTHELAST, TRUE, FALSE, BETWEEN));
04602 }
04603 }