예제 #1
0
 public BigdataGraphQuery(final BigdataGraph graph) {
   this.graph = graph;
   this.TYPE = graph.getValueFactory().getTypeURI();
   this.VERTEX = graph.getValueFactory().getVertexURI();
   this.EDGE = graph.getValueFactory().getEdgeURI();
   this.LABEL = graph.getValueFactory().getLabelURI();
 }
예제 #2
0
 /**
  * Execute the query and return the vertices on the other end of the matching edges.
  *
  * @return the unfiltered adjacent vertices
  */
 @Override
 public Iterable<Vertex> vertices() {
   try {
     final String queryStr = toQueryStr(VERTEX);
     return graph.getVertices(queryStr, true);
   } catch (RuntimeException ex) {
     throw ex;
   } catch (Exception ex) {
     throw new RuntimeException(ex);
   }
 }
예제 #3
0
 /**
  * Execute the query and return the matching edges.
  *
  * @return the unfiltered incident edges
  */
 @Override
 public Iterable<Edge> edges() {
   try {
     final String queryStr = toQueryStr(EDGE);
     return graph.getEdges(queryStr);
   } catch (RuntimeException ex) {
     throw ex;
   } catch (Exception ex) {
     throw new RuntimeException(ex);
   }
 }