2 * Copyright (c) 2019 Red Hat, 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.mdsal.dom.spi;
10 import java.util.List;
11 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
12 import org.opendaylight.mdsal.dom.api.DOMYangTextSourceProvider;
13 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
14 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextProvider;
17 * Base class to implement DOMSchemaService more easily while providing a bridge between MD-SAL DOM Schema services
18 * and YANG Tools Schema consumers.
20 * @author Michael Vorburger.ch
22 public abstract class AbstractDOMSchemaService implements DOMSchemaService, EffectiveModelContextProvider {
23 public abstract static class WithYangTextSources extends AbstractDOMSchemaService
24 implements DOMYangTextSourceProvider {
26 public List<Extension> supportedExtensions() {
32 public final EffectiveModelContext getEffectiveModelContext() {
33 final var ret = getGlobalContext();
35 throw new IllegalStateException("Global context is not available in " + this);