Skip to content

Commit

Permalink
Merge branch 'uniprot/go/crossref/154'
Browse files Browse the repository at this point in the history
  • Loading branch information
eparejatobes committed Sep 27, 2016
2 parents b337a59 + d7d9c40 commit 8c8c02f
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions src/main/java/com/bio4j/model/UniProtGOGraph.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
/*
# 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 final class UniProtGOGraph<V,E> extends LinkGraph<UniProtGOGraph<V,E>,V,E> {

public UniProtGOGraph(UniProtGraph<V,E> uniProtGraph, GOGraph<V,E> goGraph) {

Expand All @@ -17,5 +22,25 @@ public UniProtGOGraph(UniProtGraph<V,E> uniProtGraph, GOGraph<V,E> goGraph) {

@Override public final UniProtGOGraph<V,E> self() { return this; }

// TODO add edge here
public final class Annotation extends LinkEdge<
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 LinkEdgeType<
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); }
}
}

0 comments on commit 8c8c02f

Please sign in to comment.