The LDP servlet

The LDP servlet supports GET requests as described by the W3C Linked Data Platform standard by returning a graph of triples about a named resource. It takes one parameter:

The following example URL retrieves a graph of triples about the John Kennedy, Jr. resource from the sample Kennedys model when running with the personal version of TopBraid Live included with TopBraid Composer.

http://localhost:8083/tbl/ldp?resource=http://topbraid.org/examples/kennedys%23JohnKennedyJr

By default, the LDP servlet returns the information in turtle format. It can also produce output in JSON-LD format, if an Accept header is added to the HTTP request:

Accept: application/ld+json

One of the intentions of LDP is to turn URIs into URLs. In order to accomplish this, a few things need to happen:

One possible solution using the personal version of TopBraid Live could be:

  1. Add an entry to your local hosts file as follows:

    127.0.0.1       topquadrant.com
    
  2. Install Apache HTTP Server on your local machine.

  3. Configure a virtual host in Apache to redirect to your personal TopBraid Live server by adding the following to your your_apache_dir/conf/httpd.conf file :

    LoadModule rewrite_module modules/mod_rewrite.so
    <VirtualHost *:80>
        ServerAdmin webmaster@topquadrant.com
        ServerName topquadrant.com
        ErrorLog "logs/topquadrant.com-error.log"
        CustomLog "logs/topquadrant.com-access.log" common
        <IfModule rewrite_module>
            RewriteEngine on
            RewriteRule ^/?(.*) http://localhost:8083/tbl/ldp?resource=http://%{HTTP_HOST}/$1
       </IfModule>
    </VirtualHost>
    

Note that in TopBraid Live deployments on a local network, DNS will most likely be used for host name resolution. Therefore, your DNS administrator will need to configure the server. Also, the TBL user permissions framework defines which named graphs can be accessed by the currently logged in user.