2 * Copyright (c) 2019 PANTHEON.tech s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.data.impl.schema;
10 import com.google.common.annotations.Beta;
11 import java.io.IOException;
12 import org.opendaylight.yangtools.rfc8528.data.api.MountPointChild;
13 import org.opendaylight.yangtools.rfc8528.data.util.EmptyMountPointContext;
14 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
15 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
16 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
19 * Utility base class for implementing {@link MountPointChild} classes.
22 public abstract class AbstractMountPointChild implements MountPointChild {
24 public final NormalizedNode normalizeTo(final EffectiveModelContext schemaContext) throws IOException {
25 final NormalizedNodeResult result = new NormalizedNodeResult();
26 final NormalizedNodeStreamWriter streamWriter = ImmutableNormalizedNodeStreamWriter.from(result);
27 writeTo(streamWriter, new EmptyMountPointContext(schemaContext));
28 return result.getResult();