/* * Copyright (c) 2020 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.restconf.common.util; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; import org.opendaylight.yangtools.concepts.SemVer; import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.common.YangVersion; import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode; import org.opendaylight.yangtools.yang.model.api.Deviation; import org.opendaylight.yangtools.yang.model.api.ExtensionDefinition; import org.opendaylight.yangtools.yang.model.api.FeatureDefinition; import org.opendaylight.yangtools.yang.model.api.GroupingDefinition; import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode; import org.opendaylight.yangtools.yang.model.api.Module; import org.opendaylight.yangtools.yang.model.api.ModuleImport; import org.opendaylight.yangtools.yang.model.api.NotificationDefinition; import org.opendaylight.yangtools.yang.model.api.RpcDefinition; import org.opendaylight.yangtools.yang.model.api.TypeDefinition; import org.opendaylight.yangtools.yang.model.api.UsesNode; import org.opendaylight.yangtools.yang.model.api.YangStmtMapping; import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace; import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition; import org.opendaylight.yangtools.yang.model.api.meta.StatementSource; import org.opendaylight.yangtools.yang.model.api.stmt.ModuleEffectiveStatement; import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement; abstract class AbstractOperationsModule implements Module, ModuleEffectiveStatement { @Override public final ModuleStatement getDeclared() { return null; } @Override public final StatementDefinition statementDefinition() { return YangStmtMapping.MODULE; } @Override public final StatementSource getStatementSource() { return StatementSource.CONTEXT; } @Override public final > Optional get(final Class namespace, final K identifier) { return Optional.empty(); } @Override public final > Map getAll(final Class namespace) { return Map.of(); } @Override public final String argument() { return getName(); } @Override public final QNameModule localQNameModule() { return getQNameModule(); } @Override public final Set getImports() { // Yeah, not accurate, but this should not be needed return Collections.emptySet(); } @Override public final YangVersion getYangVersion() { return YangVersion.VERSION_1; } @Override public final Set> getTypeDefinitions() { return Collections.emptySet(); } @Override public final Set getGroupings() { return Collections.emptySet(); } @Override public final Set getUses() { return Collections.emptySet(); } @Override public final Optional getDescription() { return Optional.empty(); } @Override public final Optional getReference() { return Optional.empty(); } @Override public final Set getNotifications() { return Collections.emptySet(); } @Override public final Optional getSemanticVersion() { return Optional.empty(); } @Override public final Optional getOrganization() { return Optional.empty(); } @Override public final Optional getContact() { return Optional.empty(); } @Override public final Set getSubmodules() { return Collections.emptySet(); } @Override public final Set getFeatures() { return Collections.emptySet(); } @Override public final Set getAugmentations() { return Collections.emptySet(); } @Override public final Set getRpcs() { return Collections.emptySet(); } @Override public final Set getDeviations() { return Collections.emptySet(); } @Override public final Set getIdentities() { return Collections.emptySet(); } @Override public final List getExtensionSchemaNodes() { return Collections.emptyList(); } }