0b9d7c4537facc1a800d3478b2d07bdd5ede9aee
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / ForeignDataNode.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.data.api.schema;
9
10 import com.google.common.annotations.Beta;
11 import javax.xml.transform.dom.DOMSource;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
14
15 /**
16  * A NormalizedNode holding a value in some foreign object model. The object model is identified by a single class,
17  * which must be the superclass of (or interface implemented by) all objects used to anchor that object model into
18  * NormalizedNode model.
19  *
20  * <p>
21  * This interface should not be implemented directly, but rather further specialized, like {@link AnyxmlNode}.
22  *
23  * @param <K> Local identifier of node
24  * @param <V> Value type, uniquely identifying the object model used for values
25  */
26 @Beta
27 public interface ForeignDataNode<K extends PathArgument, V> extends DataContainerChild<K, V> {
28     /**
29      * Return the object model class, which identifies it. For example {@link DOMSourceAnyxmlNode}
30      * uses {@link DOMSource} as its value object model.
31      *
32      * @return Object model class
33      */
34     @NonNull Class<V> getValueObjectModel();
35 }