Package com.hp.hpl.jena.rdf.listeners

Examples of com.hp.hpl.jena.rdf.listeners.ChangedListener


    SL.assertHas(new Object[] { "addList", L });
  }

  public void testChangedListener()
  {
    final ChangedListener CL = new ChangedListener();
    model.register(CL);
    Assert.assertFalse(CL.hasChanged());
    model.add(ModelHelper.statement(model, "S P O"));
    Assert.assertTrue(CL.hasChanged());
    Assert.assertFalse(CL.hasChanged());
    model.remove(ModelHelper.statement(model, "ab CD ef"));
    Assert.assertTrue(CL.hasChanged());
    model.add(ModelHelper.statements(model, "gh IJ kl"));
    Assert.assertTrue(CL.hasChanged());
    model.remove(ModelHelper.statements(model, "mn OP qr"));
    Assert.assertTrue(CL.hasChanged());
    model.add(asIterator(ModelHelper.statements(model, "st UV wx")));
    Assert.assertTrue(CL.hasChanged());
    Assert.assertFalse(CL.hasChanged());
    model.remove(asIterator(ModelHelper.statements(model, "yz AB cd")));
    Assert.assertTrue(CL.hasChanged());
    model.add(ModelHelper.modelWithStatements(this, "ef GH ij"));
    Assert.assertTrue(CL.hasChanged());
    model.remove(ModelHelper.modelWithStatements(this, "kl MN op"));
    Assert.assertTrue(CL.hasChanged());
    model.add(Arrays.asList(ModelHelper.statements(model, "rs TU vw")));
    Assert.assertTrue(CL.hasChanged());
    model.remove(Arrays.asList(ModelHelper.statements(model, "xy wh q")));
    Assert.assertTrue(CL.hasChanged());
  }
View Full Code Here


    SL.assertHas(new Object[] { "addList", L });
  }

  public void testChangedListener()
  {
    final ChangedListener CL = new ChangedListener();
    model.register(CL);
    Assert.assertFalse(CL.hasChanged());
    model.add(ModelHelper.statement(model, "S P O"));
    Assert.assertTrue(CL.hasChanged());
    Assert.assertFalse(CL.hasChanged());
    model.remove(ModelHelper.statement(model, "ab CD ef"));
    Assert.assertTrue(CL.hasChanged());
    model.add(ModelHelper.statements(model, "gh IJ kl"));
    Assert.assertTrue(CL.hasChanged());
    model.remove(ModelHelper.statements(model, "mn OP qr"));
    Assert.assertTrue(CL.hasChanged());
    model.add(asIterator(ModelHelper.statements(model, "st UV wx")));
    Assert.assertTrue(CL.hasChanged());
    Assert.assertFalse(CL.hasChanged());
    model.remove(asIterator(ModelHelper.statements(model, "yz AB cd")));
    Assert.assertTrue(CL.hasChanged());
    model.add(ModelHelper.modelWithStatements(this, "ef GH ij"));
    Assert.assertTrue(CL.hasChanged());
    model.remove(ModelHelper.modelWithStatements(this, "kl MN op"));
    Assert.assertTrue(CL.hasChanged());
    model.add(Arrays.asList(ModelHelper.statements(model, "rs TU vw")));
    Assert.assertTrue(CL.hasChanged());
    model.remove(Arrays.asList(ModelHelper.statements(model, "xy wh q")));
    Assert.assertTrue(CL.hasChanged());
  }
View Full Code Here

    SL.assertHas(new Object[] { "addList", L });
  }

  public void testChangedListener()
  {
    final ChangedListener CL = new ChangedListener();
    model.register(CL);
    Assert.assertFalse(CL.hasChanged());
    model.add(ModelHelper.statement(model, "S P O"));
    Assert.assertTrue(CL.hasChanged());
    Assert.assertFalse(CL.hasChanged());
    model.remove(ModelHelper.statement(model, "ab CD ef"));
    Assert.assertTrue(CL.hasChanged());
    model.add(ModelHelper.statements(model, "gh IJ kl"));
    Assert.assertTrue(CL.hasChanged());
    model.remove(ModelHelper.statements(model, "mn OP qr"));
    Assert.assertTrue(CL.hasChanged());
    model.add(asIterator(ModelHelper.statements(model, "st UV wx")));
    Assert.assertTrue(CL.hasChanged());
    Assert.assertFalse(CL.hasChanged());
    model.remove(asIterator(ModelHelper.statements(model, "yz AB cd")));
    Assert.assertTrue(CL.hasChanged());
    model.add(ModelHelper.modelWithStatements(this, "ef GH ij"));
    Assert.assertTrue(CL.hasChanged());
    model.remove(ModelHelper.modelWithStatements(this, "kl MN op"));
    Assert.assertTrue(CL.hasChanged());
    model.add(Arrays.asList(ModelHelper.statements(model, "rs TU vw")));
    Assert.assertTrue(CL.hasChanged());
    model.remove(Arrays.asList(ModelHelper.statements(model, "xy wh q")));
    Assert.assertTrue(CL.hasChanged());
  }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.rdf.listeners.ChangedListener

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.