Skip to content

Commit

Permalink
feat: ✨ Allow access and traverse BioLink Class Tree Hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinxin90 committed Feb 25, 2021
1 parent 9478d02 commit 4801d67
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import loader from './loader/loader_factory';
import BioLinkClassTree from './class_tree';
import { BioLinkJSON, BioLinkClassTreeObject } from './types/types'

export class BioLink {
private _biolink_json: BioLinkJSON;
private _biolink_class_tree: BioLinkClassTreeObject;

constructor() {
this._biolink_json = {} as BioLinkJSON;
}

async load(source: string = undefined) {
const l = loader(source);
this._biolink_json = await l.load(source);
this._biolink_class_tree = new BioLinkClassTree(this._biolink_json.classes);
this._biolink_class_tree.construct();
}

get classTree() {
return this._biolink_class_tree;
}

get biolinkJSON() {
return this._biolink_json;
}

}

0 comments on commit 4801d67

Please sign in to comment.