Class Category


  • public class Category
    extends ContentDiscoveryData
    This class is Category model class. Category contains items grouped by:
    • media types, such as movies, television, music, radio and audiobooks
    • genre, such as adventure, action and comedy
    • user-defined, such as most popular and recent releases


    Each Get method for values, such as title, description and short description, will return an empty String/List/Map, if no data exists.
    • Constructor Summary

      Constructors 
      Constructor Description
      Category​(JSONObject json, java.lang.String lang)  
      Category​(JSONObject json, java.lang.String lang, Category parent)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      JSONObject getAttributes()
      Gets a list of attributes, such as genre, actor, director and year, for the item.
      java.lang.String getDescription()
      Gets a description of the item.
      java.lang.String getFieldbyName​(java.lang.String name)  
      java.lang.String getId()
      Gets the unique identifier of the item.
      java.util.List<ImageInfo> getImages()  
      java.util.List<ImageInfo> getImagesbyType​(int imageType)
      Gets images by type.
      java.util.List<java.lang.String> getMediaUris()
      Gets unique media identifer for the item.
      java.lang.String getParentId()
      Gets a description of the item.
      java.lang.String getShortDescription()
      Gets a short description of the item.
      java.util.List<Category> getSubcategories()
      Gets the children categories for the parent category.
      java.util.List<java.lang.String> getSubCategoryIds()
      Gets the unique identifiers for the children categories.
      java.lang.String getTitle()
      Gets the title or name of the item.
      boolean hasSubcategory()
      Gets the number of children categories for the parent category.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Category

        public Category​(JSONObject json,
                        java.lang.String lang)
      • Category

        public Category​(JSONObject json,
                        java.lang.String lang,
                        Category parent)
    • Method Detail

      • getId

        public java.lang.String getId()
        Gets the unique identifier of the item.
      • getTitle

        public java.lang.String getTitle()
        Gets the title or name of the item.
      • getShortDescription

        public java.lang.String getShortDescription()
        Gets a short description of the item.
      • getDescription

        public java.lang.String getDescription()
        Gets a description of the item.
      • getParentId

        public java.lang.String getParentId()
        Gets a description of the item.
      • getMediaUris

        public java.util.List<java.lang.String> getMediaUris()
        Gets unique media identifer for the item.
      • getAttributes

        public JSONObject getAttributes()
        Gets a list of attributes, such as genre, actor, director and year, for the item.
      • getImages

        public java.util.List<ImageInfo> getImages()
      • hasSubcategory

        public boolean hasSubcategory()
        Gets the number of children categories for the parent category.
      • getSubCategoryIds

        public java.util.List<java.lang.String> getSubCategoryIds()
        Gets the unique identifiers for the children categories.

        If no children exist, no items will display.
      • getSubcategories

        public java.util.List<Category> getSubcategories()
        Gets the children categories for the parent category.

        If no children exist, no items will display.
      • getFieldbyName

        public java.lang.String getFieldbyName​(java.lang.String name)
        Since:
        03.43.00.1