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.model.meta;
17  
18  import java.net.URI;
19  
20  /**
21   * Encpasulates optional metadata about the model of a device.
22   *
23   * @author Christian Bauer
24   */
25  public class ModelDetails {
26  
27      private String modelName;
28      private String modelDescription;
29      private String modelNumber;
30      private URI modelURI;
31  
32      ModelDetails() {
33      }
34  
35      public ModelDetails(String modelName) {
36          this.modelName = modelName;
37      }
38  
39      public ModelDetails(String modelName, String modelDescription) {
40          this.modelName = modelName;
41          this.modelDescription = modelDescription;
42      }
43  
44      public ModelDetails(String modelName, String modelDescription, String modelNumber) {
45          this.modelName = modelName;
46          this.modelDescription = modelDescription;
47          this.modelNumber = modelNumber;
48      }
49  
50      public ModelDetails(String modelName, String modelDescription, String modelNumber, URI modelURI) {
51          this.modelName = modelName;
52          this.modelDescription = modelDescription;
53          this.modelNumber = modelNumber;
54          this.modelURI = modelURI;
55      }
56  
57      public ModelDetails(String modelName, String modelDescription, String modelNumber, String modelURI) throws IllegalArgumentException {
58          this.modelName = modelName;
59          this.modelDescription = modelDescription;
60          this.modelNumber = modelNumber;
61          this.modelURI = URI.create(modelURI);
62      }
63  
64      public String getModelName() {
65          return modelName;
66      }
67  
68      public String getModelDescription() {
69          return modelDescription;
70      }
71  
72      public String getModelNumber() {
73          return modelNumber;
74      }
75  
76      public URI getModelURI() {
77          return modelURI;
78      }
79  }