Package com.tinkerpop.frames.domain.incidences

Examples of com.tinkerpop.frames.domain.incidences.CreatedBy


    public void testGettingDomainAndRange() {

        assertEquals(marko, knows.getDomain());
        assertEquals(vadas, knows.getRange());

        CreatedBy createdBy = lop.getCreatedBy().iterator().next();
        assertEquals(lop, createdBy.getDomain());
        assertTrue(createdBy.getRange().equals(marko) || createdBy.getRange().equals(peter) || createdBy.getRange().equals(josh));
       
        Created created = marko.getCreated().iterator().next();
        //Please note: the below results are actually incorrect: the domain and range are incorrectly tagged
        // in Created for usage with @Incidence. I'm not going to fix that in the test-cases as Domain and
        // Range are deprecated now. The incorrect annotations probable show better than anything that
View Full Code Here


     * Use deprecated Domain/Range annotations on edge
     */
    @Test
    public void testAddIncidenceInDeprecated() {
        Project rdfAgents = framedGraph.addVertex(null, Project.class);
        CreatedBy createdBy = rdfAgents.addCreatedByPersonIncidence(marko);
          
        assertEquals(marko, createdBy.getRange());
        assertEquals(rdfAgents, createdBy.getDomain());
        assertEquals(marko, getOnlyElement(rdfAgents.getCreatedByPeople()));
    }
View Full Code Here

        CreatedInfo markoCreatedLopInfo = framedGraph.getEdge(9, CreatedInfo.class);
        assertEquals(markoCreatedLopInfo.getWeight(), 0.4f, 0.1f);
        //Same with using deprecated Domain/Range annotations:
        Created markoCreatedLop = framedGraph.getEdge(9, Direction.OUT, Created.class);
        assertEquals(markoCreatedLop.getWeight(), 0.4f, 0.1f);
        CreatedBy lopCreatedByMarko = framedGraph.getEdge(9, Direction.IN, CreatedBy.class);
        assertEquals(lopCreatedByMarko.getWeight(), 0.4f, 0.1f);

        Person temp = framedGraph.frame(graph.addVertex(null), Person.class);
        assertNull(temp.getName());
        assertNull(temp.getAge());
View Full Code Here

TOP

Related Classes of com.tinkerpop.frames.domain.incidences.CreatedBy

Copyright © 2018 www.massapicom. 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.