These classes are not used anywhere, remove them.
Change-Id: I56f257874c422ac33e0f37608e694c90fb7f4729
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.data.util;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-import com.google.common.annotations.Beta;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode;
-import org.opendaylight.yangtools.yang.model.api.Module;
-
-@Beta
-public abstract class AbstractModuleStringIdentityrefCodec extends AbstractStringIdentityrefCodec {
- /**
- * Resolve a string prefix into the corresponding module.
- *
- * @param prefix Prefix
- * @return module mapped to prefix, or null if the module cannot be resolved
- */
- protected abstract @Nullable Module moduleForPrefix(@NonNull String prefix);
-
- @Override
- protected final QName createQName(final String prefix, final String localName) {
- final Module module = moduleForPrefix(prefix);
- checkArgument(module != null, "Failed to lookup prefix %s", prefix);
-
- final QName qname = QName.create(module.getQNameModule(), localName);
- for (IdentitySchemaNode identity : module.getIdentities()) {
- if (qname.equals(identity.getQName())) {
- return identity.getQName();
- }
- }
-
- throw new IllegalArgumentException("Failed to find identity matching " + qname);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.data.util;
-
-import com.google.common.annotations.Beta;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.codec.IdentityrefCodec;
-
-/**
- * Abstract utility class for representations which encode Identityref as a
- * prefix:name tuple. Typical uses are RESTCONF/JSON (module:name) and XML (prefix:name).
- */
-@Beta
-public abstract class AbstractStringIdentityrefCodec extends AbstractNamespaceCodec<QName>
- implements IdentityrefCodec<String> {
- @Override
- protected final String serializeImpl(final QName data) {
- return appendQName(new StringBuilder(), data).toString();
- }
-
- @Override
- protected final QName deserializeImpl(final String data) {
- return parseQName(data);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2016 Intel Corporation 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.data.util;
-
-import static java.util.Objects.requireNonNull;
-
-import com.google.common.annotations.Beta;
-import org.eclipse.jdt.annotation.NonNull;
-import org.opendaylight.yangtools.yang.common.QNameModule;
-import org.opendaylight.yangtools.yang.common.XMLNamespace;
-import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
-import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextProvider;
-
-/**
- * Base class for implementing identityref codecs on based on module names.
- */
-@Beta
-public abstract class ModuleStringIdentityrefCodec extends AbstractModuleStringIdentityrefCodec
- implements EffectiveModelContextProvider {
- private final @NonNull EffectiveModelContext context;
- private final @NonNull QNameModule parentModule;
-
- protected ModuleStringIdentityrefCodec(final @NonNull EffectiveModelContext context,
- final @NonNull QNameModule parentModule) {
- this.context = requireNonNull(context);
- this.parentModule = requireNonNull(parentModule);
- }
-
- @Override
- public final EffectiveModelContext getEffectiveModelContext() {
- return context;
- }
-
- protected final QNameModule getParentModule() {
- return parentModule;
- }
-
- @Override
- protected String prefixForNamespace(final XMLNamespace namespace) {
- final var modules = context.findModuleStatements(namespace).iterator();
- return modules.hasNext() ? modules.next().argument().getLocalName() : null;
- }
-}