Package org.apache.marmotta.client.clients

Examples of org.apache.marmotta.client.clients.LDPathClient.evaluateProgram()


    @Test
    public void testProgram() throws Exception {
        LDPathClient client = new LDPathClient(config);
      try {
          Map<String, List<RDFNode>> result = client.evaluateProgram("http://localhost:8080/Marmotta/resource/hans_meier", "friend = foaf:knows / foaf:name :: xsd:string; name = foaf:name :: xsd:string; interest   = foaf:interest / (rdfs:label[@en] | rdfs:label[@none] | <http://rdf.freebase.com/ns/type.object.name>[@en]) :: xsd:string;");
          Assert.assertThat(result,hasKey("interest"));
          Assert.assertThat(result.get("interest"), CoreMatchers.<RDFNode> hasItem(hasProperty("content", equalTo("GNU/Linux"))));
      } catch (NotFoundException e) {
        Assert.fail(e.getMessage());
      }
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.