2 * Copyright (c) 2013 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.controller.config.yang.store.api;
10 import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry;
11 import org.opendaylight.yangtools.yang.common.QName;
12 import org.opendaylight.yangtools.yang.model.api.Module;
17 public interface YangStoreSnapshot extends AutoCloseable {
20 * @deprecated Use {@link #getQNamesToIdentitiesToModuleMXBeanEntries()} instead. This method return only one
21 * module representation even if multiple revisions are available.
24 Map<String/* Namespace from yang file */,
25 Map<String /* Name of module entry from yang file */, ModuleMXBeanEntry>> getModuleMXBeanEntryMap();
28 Map<QName, Map<String /* identity local name */, ModuleMXBeanEntry>> getQNamesToIdentitiesToModuleMXBeanEntries();
31 * Get number of parsed ModuleMXBeanEntry instances.
33 int countModuleMXBeanEntries();
36 * Get all modules discovered when this snapshot was created.
37 * @return all modules discovered. If one module exists with two different revisions, return both.
39 Set<Module> getModules();
42 * Get all modules together with their yang sources.
44 Map<Module, String> getModulesToSources();
47 * Retrieve source of module as it appeared during creation of this snapshot.
49 * @return yang source of given module
50 * @throws java.lang.IllegalArgumentException if module does not belong to this snapshot
52 String getModuleSource(Module module);