blob: 3597536acae35b9e5e641de7f84639dcdab7a0ee [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 */
14 private final String resourceIdentifier;
15
16 /**
17 * Resource information for composite encoding.
18 */
19 private final String resourceInformation;
20
21 /**
22 * Resource identifier type.
23 */
24 public final YangResourceIdentifierType resourceIdentifierType;
25
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 }
55}
56