Package com.hp.hpl.jena.graph.compose

Examples of com.hp.hpl.jena.graph.compose.DisjointUnion


    public static TestSuite suite()
        { return new TestSuite( TestDisjointUnion.class ); }
   
    public void testEmptyUnion()
        {
        DisjointUnion du = new DisjointUnion( Graph.emptyGraph, Graph.emptyGraph );
        assertEquals( true, du.isEmpty() );
        }
View Full Code Here


        }
   
    public void testLeftUnion()
        {
        Graph g = graphWith( "" );
        testSingleComponent( g, new DisjointUnion( g, Graph.emptyGraph ) );
        }
View Full Code Here

        }
   
    public void testRightUnion()
        {
        Graph g = graphWith( "" );
        testSingleComponent( g, new DisjointUnion( Graph.emptyGraph, g ) );
        }
View Full Code Here

        }
   
    public void testBothComponents()
        {
        Graph L = graphWith( "" ), R = graphWith( "" );
        Graph du = new DisjointUnion( L, R );
        assertIsomorphic( Graph.emptyGraph, du );
        L.add( triple( "x P y" ) );
        assertIsomorphic( graphWith( "x P y" ), du );
        R.add( triple( "A rdf:type Route" ) );
        assertIsomorphic( graphWith( "x P y; A rdf:type Route" ), du );
View Full Code Here

        }
   
    public void testRemoveBoth()
        {
        Graph L = graphWith( "x R y; a P b" ), R = graphWith( "x R y; p Q r" );
        Graph du = new DisjointUnion( L, R );
        du.delete( triple( "x R y" ) );
        assertIsomorphic( graphWith( "a P b" ), L );
        assertIsomorphic( graphWith( "p Q r" ), R );
        }
View Full Code Here

        }
   
    public void testAddLeftOnlyIfNecessary()
        {
        Graph L = graphWith( "" ), R = graphWith( "x R y" );
        Graph du = new DisjointUnion( L, R );
        graphAdd( du, "x R y" );
        assertEquals( true, L.isEmpty() );
        graphAdd( du, " a P b" );
        assertIsomorphic( graphWith( "a P b" ), L );
        assertIsomorphic( graphWith( "x R y" ), R );
View Full Code Here

   
    @Override
  public Graph getGraph()
  {
    Graph gBase = graphWith( "" ), g1 = graphWith( "" );
        return new DisjointUnion( gBase, g1 );
  }
View Full Code Here

  }
 
   
    public void testEmptyUnion()
        {
        DisjointUnion du = new DisjointUnion( Graph.emptyGraph, Graph.emptyGraph );
        assertEquals( true, du.isEmpty() );
        }
View Full Code Here

        }
   
    public void testLeftUnion()
        {
        Graph g = graphWith( "" );
        testSingleComponent( g, new DisjointUnion( g, Graph.emptyGraph ) );
        }
View Full Code Here

        }
   
    public void testRightUnion()
        {
        Graph g = graphWith( "" );
        testSingleComponent( g, new DisjointUnion( Graph.emptyGraph, g ) );
        }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.graph.compose.DisjointUnion

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.