private Iterable<Edge> getOutEdges(final String... labels) {
if (this.rawVertex instanceof Resource) {
if (labels.length == 0) {
return new SailEdgeIterable((Resource) this.rawVertex, null, null, this.graph);
} else if (labels.length == 1) {
return new SailEdgeIterable((Resource) this.rawVertex, new URIImpl(this.graph.expandPrefix(labels[0])), null, this.graph);
} else {
final List<Iterable<Edge>> edges = new ArrayList<Iterable<Edge>>();
for (final String label : labels) {
edges.add(new SailEdgeIterable((Resource) this.rawVertex, new URIImpl(this.graph.expandPrefix(label)), null, this.graph));
}
return new MultiIterable<Edge>(edges);
}
} else {
return Collections.emptyList();