Package org.apache.marmotta.client.clients

Examples of org.apache.marmotta.client.clients.LDPathClient


    }


    @Test
    public void testPath() throws Exception {
        LDPathClient client = new LDPathClient(config);
        try {
          List<RDFNode> result = client.evaluatePath("http://localhost:8080/Marmotta/resource/anna_schmidt", "foaf:knows / foaf:name");
          Assert.assertThat(result, CoreMatchers.<RDFNode> hasItem(hasProperty("content", equalTo("Sepp Huber"))));
        } catch (NotFoundException e) {
          Assert.fail(e.getMessage());
        }
    }
View Full Code Here


    }


    @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

    /**
     * Return a client that allows accessing the LDPath service for evaluating LDPath queries.
     * @return
     */
    public LDPathClient getLDPathClient() {
        return new LDPathClient(config);
    }
View Full Code Here

    /**
     * Return a client that allows accessing the LDPath service for evaluating LDPath queries.
     * @return
     */
    public LDPathClient getLDPathClient() {
        return new LDPathClient(config);
    }
View Full Code Here

TOP

Related Classes of org.apache.marmotta.client.clients.LDPathClient

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.