blob: 2f025e89187f7a4b6c998545748de1cf4c9d1e1e [file] [log] [blame]
Yixiao Chen5ece00f2016-09-14 16:23:24 -04001package org.onosproject.provider.te.topology;
2
3import org.onosproject.yms.ych.YangCompositeEncoding;
4import org.onosproject.yms.ych.YangResourceIdentifierType;
5
6/**
7 * Represents implementation of YangCompositeEncoding interfaces.
8 */
9public class YangCompositeEncodingImpl implements YangCompositeEncoding {
10
11 /**
12 * Resource identifier for composite encoding.
13 */
Shankara-Huaweid5823ab2016-11-22 10:14:52 +053014 private String resourceIdentifier;
Yixiao Chen5ece00f2016-09-14 16:23:24 -040015
16 /**
17 * Resource information for composite encoding.
18 */
Shankara-Huaweid5823ab2016-11-22 10:14:52 +053019 private String resourceInformation;
Yixiao Chen5ece00f2016-09-14 16:23:24 -040020
21 /**
22 * Resource identifier type.
23 */
Shankara-Huaweid5823ab2016-11-22 10:14:52 +053024 public YangResourceIdentifierType resourceIdentifierType;
Yixiao Chen5ece00f2016-09-14 16:23:24 -040025
26 /**
27 * Creates an instance of YangCompositeEncodingImpl.
28 *
29 * @param resourceIdentifierType is URI
30 * @param resourceIdentifier is the URI string
31 * @param resourceInformation is the JSON body string
32 */
33 public YangCompositeEncodingImpl(YangResourceIdentifierType resourceIdentifierType,
34 String resourceIdentifier,
35 String resourceInformation) {
36 this.resourceIdentifierType = resourceIdentifierType;
37 this.resourceIdentifier = resourceIdentifier;
38 this.resourceInformation = resourceInformation;
39 }
40
41 @Override
42 public String getResourceIdentifier() {
43 return resourceIdentifier;
44 }
45
46 @Override
47 public YangResourceIdentifierType getResourceIdentifierType() {
48 return resourceIdentifierType;
49 }
50
51 @Override
52 public String getResourceInformation() {
53 return resourceInformation;
54 }
Shankara-Huaweid5823ab2016-11-22 10:14:52 +053055
56 @Override
57 public void setResourceIdentifier(String resourceId) {
58 resourceIdentifier = resourceId;
59 }
60
61 @Override
62 public void setResourceInformation(String resourceInfo) {
63 resourceInformation = resourceInfo;
64 }
65
66 @Override
67 public void setResourceIdentifierType(YangResourceIdentifierType idType) {
68 resourceIdentifierType = idType;
69 }
Yixiao Chen5ece00f2016-09-14 16:23:24 -040070}
71