Package org.openbel.framework.common.protonetwork.model

Examples of org.openbel.framework.common.protonetwork.model.ProtoEdgeTable.addEdges()


        final TableProtoEdge edge1 = new TableProtoEdge(1, "INCREASES", 2);
        final TableProtoEdge edge2 =
                new TableProtoEdge(1, "DIRECTLY_DECREASES", 3);

        // for statement 0 add both edges in one call
        tbl.addEdges(0, edge1, edge2);

        // we should have one statement (0)
        assertThat(tbl.getStatementEdges().size(), is(1));

        // we should have two edges (0 and 1)
View Full Code Here


        final TableProtoEdge edge1 = new TableProtoEdge(1, "INCREASES", 2);
        final TableProtoEdge edge2 =
                new TableProtoEdge(1, "DIRECTLY_DECREASES", 3);

        // for statement 0 add both edges in subsequent calls
        tbl.addEdges(0, edge1);
        tbl.addEdges(0, edge2);

        // we should have one statement (0)
        assertThat(tbl.getStatementEdges().size(), is(1));
View Full Code Here

        final TableProtoEdge edge2 =
                new TableProtoEdge(1, "DIRECTLY_DECREASES", 3);

        // for statement 0 add both edges in subsequent calls
        tbl.addEdges(0, edge1);
        tbl.addEdges(0, edge2);

        // we should have one statement (0)
        assertThat(tbl.getStatementEdges().size(), is(1));

        // we should have two edges (0 and 1)
View Full Code Here

    public void testDuplicateEdges() {
        final ProtoEdgeTable tbl = new ProtoEdgeTable();

        // for statement 0, add edge triple "1 HAS_COMPONENT 2"
        final TableProtoEdge edge1 = new TableProtoEdge(1, "HAS_COMPONENT", 2);
        tbl.addEdges(0, edge1);

        // for statement 1, add the same edge
        final TableProtoEdge edge2 = new TableProtoEdge(1, "HAS_COMPONENT", 2);
        tbl.addEdges(1, edge2);
View Full Code Here

        final TableProtoEdge edge1 = new TableProtoEdge(1, "HAS_COMPONENT", 2);
        tbl.addEdges(0, edge1);

        // for statement 1, add the same edge
        final TableProtoEdge edge2 = new TableProtoEdge(1, "HAS_COMPONENT", 2);
        tbl.addEdges(1, edge2);

        // we should have two statements (0 and 1)
        assertThat(tbl.getStatementEdges().size(), is(2));

        // we should have two edges (0 and 1)
View Full Code Here

        // add object as term and proto node
        final Term object = stmt.getObject().getTerm();
        final Integer objectIndex = createNode(object, supporting, pn, pnb);

        final ProtoEdgeTable pet = pn.getProtoEdgeTable();
        pet.addEdges(supporting, new ProtoEdgeTable.TableProtoEdge(sourceIndex,
                stmt.getRelationshipType().getDisplayValue(), objectIndex));
    }
}
View Full Code Here

            remappedEdges[i++] = new TableProtoEdge(newSource, edge.getRel(),
                    newTarget);
        }
        ProtoEdgeTable edgeTable = protoNetwork1.getProtoEdgeTable();
        edgeTable.addEdges(newStatementIndex, remappedEdges);
    }

    /**
     * Merge the term into the first {@link ProtoNetwork}
     * <tt>protoNetwork1</tt>.
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.