Skip to main content

Server Data Model

Abstract

Server Data Model

For the server page the following data model is in place.

Key

Type

Description

downloads

Map<Resource, Map<String, String>>

A map with the key being the project URI.

The inner map has the format name (e.g. "RDF/XML", "N-Triples", "Turtle", "N3", "Trix", "TriG", "BinaryRDF", "N-Quads", "JSON-LD", "RDF/JSON", "RDFa") as key

and as value the download link to the export file.

downloadSizes

Map<Resource, Map<String, String>>

A map with the key being the project URI.

The inner map has the format name (e.g. "RDF/XML", "N-Triples", "Turtle", "N3", "Trix", "TriG", "BinaryRDF", "N-Quads", "JSON-LD", "RDF/JSON", "RDFa") as key

and as value the size of the download file.

view

String

The requested view on the resource. (e.g. html)

request

HttpServletRequest

The HttpServletRequest object of the current request.

frontend

FrontendSetup

A bean of type at.punkt.PoolParty.Configuration.frontend.FrontendSetup

holding the frontend configuration (access level, tabs, etc.) of this installation.

namespaces

List

A list of org.openrdf.model.Namespace objects that are configured for this PoolParty installation.

The namespaces are loaded from the namespaces.ttl file in the resourceRoot.

projects

List<ResourceBean>

All public projects on the server in a list (see key "project" in Project Data Model)

Example

This is the code of the content of the default server page (server.vm).

<div class="yui-content">
    <h2>PoolParty Server</h2>
    <br/>
    <p>The following linked data projects are hosted on this server.</p>
    <br/>
    <div class="onecol">
#foreach($projectBean in $projects)
#if ($projectBean.get($DCTERMSTITLE))
#if ($even == "even")
#set($even = "odd")
#else
#set($even = "even")
#end
#set($p = $projectBean.resource)
        <div about="$projectBean.resource" class="$even">
            <div style="width: 350px; float: left; ">
                <div><a href="$projectBean.resource"><b>$tools.rdfa.print($projectBean.get($DCTERMSTITLE).get(0), $DCTERMSTITLE, $namespaces)</b></a></div>
                <div> $tools.rdfa.print($projectBean.get($DCTERMSSUBJECT).get(0), $DCTERMSSUBJECT, $namespaces)</div>
#if ($projectBean.get($DCMODIFIED).get(0))
                <div style="color: #666">Last Modified: $tools.rdfa.print($projectBean.get($DCMODIFIED).get(0), $DCMODIFIED, $namespaces)</div>
#end
#if ($projectBean.get($SWNUMBEROFCONCEPTS))
                <div style="color: #666">Concepts: $projectBean.get($SWNUMBEROFCONCEPTS).get(0).label</div>
#end
            </div>
            <div style="width:200px; float: right">
                <p><b>Downloads</b></p>
#if ($downloads.get($p))
#foreach($download in $downloads.get($p).entrySet())
                <div class="$download.key.toLowerCase().replaceAll('\W','')"><a href="$download.value">$download.key</a></div>
#end
#end
            </div>
            <div style="clear:both;margin:0;padding:0;height:0;line-height:0"></div>
        </div>
    <br/>
#end
#end
    </div>
</div>