$darkmode
DENOPTIM
VertexQuery.java
Go to the documentation of this file.
1/*
2 * DENOPTIM
3 * Copyright (C) 2019 Marco Foscato <marco.foscato@uib.no>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19package denoptim.graph;
20
21import denoptim.graph.Vertex.BBType;
22import denoptim.graph.Vertex.VertexType;
23
29public class VertexQuery
30{
34 private Long vertexId = null;
35
39 private Integer buildingBlockId = null;
40
44 private BBType buildingBlockType = null;
45
49 private VertexType vertexType = null;
50
54 private Integer level = null;
55
60
65
66//------------------------------------------------------------------------------
67
83 public VertexQuery(Long vID, VertexType vType, BBType bbType,
84 Integer bbID, Integer level, EdgeQuery eIn)
85 {
86 this.vertexId = vID;
87 this.vertexType = vType;
88 this.buildingBlockType = bbType;
89 this.buildingBlockId = bbID;
90 this.level = level;
91 this.incomingEdgeQuery = eIn;
92 this.outgoingEdgeQuery = null;
93 }
94
95//------------------------------------------------------------------------------
96
113 public VertexQuery(Long vID, VertexType vType, BBType bbType,
114 Integer bbID, Integer level, EdgeQuery eIn, EdgeQuery eOut)
115 {
116 this(vID, vType, bbType, bbID, level, eIn);
117 this.outgoingEdgeQuery = eOut;
118 }
119
120//------------------------------------------------------------------------------
121
123 {
124 return vertexType;
125 }
126
127//------------------------------------------------------------------------------
128
129 public Long getVertexIDQuery()
130 {
131 return vertexId;
132 }
133
134//------------------------------------------------------------------------------
135
137 {
138 return buildingBlockType;
139 }
140
141//------------------------------------------------------------------------------
142
143 public Integer getVertexBBIDQuery()
144 {
145 return buildingBlockId;
146 }
147
148//------------------------------------------------------------------------------
149
150 public Integer getVertexLevelQuery()
151 {
152 return level;
153 }
154
155//------------------------------------------------------------------------------
156
158 {
159 return incomingEdgeQuery;
160 }
161
162//------------------------------------------------------------------------------
163
165 {
166 return outgoingEdgeQuery;
167 }
168
169//------------------------------------------------------------------------------
170
171}
A query for edges: a list of properties that target edges should possess in order to match this query...
Definition: EdgeQuery.java:28
Query for searching vertices.
VertexQuery(Long vID, VertexType vType, BBType bbType, Integer bbID, Integer level, EdgeQuery eIn)
Constructor from vertex and edge queries.
VertexType vertexType
Query on type of vertex.
VertexQuery(Long vID, VertexType vType, BBType bbType, Integer bbID, Integer level, EdgeQuery eIn, EdgeQuery eOut)
Constructor from vertex and edge queries.
Long vertexId
Query on unique identifier or null.
Integer level
Query about the level of the vertex.
BBType buildingBlockType
Query on building block type or null.
EdgeQuery outgoingEdgeQuery
Query on the vertex' out coming connections (i.e., vertex id the source)
Integer buildingBlockId
Query on building block in the library of building blocks, or null.
EdgeQuery incomingEdgeQuery
Query on the vertex' incoming connections (i.e., vertex id the target)
The type of building block.
Definition: Vertex.java:86
Flag declaring the type of Vertex implementation.
Definition: Vertex.java:172