Merge branch 'upstream' into tizen
[platform/upstream/iotivity.git] / cloud / resourcedirectory / src / main / java / org / iotivity / cloud / rdserver / resources / LinksPayloadFormat.java
1 /*
2  * //******************************************************************
3  * //
4  * // Copyright 2016 Samsung Electronics All Rights Reserved.
5  * //
6  * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7  * //
8  * // Licensed under the Apache License, Version 2.0 (the "License");
9  * // you may not use this file except in compliance with the License.
10  * // You may obtain a copy of the License at
11  * //
12  * //      http://www.apache.org/licenses/LICENSE-2.0
13  * //
14  * // Unless required by applicable law or agreed to in writing, software
15  * // distributed under the License is distributed on an "AS IS" BASIS,
16  * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * // See the License for the specific language governing permissions and
18  * // limitations under the License.
19  * //
20  * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21  */
22 package org.iotivity.cloud.rdserver.resources;
23
24 import java.util.ArrayList;
25
26 public class LinksPayloadFormat {
27     /** This is the target relative URI. */
28     String            href;
29     /**
30      * Resource Type - A standard OIC specified or vendor defined resource type
31      * of the resource referenced by the target URI.
32      */
33     ArrayList<String> rt;
34     /**
35      * Interface - The interfaces supported by the resource referenced by the
36      * target URI.
37      */
38     ArrayList<String> itf;
39     /**
40      * The relation of the target URI referenced by the link to the context URI;
41      * The default value is null.
42      */
43     String            rel;
44     /**
45      * Specifies if the resource referenced by the target URIis observable or
46      * not.
47      */
48     boolean           obs;
49     /**
50      * A title for the link relation. Can be used by the UI to provide a
51      * context.
52      */
53     String            title;
54     /**
55      * This is used to override the context URI e.g. override the URI of the
56      * containing collection.
57      */
58     String            uri;
59     /**
60      * The instance identifier for this web link in an array of web links - used
61      * in links.
62      */
63     int               ins;
64     /**
65      * A hint of the media type of the representation of the resource referenced
66      * by the target URI.
67      */
68     ArrayList<String> mt;
69
70     public LinksPayloadFormat() {
71         rt = new ArrayList<String>();
72         itf = new ArrayList<String>();
73         mt = new ArrayList<String>();
74     }
75
76     public String getHref() {
77         return href;
78     }
79
80     public void setHref(String href) {
81         this.href = href;
82     }
83
84     public ArrayList<String> getRt() {
85         return rt;
86     }
87
88     public void setRt(ArrayList<String> rt) {
89         this.rt = rt;
90     }
91
92     public ArrayList<String> getItf() {
93         return itf;
94     }
95
96     public void setItf(ArrayList<String> itf) {
97         this.itf = itf;
98     }
99
100     public String getRel() {
101         return rel;
102     }
103
104     public void setRel(String rel) {
105         this.rel = rel;
106     }
107
108     public boolean isObs() {
109         return obs;
110     }
111
112     public void setObs(boolean obs) {
113         this.obs = obs;
114     }
115
116     public String getTitle() {
117         return title;
118     }
119
120     public void setTitle(String title) {
121         this.title = title;
122     }
123
124     public String getUri() {
125         return uri;
126     }
127
128     public void setUri(String uri) {
129         this.uri = uri;
130     }
131
132     public int getIns() {
133         return ins;
134     }
135
136     public void setIns(int ins) {
137         this.ins = ins;
138     }
139
140     public ArrayList<String> getMt() {
141         return mt;
142     }
143
144     public void setMt(ArrayList<String> mt) {
145         this.mt = mt;
146     }
147 }