2 * Copyright (c) 2014 Cisco Systems, Inc. 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.codec.gson;
10 import java.io.IOException;
11 import java.io.Writer;
14 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
17 * Abstract class tracking a virtual level of {@link JSONNormalizedNodeStreamWriter}
18 * recursion. It only tracks the namespace associated with this node.
20 abstract class JSONStreamWriterURIContext extends JSONStreamWriterContext {
21 private final URI namespace;
23 protected JSONStreamWriterURIContext(final JSONStreamWriterContext parent, final URI namespace) {
25 this.namespace = namespace;
29 protected final URI getNamespace() {
34 protected final void emitStart(final SchemaContext schema, final Writer writer) throws IOException {