Skip to content

Commit

Permalink
Use OgJsonReader instead of OboGraphDocumentLoader. Add a depreca…
Browse files Browse the repository at this point in the history
…tion note.
  • Loading branch information
ielis committed Jun 28, 2024
1 parent a793737 commit bf3489a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
/**
* Loads an ontology using the obograph library.
*
* @deprecated use {@link org.geneontology.obographs.core.io.OgJsonReader} instead of <code>OboGraphDocumentLoader</code>.
* {@code OboGraphDocumentLoader} will be removed in <em>3.0.0</em>.
* @author Jules Jacobsen <[email protected]>
*/
// REMOVE(3.0.0)
// Removing this class will remove the last use of `com.fasterxml.jackson` package in `phenol-io`.
@Deprecated(forRemoval = true, since = "2.1.2")
public class OboGraphDocumentLoader {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.monarchinitiative.phenol.base.PhenolRuntimeException;
import org.monarchinitiative.phenol.io.MinimalOntologyLoader;
import org.monarchinitiative.phenol.io.OntologyLoader;
import org.monarchinitiative.phenol.io.obographs.OboGraphDocumentLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -42,8 +41,7 @@ public static GraphDocument loadGraphDocument(InputStream inputStream) {
logger.debug("Looks like a JSON file...");
try {
bufferedStream.reset();
// return OgJsonReader.readInputStream(bufferedStream);
return OboGraphDocumentLoader.loadJson(bufferedStream);
return OgJsonReader.readInputStream(bufferedStream);
} catch (Exception e) {
throw new PhenolRuntimeException("Error loading JSON", e);
}
Expand Down

0 comments on commit bf3489a

Please sign in to comment.