org.fourthline.cling.support.model.container

## Class Container

- java.lang.Object
- - org.fourthline.cling.support.model.DIDLObject
  - - org.fourthline.cling.support.model.container.Container

- Direct Known Subclasses:
    Album, GenreContainer, PersonContainer, PlaylistContainer, StorageFolder, StorageSystem, StorageVolume

      public class Container
      extends DIDLObject

  A container in DIDL content.

  Note that although this container can have sub-containers, the `DIDLParser` will never read nor write this collection to and from XML. Its only purpose is convenience when creating and manipulating a recursive structure, that is, modelling the content tree as you see fit. You can then pick a list of containers and/or a list of items and hand them to the DIDL parser, which will render them flat in XML. The only nested structure that can optionally be rendered into and read from XML are the items of containers, never their sub-containers.

  Also see ContentDirectory 1.0 specification, section 2.8.3: "Incremental navigation i.e. the full hierarchy is never returned in one call since this is likely to flood the resources available to the control point (memory, network bandwidth, etc.)."

  Author:
    Christian Bauer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.fourthline.cling.support.model.DIDLObject

      `DIDLObject.Class, DIDLObject.Property<V>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Integer` | `childCount`
    `protected List<Container>` | `containers`
    `protected List<DIDLObject.Class>` | `createClasses`
    `protected List<Item>` | `items`
    `protected boolean` | `searchable`
    `protected List<DIDLObject.Class>` | `searchClasses`

    - ### Fields inherited from class org.fourthline.cling.support.model.DIDLObject

      `clazz, creator, descMetadata, id, parentID, properties, resources, restricted, title, writeStatus`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Container()`
    `Container(Container other)`
    `Container(String id, Container parent, String title, String creator, DIDLObject.Class clazz, Integer childCount)`
    `Container(String id, Container parent, String title, String creator, DIDLObject.Class clazz, Integer childCount, boolean searchable, List<DIDLObject.Class> createClasses, List<DIDLObject.Class> searchClasses, List<Item> items)`
    `Container(String id, String parentID, String title, String creator, boolean restricted, WriteStatus writeStatus, DIDLObject.Class clazz, List<Res> resources, List<DIDLObject.Property> properties, List<DescMeta> descMetadata)`
    `Container(String id, String parentID, String title, String creator, boolean restricted, WriteStatus writeStatus, DIDLObject.Class clazz, List<Res> resources, List<DIDLObject.Property> properties, List<DescMeta> descMetadata, Integer childCount, boolean searchable, List<DIDLObject.Class> createClasses, List<DIDLObject.Class> searchClasses, List<Item> items)`
    `Container(String id, String parentID, String title, String creator, DIDLObject.Class clazz, Integer childCount)`
    `Container(String id, String parentID, String title, String creator, DIDLObject.Class clazz, Integer childCount, boolean searchable, List<DIDLObject.Class> createClasses, List<DIDLObject.Class> searchClasses, List<Item> items)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Container` | `addContainer(Container container)`
    `Container` | `addItem(Item item)`
    `Integer` | `getChildCount()`
    `List<Container>` | `getContainers()`
    `List<DIDLObject.Class>` | `getCreateClasses()`
    `Container` | `getFirstContainer()`
    `List<Item>` | `getItems()`
    `List<DIDLObject.Class>` | `getSearchClasses()`
    `boolean` | `isSearchable()`
    `void` | `setChildCount(Integer childCount)`
    `void` | `setContainers(List<Container> containers)`
    `void` | `setCreateClasses(List<DIDLObject.Class> createClasses)`
    `void` | `setItems(List<Item> items)`
    `void` | `setSearchable(boolean searchable)`
    `void` | `setSearchClasses(List<DIDLObject.Class> searchClasses)`

    - ### Methods inherited from class org.fourthline.cling.support.model.DIDLObject

      `addDescMetadata, addProperties, addProperty, addResource, equals, getClazz, getCreator, getDescMetadata, getFirstProperty, getFirstPropertyValue, getFirstResource, getId, getLastProperty, getParentID, getProperties, getProperties, getPropertiesByNamespace, getPropertyValues, getResources, getTitle, getWriteStatus, hashCode, hasProperty, isRestricted, removeProperties, replaceFirstProperty, replaceProperties, setClazz, setCreator, setDescMetadata, setId, setParentID, setProperties, setResources, setRestricted, setTitle, setWriteStatus`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### childCount

          protected Integer childCount

    - #### searchable

          protected boolean searchable

    - #### createClasses

          protected List<DIDLObject.Class> createClasses

    - #### searchClasses

          protected List<DIDLObject.Class> searchClasses

    - #### containers

          protected List<Container> containers

    - #### items

          protected List<Item> items

  - ### Constructor Detail

    - #### Container

          public Container()

    - #### Container

          public Container(Container other)

    - #### Container

          public Container(String id,
                   String parentID,
                   String title,
                   String creator,
                   boolean restricted,
                   WriteStatus writeStatus,
                   DIDLObject.Class clazz,
                   List<Res> resources,
                   List<DIDLObject.Property> properties,
                   List<DescMeta> descMetadata)

    - #### Container

          public Container(String id,
                   String parentID,
                   String title,
                   String creator,
                   boolean restricted,
                   WriteStatus writeStatus,
                   DIDLObject.Class clazz,
                   List<Res> resources,
                   List<DIDLObject.Property> properties,
                   List<DescMeta> descMetadata,
                   Integer childCount,
                   boolean searchable,
                   List<DIDLObject.Class> createClasses,
                   List<DIDLObject.Class> searchClasses,
                   List<Item> items)

    - #### Container

          public Container(String id,
                   Container parent,
                   String title,
                   String creator,
                   DIDLObject.Class clazz,
                   Integer childCount)

    - #### Container

          public Container(String id,
                   String parentID,
                   String title,
                   String creator,
                   DIDLObject.Class clazz,
                   Integer childCount)

    - #### Container

          public Container(String id,
                   Container parent,
                   String title,
                   String creator,
                   DIDLObject.Class clazz,
                   Integer childCount,
                   boolean searchable,
                   List<DIDLObject.Class> createClasses,
                   List<DIDLObject.Class> searchClasses,
                   List<Item> items)

    - #### Container

          public Container(String id,
                   String parentID,
                   String title,
                   String creator,
                   DIDLObject.Class clazz,
                   Integer childCount,
                   boolean searchable,
                   List<DIDLObject.Class> createClasses,
                   List<DIDLObject.Class> searchClasses,
                   List<Item> items)

  - ### Method Detail

    - #### getChildCount

          public Integer getChildCount()

    - #### setChildCount

          public void setChildCount(Integer childCount)

    - #### isSearchable

          public boolean isSearchable()

    - #### setSearchable

          public void setSearchable(boolean searchable)

    - #### getCreateClasses

          public List<DIDLObject.Class> getCreateClasses()

    - #### setCreateClasses

          public void setCreateClasses(List<DIDLObject.Class> createClasses)

    - #### getSearchClasses

          public List<DIDLObject.Class> getSearchClasses()

    - #### setSearchClasses

          public void setSearchClasses(List<DIDLObject.Class> searchClasses)

    - #### getFirstContainer

          public Container getFirstContainer()

    - #### addContainer

          public Container addContainer(Container container)

    - #### getContainers

          public List<Container> getContainers()

    - #### setContainers

          public void setContainers(List<Container> containers)

    - #### getItems

          public List<Item> getItems()

    - #### setItems

          public void setItems(List<Item> items)

    - #### addItem

          public Container addItem(Item item)

Copyright © 2014 4th Line GmbH, Switzerland. All Rights Reserved.