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 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

    Assert.assertEquals(2, i);
  }

  public void testFindSubject()
  {
    StmtIterator iter = model.listStatements(new SimpleSelector(null, null,
        RDFS.Resource));
    Assert.assertTrue(iter.hasNext());
    final Resource subject = iter.nextStatement().getSubject();
    iter = model.listStatements(new SimpleSelector(subject, null,
        (RDFNode) null));
    int i = 0;
    while (iter.hasNext())
    {
      i++;
View Full Code Here

  /**
   * A plain SimpleSelector must be simple.
   */
  public void testSimpleIsSimple()
  {
    Assert.assertTrue(new SimpleSelector(null, null, (RDFNode) null)
        .isSimple());
  }
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.