Abstract infrastructure for normalized nodes translation.
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / transform / dom / serializer / ChoiceNodeDomSerializer.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.impl.schema.transform.dom.serializer;
9
10 import org.opendaylight.yangtools.yang.data.impl.schema.transform.base.serializer.ChoiceNodeBaseSerializer;
11 import org.opendaylight.yangtools.yang.data.impl.schema.transform.base.serializer.NodeSerializerDispatcher;
12 import org.w3c.dom.Element;
13
14 import com.google.common.base.Preconditions;
15
16 public class ChoiceNodeDomSerializer extends ChoiceNodeBaseSerializer<Element> {
17     private final NodeSerializerDispatcher<Element> dispatcher;
18
19     public ChoiceNodeDomSerializer(final NodeSerializerDispatcher<Element> dispatcher) {
20         this.dispatcher = Preconditions.checkNotNull(dispatcher);
21     }
22
23     @Override
24     protected NodeSerializerDispatcher<Element> getNodeDispatcher() {
25         return dispatcher;
26     }
27 }