Graph modelisation for Path Computation Algorithm
[bgpcep.git] / graph / graph-api / src / main / java / org / opendaylight / graph / ConnectedVertex.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 java.util.List;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.Edge;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.Prefix;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.Vertex;
15
16 /**
17  * Connected Vertex class is the connected version of the Vertex class from the graph yang model.
18  *
19  * <p>
20  * It is composed of a reference to the associated Vertex class from the Graph class,
21  * a unique Key identifier in the associated Connected Graph,
22  * and two lists to the associated Connected Edges in the connected Graph: input and output.
23  * <pre>
24  * {@code
25  *                              -------------
26  *                              | Connected |
27  *                         ---->|  Vertex   |---->
28  * Input Connected Edges {  ... | - Key     | ...  } Output Connected Edges
29  *                         ---->| - Vertex  |---->
30  *                              -------------
31  * }
32  * </pre>
33  *
34  * @author Olivier Dugeon
35  * @author Philippe Niger
36  *
37  */
38 public interface ConnectedVertex {
39
40     /**
41      * Returns unique key associated to this Connected Vertex.
42      *
43      * @return Vertex Key
44      */
45     @NonNull Long getKey();
46
47     /**
48      * Returns Vertex associated to this Connected Vertex.
49      *
50      * @return vertex Vertex
51      */
52     @NonNull Vertex getVertex();
53
54     /**
55      * Returns Connected Edges that has for destination the Connected Vertex identified by its key.
56      *
57      * @param destinationKey Unique Key that identify the destination Vertex
58      *
59      * @return List of Connected Edge
60      */
61     List<ConnectedEdge> getEdgeTo(Long destinationKey);
62
63     /**
64      * Returns the list of incoming Edge for this Connected Vertex.
65      *
66      * @return List of Edge
67      */
68     List<Edge> getInputEdges();
69
70     /**
71      * Returns the list of incoming Connected Edge for this Connected Vertex.
72      *
73      * @return List of Connected Edge
74      */
75     List<ConnectedEdge> getInputConnectedEdges();
76
77     /**
78      * Returns the list of outgoing Edge for this Connected Vertex.
79      *
80      * @return List of Edge
81      */
82     List<Edge> getOutputEdges();
83
84     /**
85      * Returns the list of outgoing Connected Edge for this Connected Vertex.
86      *
87      * @return List of Connected Edge
88      */
89     List<ConnectedEdge> getOutputConnectedEdges();
90
91     /**
92      * Return the list of prefix announced by this Connected Vertex. Prefix contains the associated SID when
93      * Segment Routing is enable.
94      *
95      * @return List of Prefix
96      */
97     List<Prefix> getPrefixes();
98
99 }