e2ead53fb2778b30c7b992038046afc7f1fed6a3
[ccsdk/sli/plugins.git] / restconf-client / provider / src / main / java / org / onap / ccsdk / sli / plugins / yangserializers / dfserializer / DataFormatSerializerContext.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - CCSDK
4  * ================================================================================
5  * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
6  * ================================================================================
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer;
22
23 import java.util.Map;
24
25 /**
26  * Abstraction of data format serializer context.
27  */
28 public class DataFormatSerializerContext {
29
30     private Listener listener;
31     private String uri;
32     private Map<String, String> protocolAnnotation;
33
34     /**
35      * Creates an instance of data format serializer context.
36      *
37      * @param listener data format listener
38      * @param uri URI corresponding to instance identifier
39      * @param protocolAnnotation protocol annotations
40      */
41     public DataFormatSerializerContext(Listener listener, String uri,
42         Map<String, String> protocolAnnotation) {
43         this.listener = listener;
44         this.uri = uri;
45         this.protocolAnnotation = protocolAnnotation;
46     }
47
48     /**
49      * Retruns data format listener.
50      *
51      * @return data format listener
52      */
53     public Listener listener() {
54         return listener;
55     }
56
57     /**
58      * Returns URI.
59      *
60      * @return URI
61      */
62     public String uri() {
63         return uri;
64     }
65
66     /**
67      * Returns protocol annotations.
68      *
69      * @return protocol annotations
70      */
71     public Map<String, String> getProtocolAnnotation() {
72         return protocolAnnotation;
73     }
74 }