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

  private final SecuredItem securedItem;
  private final Selector selector;

  public SecuredSelector( final SecuredItem securedItem )
  {
    this(securedItem, new SimpleSelector());
  }
View Full Code Here

              removeRelation(current);
            } catch (Exception ex1) {
              log.warn("could not reconnect surroundings");
            }
            current.removeProperties();
            model.remove(model.listStatements(new SimpleSelector(null, null, current)));
          }
        }
      } 
    }
  }
View Full Code Here

  }

  public void testAll()
  {
    final StmtIterator iter = model.listStatements(new SimpleSelector(null,
        null, (RDFNode) null));
    int i = 0;
    while (iter.hasNext())
    {
      i++;
View Full Code Here

    Assert.assertEquals(6, i);
  }

  public void testFindObject()
  {
    final StmtIterator iter = model.listStatements(new SimpleSelector(null,
        null, RDFS.Resource));
    int i = 0;
    while (iter.hasNext())
    {
      i++;
View Full Code Here

    Assert.assertEquals(2, i);
  }

  public void testFindProperty()
  {
    final StmtIterator iter = model.listStatements(new SimpleSelector(null,
        RDFS.label, (RDFNode) null));
    int i = 0;
    while (iter.hasNext())
    {
      i++;
View Full Code Here

    Assert.assertEquals(2, i);
  }

  public void testFindPropertyAndObject()
  {
    final StmtIterator iter = model.listStatements(new SimpleSelector(null,
        RDF.value, 123));
    int i = 0;
    while (iter.hasNext())
    {
      i++;
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.