Graph modelisation for Path Computation Algorithm
[bgpcep.git] / graph / graph-api / src / main / java / org / opendaylight / graph / ConnectedEdge.java
1 /*
2  * Copyright (c) 2019 Orange.  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.graph;
9
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.eclipse.jdt.annotation.Nullable;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.Edge;
13
14 /**
15  * Connected Edge class is the connected version of the Edge class from the graph yang model.
16  *
17  * <p>
18  * It is composed of a reference to the associated Edge class from the Graph class,
19  * a unique Key identifier in the associated Connected Graph,
20  * and two references to the associated Connected Vertex in the connected Graph: source and destination.
21  * <pre>
22  * {@code
23  * ---------------------------                        --------------------------------
24  * | Source Connected Vertex |---- Connected Edge --->| Destination Connected Vertex |
25  * ---------------------------                        --------------------------------
26  * }
27  * </pre>
28  *
29  * @author Olivier Dugeon
30  * @author Philippe Niger
31  */
32 public interface ConnectedEdge {
33     /**
34      * Returns unique key associated to this Connected Edge.
35      *
36      * @return Edge Key
37      */
38     @NonNull Long getKey();
39
40     /**
41      * Returns the Edge from the Graph associated to this connection.
42      *
43      * @return Edge associated to this connection
44      */
45     @NonNull Edge getEdge();
46
47     /**
48      * Returns the source Connected Vertex from the Connected Graph associated to this Connected Edge.
49      *
50      * @return Source Connected Vertex
51      */
52     @Nullable ConnectedVertex getSource();
53
54     /**
55      * Returns the destination Connected Vertex from the Connected Graph associated to this Connected Edge.
56      *
57      * @return Destination Connected Vertex
58      */
59     @Nullable ConnectedVertex getDestination();
60
61 }