Composite node <-> normalized node serializer and deserializer
[yangtools.git] / yang / yang-data-json / src / main / java / org / opendaylight / yangtools / yang / data / json / schema / cnsn / parser / LeafSetEntryNodeCnSnParser.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.data.json.schema.cnsn.parser;
9
10 import java.util.Collections;
11 import java.util.Map;
12
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.data.api.Node;
15 import org.opendaylight.yangtools.yang.data.impl.schema.transform.base.parser.LeafSetEntryNodeBaseParser;
16 import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
17
18 public class LeafSetEntryNodeCnSnParser extends LeafSetEntryNodeBaseParser<Node<?>> {
19
20     public LeafSetEntryNodeCnSnParser() {
21         super();
22     }
23
24     @Override
25     protected Object parseLeafListEntry(Node<?> elements, LeafListSchemaNode schema) {
26         return elements.getValue();
27     }
28
29     @Override
30     protected Map<QName, String> getAttributes(Node<?> e) {
31         return Collections.emptyMap();
32     }
33 }