@Test public void allPropertiesProject() { TinkerGraph graph = new TinkerGraph(); Vertex v = graph.addVertex(1); v.setProperty(CommonProperties.IRI, "http: v.setProperty("foo", "fizz"); v.setProperty("bar", "baz"); TinkerGraphUtil tgu = new TinkerGraphUtil(graph, curieUtil); tgu.project(newHashSet("*")); assertThat(v.getPropertyKeys(), containsInAnyOrder("foo", "bar", CommonProperties.IRI)); }
public void project(Collection<String> projection) { if (projection.contains("*")) { return; } for (Vertex vertex : graph.getVertices()) { for (String key : vertex.getPropertyKeys()) { if (!projection.contains(key) && !PROTECTED_PROPERTY_KEYS.contains(key)) { vertex.removeProperty(key); } } } }
TinkerGraphUtil { public void project(Collection<String> projection) { if (projection.contains("*")) { return; } for (Vertex vertex : graph.getVertices()) { for (String key : vertex.getPropertyKeys()) { if (!projection.contains(key) && !PROTECTED_PROPERTY_KEYS.contains(key)) { vertex.removeProperty(key); } } } } }
TinkerGraphUtil { public void project(Collection<String> projection) { if (projection.contains("*")) { return; } for (Vertex vertex : graph.getVertices()) { for (String key : vertex.getPropertyKeys()) { if (!projection.contains(key) && !PROTECTED_PROPERTY_KEYS.contains(key)) { vertex.removeProperty(key); } } } } @Inject  TinkerGraphUtil(CurieUtil curieUtil);  TinkerGraphUtil(Graph graph, CurieUtil curieUtil); }
TinkerGraphUtil { public void project(Collection<String> projection) { if (projection.contains("*")) { return; } for (Vertex vertex : graph.getVertices()) { for (String key : vertex.getPropertyKeys()) { if (!projection.contains(key) && !PROTECTED_PROPERTY_KEYS.contains(key)) { vertex.removeProperty(key); } } } } @Inject  TinkerGraphUtil(CurieUtil curieUtil);  TinkerGraphUtil(Graph graph, CurieUtil curieUtil); CurieUtil getCurieUtil(); Graph getGraph(); void setGraph(Graph graph); Element addElement(PropertyContainer container); void addPath(Iterable<PropertyContainer> path); Element addElement(Element element); void addGraph(Graph addition); Graph combineGraphs(Graph graph2); Graph resultToGraph(Result result); static Optional<T> getProperty(Element container, String property, Class<T> type); static Collection<T> getProperties(Element container, String property, Class<T> type); void project(Collection<String> projection); }
TinkerGraphUtil { public void project(Collection<String> projection) { if (projection.contains("*")) { return; } for (Vertex vertex : graph.getVertices()) { for (String key : vertex.getPropertyKeys()) { if (!projection.contains(key) && !PROTECTED_PROPERTY_KEYS.contains(key)) { vertex.removeProperty(key); } } } } @Inject  TinkerGraphUtil(CurieUtil curieUtil);  TinkerGraphUtil(Graph graph, CurieUtil curieUtil); CurieUtil getCurieUtil(); Graph getGraph(); void setGraph(Graph graph); Element addElement(PropertyContainer container); void addPath(Iterable<PropertyContainer> path); Element addElement(Element element); void addGraph(Graph addition); Graph combineGraphs(Graph graph2); Graph resultToGraph(Result result); static Optional<T> getProperty(Element container, String property, Class<T> type); static Collection<T> getProperties(Element container, String property, Class<T> type); void project(Collection<String> projection);  }