Skip to content

Commit

Permalink
add progress printouts to reified property annotator
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesamcl committed Oct 19, 2024
1 parent a754d90 commit 106d68c
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import uk.ac.ebi.rdf2json.properties.PropertyValueURI;

import java.util.List;
import java.util.stream.Collectors;

public class ReifiedPropertyAnnotator {

Expand All @@ -17,8 +18,19 @@ public class ReifiedPropertyAnnotator {
public static void annotateReifiedProperties(OntologyGraph graph) {

long startTime3 = System.nanoTime();
for(String id : graph.nodes.keySet()) {
OntologyNode c = graph.nodes.get(id);

var nodes = graph.nodes.keySet().stream()
.map((String id) -> { return graph.nodes.get(id); })
.filter(c -> c.types.contains(OntologyNode.NodeType.AXIOM))
.collect(Collectors.toList());

logger.info("ReifiedPropertyAnnotator: processing {} axiom nodes", nodes.size());
int n = 0;
for(OntologyNode c : nodes) {
++ n;
if(n % 1000 == 0) {
logger.info("ReifiedPropertyAnnotator: processed {} of {} axiom nodes", n, nodes.size());
}
if (c.types.contains(OntologyNode.NodeType.AXIOM)) {

PropertyValue source = c.properties.getPropertyValue("http://www.w3.org/2002/07/owl#annotatedSource");
Expand Down

0 comments on commit 106d68c

Please sign in to comment.