View Javadoc
1   /*
2    * Copyright (C) 2013 4th Line GmbH, Switzerland
3    *
4    * The contents of this file are subject to the terms of either the GNU
5    * Lesser General Public License Version 2 or later ("LGPL") or the
6    * Common Development and Distribution License Version 1 or later
7    * ("CDDL") (collectively, the "License"). You may not use this file
8    * except in compliance with the License. See LICENSE.txt for more
9    * information.
10   *
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14   */
15  
16  package org.fourthline.cling.support.model.item;
17  
18  import org.fourthline.cling.support.model.DIDLObject;
19  import org.fourthline.cling.support.model.DescMeta;
20  import org.fourthline.cling.support.model.Res;
21  import org.fourthline.cling.support.model.WriteStatus;
22  import org.fourthline.cling.support.model.container.Container;
23  
24  import java.util.ArrayList;
25  import java.util.List;
26  
27  /**
28   * @author Christian Bauer
29   */
30  public class Item extends DIDLObject {
31  
32      protected String refID;
33  
34      public Item() {
35      }
36  
37      public Item(Item other) {
38          super(other);
39          setRefID(other.getRefID());
40      }
41  
42      public Item(String id, String parentID, String title, String creator, boolean restricted, WriteStatus writeStatus, Class clazz, List<Res> resources, List<Property> properties, List<DescMeta> descMetadata) {
43          super(id, parentID, title, creator, restricted, writeStatus, clazz, resources, properties, descMetadata);
44      }
45  
46      public Item(String id, String parentID, String title, String creator, boolean restricted, WriteStatus writeStatus, Class clazz, List<Res> resources, List<Property> properties, List<DescMeta> descMetadata, String refID) {
47          super(id, parentID, title, creator, restricted, writeStatus, clazz, resources, properties, descMetadata);
48          this.refID = refID;
49      }
50  
51      public Item(String id, Container parent, String title, String creator, DIDLObject.Class clazz) {
52          this(id, parent.getId(), title, creator, false, null, clazz, new ArrayList(), new ArrayList(), new ArrayList());
53      }
54  
55      public Item(String id, Container parent, String title, String creator, DIDLObject.Class clazz, String refID) {
56          this(id, parent.getId(), title, creator, false, null, clazz, new ArrayList(), new ArrayList(), new ArrayList(), refID);
57      }
58  
59      public Item(String id, String parentID, String title, String creator, DIDLObject.Class clazz) {
60          this(id, parentID, title, creator, false, null, clazz, new ArrayList(), new ArrayList(), new ArrayList());
61      }
62  
63      public Item(String id, String parentID, String title, String creator, DIDLObject.Class clazz, String refID) {
64          this(id, parentID, title, creator, false, null, clazz, new ArrayList(), new ArrayList(), new ArrayList(), refID);
65      }
66  
67      public String getRefID() {
68          return refID;
69      }
70  
71      public void setRefID(String refID) {
72          this.refID = refID;
73      }
74  }