X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=parser%2Fyang-parser-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fspi%2Fsource%2FSourceParserNamespaces.java;fp=parser%2Fyang-parser-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fspi%2Fsource%2FSourceParserNamespaces.java;h=0000000000000000000000000000000000000000;hb=3a165464d422d10266138f5402e13958e9d1e0cd;hp=1780f27156a84cd5845dc69886d0359fce5c46aa;hpb=75eef8dfb403ae86a7f6ee2c165e5f209e81cb0e;p=yangtools.git diff --git a/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/SourceParserNamespaces.java b/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/SourceParserNamespaces.java deleted file mode 100644 index 1780f27156..0000000000 --- a/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/SourceParserNamespaces.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.yangtools.yang.parser.spi.source; - -import com.google.common.collect.SetMultimap; -import java.util.Set; -import org.eclipse.jdt.annotation.NonNull; -import org.opendaylight.yangtools.yang.common.Empty; -import org.opendaylight.yangtools.yang.common.QName; -import org.opendaylight.yangtools.yang.common.QNameModule; -import org.opendaylight.yangtools.yang.common.UnresolvedQName.Unqualified; -import org.opendaylight.yangtools.yang.common.XMLNamespace; -import org.opendaylight.yangtools.yang.model.api.stmt.ModuleEffectiveStatement; -import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement; -import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier; -import org.opendaylight.yangtools.yang.parser.spi.ParserNamespaces; -import org.opendaylight.yangtools.yang.parser.spi.meta.ParserNamespace; -import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; - -/** - * Namespaces related to YANG/YIN source processing. - */ -public final class SourceParserNamespaces { - /** - * Source-specific mapping of belongsTo prefixes to module identifiers. This mapping allows source-specific context - * to correctly populate prefixes map for actual parsing phase and eventually, resolve QName for any valid declared - * statement. - */ - public static final @NonNull ParserNamespace> BELONGSTO_PREFIX_TO_MODULECTX = - new ParserNamespace<>("belongsto-prefix-to-module"); - - /** - * Source-specific mapping of prefixes to namespaces. - */ - // FIXME: bad javadoc - public static final @NonNull ParserNamespace BELONGSTO_PREFIX_TO_MODULE_NAME = - new ParserNamespace<>("belongsto-prefix-to-name"); - - /** - * Namespace similar to {@link ParserNamespaces#MODULE} for storing modules into Yang model storage but keyed by - * plain name. - */ - // FIXME: Better name? - public static final @NonNull ParserNamespace> MODULE_FOR_BELONGSTO = - new ParserNamespace<>("module-belongsto"); - - /** - * Pre-linkage source-specific mapping of prefixes to module namespaces. - */ - // FIXME: a better name? - public static final @NonNull ParserNamespace IMP_PREFIX_TO_NAMESPACE = - new ParserNamespace<>("prefix-to-xmlnamespace"); - - /** - * Source-specific mapping of prefix strings to module context. - */ - public static final @NonNull ParserNamespace> IMPORT_PREFIX_TO_MODULECTX = - new ParserNamespace<>("import-prefix-to-modulectx"); - - // FIXME: document this - public static final @NonNull ParserNamespace> IMPORTED_MODULE = - new ParserNamespace<>("imported-module"); - - // FIXME: document this - // FIXME: is this 'included submodule' instead? - public static final @NonNull ParserNamespace> INCLUDED_MODULE = - new ParserNamespace<>("included-module"); - - /** - * Source-specific mapping of prefixes to namespaces. - */ - // FIXME: bad javadoc - public static final @NonNull ParserNamespace> INCLUDED_SUBMODULE_NAME_TO_MODULECTX - = new ParserNamespace<>("included-submodule-to-modulectx"); - - /** - * Source-specific mapping of prefixes to namespaces. - */ - // FIXME: bad javadoc - public static final @NonNull ParserNamespace MODULE_NAME_TO_QNAME = - new ParserNamespace<>("module-name-to-qnamemodule"); - - /** - * Global mapping of modules to QNameModules. - */ - public static final @NonNull ParserNamespace, QNameModule> MODULECTX_TO_QNAME = - new ParserNamespace<>("modulectx-to-qnamemodule"); - - public static final @NonNull ParserNamespace> SUPPORTED_FEATURES = - new ParserNamespace<>("supportedFeatures"); - - /** - * Source-specific mapping of prefixes to namespaces. This namespace is populated by all statements which have - * impact on the XML namespace, for example {@code import}, {@code belongs-to} and really anywhere a {@code prefix} - * statement is present. - * - * @see PrefixResolver - */ - public static final @NonNull ParserNamespace PREFIX_TO_MODULE = - new ParserNamespace<>("prefix-to-qnamemodule"); - - /** - * Namespace used for storing information about modules that support deviation resolution. - * Map key (QNameModule) denotes a module which can be deviated by the modules specified in the Map value. - */ - public static final @NonNull ParserNamespace> MODULES_DEVIATED_BY = - new ParserNamespace<>("moduleDeviations"); - - /** - * Source-specific mapping of prefixes to namespaces. - */ - // FIXME: bad javadoc - public static final @NonNull ParserNamespace MODULE_NAMESPACE_TO_NAME = - new ParserNamespace<>("qnamemodule-to-name"); - - /** - * Pre-linkage global mapping of module names to namespaces. - */ - public static final @NonNull ParserNamespace MODULE_NAME_TO_NAMESPACE = - new ParserNamespace<>("module-name-to-xmlnamespace"); - - /** - * Global mapping of modules to source identifier. - */ - public static final @NonNull ParserNamespace, SourceIdentifier> MODULECTX_TO_SOURCE = - new ParserNamespace<>("modulectx-to-source"); - - private SourceParserNamespaces() { - // Hidden on purpose - } -}