// get ports from graph
if (graph == null) {
return new ArrayList<String>();
} else {
Set<Vertex> vertices = graph.vertexSet();
List<String> ports = new ArrayList<String>();
for (Vertex vertex : vertices) {
// check the vertex type against all accepted port types.
for (String portType : portTypes) {
if (vertex.getType().getName().equals(portType)) {