Package com.hp.hpl.jena.rdf.model

Examples of com.hp.hpl.jena.rdf.model.SimpleSelector


  }

  public void testQueryWithNullSelector()
  {
    int count = 0;
    final Model mm = model.query(new SimpleSelector(null, null,
        (RDFNode) null));
    final StmtIterator iter = mm.listStatements();
    try
    {
      while (iter.hasNext())
View Full Code Here


  public void testQueryWithPredicateSelector()
  {
    Statement stmt;
    int count = 0;
    final Model mm = model.query(new SimpleSelector(null, predicate[1],
        (RDFNode) null));
    final StmtIterator iter = mm.listStatements();
    try
    {
      while (iter.hasNext())
View Full Code Here

  public void testQueryWithRDFSelector()
  {
    Statement stmt;
    int count = 0;
    final Model mm = model.query(new SimpleSelector(null, null, model
        .createTypedLiteral(false)));
    final StmtIterator iter = mm.listStatements();
    try
    {
      while (iter.hasNext())
View Full Code Here

  public void testQueryWithSubjectSelector()
  {
    Statement stmt;
    int count = 0;
    final Model mm = model.query(new SimpleSelector(subject[0], null,
        (RDFNode) null));
    final StmtIterator iter = mm.listStatements();
    try
    {
      while (iter.hasNext())
View Full Code Here

  public void testListStatementsClever()
  {

    ModelHelper.modelAdd(model, "S P O; S P O2; S P2 O; S2 P O");
    final Selector sel = new SimpleSelector(null, null, (RDFNode) null) {
      @Override
      public boolean isSimple()
      {
        return false;
      }
View Full Code Here

        GraphTestBase.iteratorToSet(r.listProperties().mapWith(
            Statement.Util.getSubject)));
    //
    r.removeProperties();
    Assert.assertEquals(0,
        model.query(new SimpleSelector(r, null, (RDFNode) null)).size());
  }
View Full Code Here

    super(modelFactory, name);
  }

  public void check( final Resource S, final Property P, final RDFNode O )
  {
    final Selector s = new SimpleSelector(S, P, O);
    Assert.assertTrue(s.isSimple());
    Assert.assertEquals(S, s.getSubject());
    Assert.assertEquals(P, s.getPredicate());
    Assert.assertEquals(O, s.getObject());
  }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.rdf.model.SimpleSelector

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.