Skip to content

Commit

Permalink
Merge pull request #72 from TheJacksonLaboratory/issue-71
Browse files Browse the repository at this point in the history
Issue 71
  • Loading branch information
iimpulse authored Sep 9, 2024
2 parents 14d0100 + 0591b41 commit 099b63a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id("com.dorongold.task-tree") version "3.0.0"
}

version = "0.5.16"
version = "0.5.17"
group = "org.jacksonlaboratory"

repositories {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jacksonlaboratory/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
info = @Info(
title = "ontology-service-${ontology}",
description = "A restful service for the ${ontology} ontology.",
version = "0.5.16",
version = "0.5.17",
contact = @Contact(name = "Michael Gargano", email = "[email protected]")
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public void init() {
log.info(String.format("Loading %s ontology terms..", graphService.ontologyName));
try {
this.termRepository.configure();
List<OntologyTerm> terms = graphService.getOntology().getTerms().stream().distinct().map(term ->
List<OntologyTerm> terms = graphService.getOntology().getTerms().stream().distinct()
.filter(Predicate.not(term -> !term.id().getPrefix().toLowerCase().contains(graphService.ontologyName))).map(term ->
new OntologyTermBuilder(term.id(), term.getName())
.setDefinition(term.getDefinition()).setComment(term.getComment())
.setSynonyms( term.getSynonyms().stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import org.jacksonlaboratory.repository.TermRepository;
import org.jacksonlaboratory.repository.TranslationRepository;
import org.monarchinitiative.phenol.io.MinimalOntologyLoader;
import org.monarchinitiative.phenol.io.OntologyLoader;
import org.monarchinitiative.phenol.io.OntologyLoaderOptions;
import org.monarchinitiative.phenol.io.utils.CurieUtilBuilder;
import org.monarchinitiative.phenol.ontology.data.Identified;
import org.monarchinitiative.phenol.ontology.data.MinimalOntology;
import org.monarchinitiative.phenol.ontology.data.Term;
Expand Down Expand Up @@ -112,7 +115,7 @@ public void initialize() {
log.info(String.format("Loading %s ontology json..", ontologyName));
this.dataResolver = OntologyDataResolver.of(Path.of(directory), this.ontologyName);
File file = new File(dataResolver.ontologyJson().toUri());
this.ontology = MinimalOntologyLoader.loadOntology(file, ontologyName.toUpperCase());
this.ontology = OntologyLoader.loadOntology(file, ontologyName.toUpperCase());
log.info("Finished loading ontology json.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class GraphServiceSpec extends Specification {
when:
def ontology = graphService.getOntology()
then:
ontology.getTerms().size() == 5
ontology.getTerms().size() == 6
}

void 'test graph service get most recent termid'() {
Expand Down

0 comments on commit 099b63a

Please sign in to comment.