1 //******************************************************************
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 package org.iotivity.service.resourcecontainer;
24 * This class holds the configuration parameters for a single resource instance provided
25 * by the resource bundle.
27 public class ResourceConfig {
28 private String m_name, m_uri, m_resourceType, m_address;
31 * Empty constructor for resoure config.
33 public ResourceConfig() {
37 * Creates a new resource config instance.
38 * @param params Resource parameters as array. 1. Name, 2. URI, 3. Resource Type, 4. Address
40 public ResourceConfig(String[] params) {
43 m_resourceType = params[2];
44 m_address = params[3];
48 * Returns the configured name
49 * @return name property
51 public String getName() {
57 * @param m_name Resource name
59 public void setName(String m_name) {
64 * Returns the configured URI
65 * @return Configured URI
67 public String getURI() {
72 * Sets the configured URI
73 * @param m_uri Configuration URI
75 public void setURI(String m_uri) {
80 * Returns the configured resource type
81 * @return configured resource type
83 public String getResourceType() {
84 return m_resourceType;
88 * Sets the configured resource type
89 * @param m_resourceType updates the configured resource type
91 public void setResourceType(String m_resourceType) {
92 this.m_resourceType = m_resourceType;
96 * Returns the configured address
97 * @return Configured address
99 public String getAddress() {
104 * Sets the configured address
105 * @param m_address Configured address
107 public void setAddress(String m_address) {
108 this.m_address = m_address;
112 public String toString() {
113 return "ResourceConfig [m_name=" + m_name + ", m_uri=" + m_uri
114 + ", m_resourceType=" + m_resourceType + ", m_address="