2 * //******************************************************************
4 * // Copyright 2016 Samsung Electronics All Rights Reserved.
6 * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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
12 * // http://www.apache.org/licenses/LICENSE-2.0
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.
20 * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 package org.iotivity.cloud.rdserver;
24 import org.iotivity.cloud.base.OICConstants;
26 public class Constants extends OICConstants {
28 /** Database, Table name */
29 public static final String RD_DB_NAME = "RD_DB";
30 public static final String RD_TABLE = "RD_TABLE";
31 public static final String PRESENCE_TABLE = "PRESENCE_TABLE";
33 /** A human friendly name of device */
34 public static final String DEVICE_NAME = "n";
35 /** An unique identifier of device */
36 public static final String DEVICE_ID = "di";
37 /** policies that apply for resource */
38 public static final String POLICY = "p";
39 /** To represent bitmap. */
40 public static final String BITMAP = "bm";
41 /** An ordinal number that is not repeated */
42 public static final String INS = "ins";
43 /** Time (in seconds) to indicate how long RD should publish this item */
44 public static final String DEVICE_TTL = "lt";
45 /** Time to live for this link */
46 public static final String RESOURCE_TTL = "ttl";
48 public static final String HREF = "href";
50 public static final String RESOURCE_TYPE = "rt";
51 /** Resource interface */
52 public static final String INTERFACE = "if";
53 /** Relation between target URI and context URI */
54 public static final String REL = "rel";
55 /** Title for the link relation */
56 public static final String TITLE = "title";
57 /** This is used to override the context URI */
58 public static final String ANCHOR = "anchor";
59 /** Media type. Default : application/json */
60 public static final String MEDIA_TYPE = "type";
61 /** To represent links. */
62 public static final String LINKS = "links";
63 /** To represent resource type with Publish RD. */
64 public static final String RESOURCE_TYPE_RDPUBLISH = "oic.wk.rdpub";
66 /** '/oic/prs' resource property */
67 public static final String PRESENCE_STATE = "state";
68 public static final String PRESENCE_LIST = "prslist";
69 public static final String DEVICE_PRESENCE = "device_presence";
71 /** '/oic/ad' resource property */
72 public static final String NON = "non";
73 public static final String TRIGGER = "trg";
74 public static final byte RES_CREATE = 0;
75 public static final byte RES_CHANGE = 1;
76 public static final byte RES_DELETE = 2;
77 public static final String RESOURCE_PRESENCE = "resource_presence";