Package org.openrdf.model

Examples of org.openrdf.model.Model.filter()


        TestUtil.setResponseStream(method, response);
        return HTTP_OK;
      }
    });
    Model model = primalClient.getResult("topic", "contentSource", 0.6f, 20, 100);
    assertEquals(10, model.filter(null, RDF.TYPE, PRIMAL.CONTENT_ITEM).subjects().size());
    Set<String> refs = new HashSet<String>();
    for(Resource item : model.filter(null, RDF.TYPE, PRIMAL.CONTENT_ITEM).subjects()) {
      final Literal directReference = model.filter(item, DC.RELATION, null).objectLiteral();
      Literal name = model.filter(item, DC.TITLE, null).objectLiteral();
      assertNotNull(directReference);
View Full Code Here


      }
    });
    Model model = primalClient.getResult("topic", "contentSource", 0.6f, 20, 100);
    assertEquals(10, model.filter(null, RDF.TYPE, PRIMAL.CONTENT_ITEM).subjects().size());
    Set<String> refs = new HashSet<String>();
    for(Resource item : model.filter(null, RDF.TYPE, PRIMAL.CONTENT_ITEM).subjects()) {
      final Literal directReference = model.filter(item, DC.RELATION, null).objectLiteral();
      Literal name = model.filter(item, DC.TITLE, null).objectLiteral();
      assertNotNull(directReference);
      assertTrue(refs.add(directReference.stringValue()));
      assertNotNull(name);
View Full Code Here

    });
    Model model = primalClient.getResult("topic", "contentSource", 0.6f, 20, 100);
    assertEquals(10, model.filter(null, RDF.TYPE, PRIMAL.CONTENT_ITEM).subjects().size());
    Set<String> refs = new HashSet<String>();
    for(Resource item : model.filter(null, RDF.TYPE, PRIMAL.CONTENT_ITEM).subjects()) {
      final Literal directReference = model.filter(item, DC.RELATION, null).objectLiteral();
      Literal name = model.filter(item, DC.TITLE, null).objectLiteral();
      assertNotNull(directReference);
      assertTrue(refs.add(directReference.stringValue()));
      assertNotNull(name);
      logger.debug(name.stringValue());
View Full Code Here

    Model model = primalClient.getResult("topic", "contentSource", 0.6f, 20, 100);
    assertEquals(10, model.filter(null, RDF.TYPE, PRIMAL.CONTENT_ITEM).subjects().size());
    Set<String> refs = new HashSet<String>();
    for(Resource item : model.filter(null, RDF.TYPE, PRIMAL.CONTENT_ITEM).subjects()) {
      final Literal directReference = model.filter(item, DC.RELATION, null).objectLiteral();
      Literal name = model.filter(item, DC.TITLE, null).objectLiteral();
      assertNotNull(directReference);
      assertTrue(refs.add(directReference.stringValue()));
      assertNotNull(name);
      logger.debug(name.stringValue());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.