@Test public void nonFoundCuriesAreIgnored() { Vertex v = graph.addVertex(null); adder.addCuries(graph); assertThat(v.getPropertyKeys(), not(contains(CommonProperties.CURIE))); }
void addCuries(Graph graph) { for (Vertex vertex: graph.getVertices()) { String iri = (String)vertex.getProperty(CommonProperties.IRI); Optional<String> curie = curieUtil.getCurie(iri); if (curie.isPresent()) { vertex.setProperty(CommonProperties.CURIE, curie.get()); } } }
CurieAdder implements MethodInterceptor { void addCuries(Graph graph) { for (Vertex vertex: graph.getVertices()) { String iri = (String)vertex.getProperty(CommonProperties.IRI); Optional<String> curie = curieUtil.getCurie(iri); if (curie.isPresent()) { vertex.setProperty(CommonProperties.CURIE, curie.get()); } } } }
CurieAdder implements MethodInterceptor { void addCuries(Graph graph) { for (Vertex vertex: graph.getVertices()) { String iri = (String)vertex.getProperty(CommonProperties.IRI); Optional<String> curie = curieUtil.getCurie(iri); if (curie.isPresent()) { vertex.setProperty(CommonProperties.CURIE, curie.get()); } } }  }
CurieAdder implements MethodInterceptor { void addCuries(Graph graph) { for (Vertex vertex: graph.getVertices()) { String iri = (String)vertex.getProperty(CommonProperties.IRI); Optional<String> curie = curieUtil.getCurie(iri); if (curie.isPresent()) { vertex.setProperty(CommonProperties.CURIE, curie.get()); } } }  @Override Object invoke(MethodInvocation invocation); }
CurieAdder implements MethodInterceptor { void addCuries(Graph graph) { for (Vertex vertex: graph.getVertices()) { String iri = (String)vertex.getProperty(CommonProperties.IRI); Optional<String> curie = curieUtil.getCurie(iri); if (curie.isPresent()) { vertex.setProperty(CommonProperties.CURIE, curie.get()); } } }  @Override Object invoke(MethodInvocation invocation);  }