Examples of LDClient


Examples of org.apache.marmotta.ldclient.services.ldclient.LDClient

    public void testDBPedia() throws Exception {

        ClientConfiguration config = new ClientConfiguration();
        config.addEndpoint(new StanbolEndpoint("DBPedia (Stanbol Cache)","http://dev.iks-project.eu:8080/entityhub/site/dbpedia/","^http://dbpedia\\.org/resource/.*"));

        LDClientService ldclient = new TestLDClient(new LDClient(config));

        Assume.assumeTrue(ldclient.ping("http://dev.iks-project.eu:8080/"));

        String uriBerlin = "http://dbpedia.org/resource/Berlin";
        ClientResponse respBerlin = ldclient.retrieveResource(uriBerlin);
View Full Code Here

Examples of org.apache.marmotta.ldclient.services.ldclient.LDClient

    }
   
    private void genericTestImplementation(Endpoint endpoint, String resource) throws Exception {     
        ClientConfiguration config = new ClientConfiguration();
        config.addEndpoint(endpoint);
        LDClientService ldclient = new TestLDClient(new LDClient(config));
        ClientResponse response = ldclient.retrieveResource(resource);
        RepositoryConnection connection = response.getTriples().getConnection();
        connection.begin();
        Assert.assertTrue(connection.size() > 0);
        connection.commit();
View Full Code Here

Examples of org.apache.marmotta.ldclient.services.ldclient.LDClient

    public void testDBPedia() throws Exception {

        ClientConfiguration config = new ClientConfiguration();
        config.addEndpoint(new SPARQLEndpoint("DBPedia (SPARQL)","http://dbpedia.org/sparql","^http://dbpedia\\.org/resource/.*"));

        LDClientService ldclient = new TestLDClient(new LDClient(config));

        String uriBerlin = "http://dbpedia.org/resource/Berlin";
        ClientResponse respBerlin = ldclient.retrieveResource(uriBerlin);

        RepositoryConnection conBerlin = respBerlin.getTriples().getConnection();
View Full Code Here

Examples of org.apache.marmotta.ldclient.services.ldclient.LDClient

   
    private LDClientService ldclient;

    @Before
    public void setupClient() {
        ldclient = new TestLDClient(new LDClient());
    }
View Full Code Here

Examples of org.apache.marmotta.ldclient.services.ldclient.LDClient

    private static Logger log = LoggerFactory.getLogger(TestMediawikiProvider.class);
   
    @Before
    public void setupClient() {
        ldclient = new TestLDClient(new LDClient());
    }
View Full Code Here

Examples of org.apache.marmotta.ldclient.services.ldclient.LDClient

    private static Logger log = LoggerFactory.getLogger(TestVimeoProvider.class);

    @Before
    public void setupClient() {
        ldclient = new TestLDClient(new LDClient());
    }
View Full Code Here

Examples of org.apache.marmotta.ldclient.services.ldclient.LDClient

    @Before
    public void setupClient() {
        ClientConfiguration config = new ClientConfiguration();
        config.addEndpoint(new DummyEndpoint());

        ldclient = new LDClient(config);
    }
View Full Code Here

Examples of org.apache.marmotta.ldclient.services.ldclient.LDClient

    public LDCache(CacheConfiguration config, LDCachingBackend backend) {
        log.info("Linked Data Caching Service initialising ...");

        this.resourceLocks = new ObjectLocks();
        this.backend  = backend;
        this.ldclient = new LDClient(config.getClientConfiguration());
        this.config   = config;
        this.lock = new ReentrantReadWriteLock();
    }
View Full Code Here

Examples of org.apache.marmotta.ldclient.services.ldclient.LDClient

        lock.writeLock().lock();
        try {
            if(this.ldclient != null) {
                log.info("Reloading LDClient configuration ...");
                this.ldclient.shutdown();
                this.ldclient = new LDClient(config.getClientConfiguration());
            }
        } finally {
            lock.writeLock().unlock();
        }
    }
View Full Code Here

Examples of org.apache.marmotta.ldclient.services.ldclient.LDClient

    private LDClientService ldclient;


    @Before
    public void setupClient() {
        ldclient = new LDClient();
    }
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.