/
UniProtGOGraph.java
46 lines (36 loc) · 1.34 KB
/
UniProtGOGraph.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
# UniProt GO annotations
This graph contains an edge connecting a protein with their Gene Ontology annotations (terms).
*/
package com.bio4j.model;
import com.bio4j.angulillos.*;
import com.bio4j.angulillos.Arity.*;
public final class UniProtGOGraph<V,E> extends TypedGraph<UniProtGOGraph<V,E>,V,E> {
public UniProtGOGraph(UniProtGraph<V,E> uniProtGraph, GOGraph<V,E> goGraph) {
super(uniProtGraph.raw());
this.uniProtGraph = uniProtGraph;
this.goGraph = goGraph;
}
public final UniProtGraph<V,E> uniProtGraph;
public final GOGraph<V,E> goGraph;
@Override public final UniProtGOGraph<V,E> self() { return this; }
public final class Annotation extends GenericEdge<
UniProtGraph<V,E>, UniProtGraph<V,E>.Protein,
Annotation,
GOGraph<V,E>, GOGraph<V,E>.Term
>
{
private Annotation(E edge) { super(edge, annotation); }
@Override public final Annotation self() { return this; }
}
public final AnnotationType annotation = new AnnotationType();
public final class AnnotationType extends GenericEdgeType<
UniProtGraph<V,E>, UniProtGraph<V,E>.Protein,
Annotation,
GOGraph<V,E>, GOGraph<V,E>.Term
>
implements FromAny, ToAny {
private AnnotationType() { super(uniProtGraph.protein, goGraph.term); }
@Override public final Annotation fromRaw(E edge) { return new Annotation(edge); }
}
}