Project Data Model
Project Data Model
For the project page the following data model is in place.
Key | Type | Description |
|---|---|---|
projectId | String | The project ID as specified on project creation, appended to the base URL this forms the project URI |
repositoryId | String | The internal repository ID belonging to the project |
projectName | String | Internal project name as displayed in the PoolParty backend. |
project | ResourceBean | A resource bean holding all project information as VoiD RDF. |
conceptSchemes | List<ResourceBean> | A list of concept schemes, each containing all triples where the scheme is subject. The list is sorted by the title in the project's default language. |
topConcepts | List<ResourceBean> | All top concepts in a list, each resource bean containing all triples where the concept is subject. The list is sorted by the prefLabel in the projects default language. |
topConceptMap | Map<Resource, ResourceBean> | Contains the same beans as topConcepts but in a unsorted map with its URI/BNode as key. This way you can look up details of the top concepts when you iterate through the skos:hasTopConcept values of a concept scheme. |
labels | Map | A map of type <String, String>, holding all localized labels for properties. The key is the property URI from the "data" structure. |
downloads | Map<String, String> | A map with the key being the format name (e.g. "RDF/XML", "N-Triples", "Turtle", "N3", "Trix", "TriG", "BinaryRDF", "N-Quads", "JSON-LD", "RDF/JSON", "RDFa") and the value being the download links to exports that were created in the file system. |
downloadSizes | Map<String, String> | A map with the key being the format name (e.g. "RDF/XML", "N-Triples", "Turtle", "N3", "Trix", "TriG", "BinaryRDF", "N-Quads", "JSON-LD", "RDF/JSON", "RDFa") and the value being the download size of the exports 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. |
Example
This is the code for the content of the default project page (project/html.vm).
<div class="yui-content">
<div id="tab0">
<div class="onecol" about="$project.resource">
<h2>$tools.rdfa.print($project.get($DCTERMSTITLE).get(0), $DCTERMSTITLE, $namespaces)</h2>
<a href="$project.resource">$project.resource</a>
<br/>
<div style="padding:10px">
<table>
<tr>
<td class="project-metadata-left"><a class="hiddenLink" href="$DCTERMSSUBJECT">$labels.get($DCTERMSSUBJECT):</a></td>
<td>$tools.rdfa.print($project.get($DCTERMSSUBJECT).get(0), $DCTERMSSUBJECT, $namespaces)</td>
</tr>
<tr>
<td class="project-metadata-left"><a class="hiddenLink" href="$DCDESCRIPTION">$labels.get($DCDESCRIPTION):</a></td>
<td>$tools.rdfa.print($project.get($DCDESCRIPTION).get(0), $DCDESCRIPTION, $namespaces)</td>
</tr>
<tr>
<td class="project-metadata-left"><a class="hiddenLink" href="$DCMODIFIED">$labels.get($DCMODIFIED):</a></td>
<td>$tools.rdfa.print($project.get($DCMODIFIED).get(0), $DCMODIFIED, $namespaces)</td>
</tr>
<tr>
<td class="project-metadata-left"><a class="hiddenLink" href="$SWNUMBEROFCONCEPTS">$labels.get($SWNUMBEROFCONCEPTS):</a></td>
<td>$tools.rdfa.print($project.get($SWNUMBEROFCONCEPTS).get(0), $SWNUMBEROFCONCEPTS, $namespaces)</td>
</tr>
<tr>
<td class="project-metadata-left"><a class="hiddenLink" href="$DCLANGUAGE">$labels.get($DCLANGUAGE):</a></td>
<td>$tools.rdfa.print($project.get($DCLANGUAGE).get(0), $DCLANGUAGE, $namespaces)</td>
</tr>
</table>
<span rel="rdf:type" href="void:Dataset"/>
</div>
<br/>
<h4>Concept Schemes</h4>
<hr/>
<div style="padding:15px">
<table>
#foreach($conceptScheme in $conceptSchemes)
<tr about="$conceptScheme.resource">
<td class="project-conceptscheme">
<a href="$conceptScheme.resource">
#foreach($title in $conceptScheme.get($DCTITLE))
#if ($title.language == $project.get($DCLANGUAGE).get(0).label) $title.label #end
#end
</a>
</td>
<td>
#if ($conceptScheme.get($DCSUBJECT).get(0))
#foreach($subject in $conceptScheme.get($DCSUBJECT))
#if ($subject.language == $project.get($DCLANGUAGE).get(0).label) $subject.label #end
#end
#end </td>
</tr>
#end
</table>
</div>
<br/>
<h4>Downloads</h4>
<hr/>
<div style="padding:15px">
#foreach($download in $downloads.entrySet())
<span style="float:left; padding-left: 5px; padding-right:5px"><div class="$download.key.toLowerCase().replaceAll('\W','')"><a href="$download.value">$download.key</a></div></span>
#end
</div>
<br/>
<h4>Metadata</h4>
<hr/>
<div style="padding:15px" about="${project.resource}">
<table>
<tr>
<td class="project-metadata-block"><a class="hiddenLink" href="$DCTERMSDATE">$labels.get($DCTERMSDATE):</a></td>
<td>$tools.rdfa.print($project.get($DCTERMSDATE).get(0), $DCTERMSDATE, $namespaces)</td>
</tr>
<tr>
<td class="project-metadata-left"><a class="hiddenLink" href="$DCCREATOR">$labels.get($DCCREATOR):</a></td>
<td>
<ul>
#foreach($value in $project.get($DCCREATOR))
<li>$tools.rdfa.print($value, $DCCREATOR, $namespaces)</li>
#end
</ul>
</td>
</tr>
<tr>
<td class="project-metadata-left"><a class="hiddenLink" href="$DCCONTRIBUTOR">$labels.get($DCCONTRIBUTOR):</a></td>
<td>
<ul>
#foreach($value in $project.get($DCCONTRIBUTOR))
<li>$tools.rdfa.print($value, $DCCONTRIBUTOR, $namespaces)</li>
#end
</ul>
</td>
</tr>
<tr>
<td class="project-metadata-left"><a class="hiddenLink" href="$DCPUBLISHER">$labels.get($DCPUBLISHER):</a></td>
<td>
<ul>
#foreach($value in $project.get($DCPUBLISHER))
<li>$tools.rdfa.print($value, $DCPUBLISHER, $namespaces)</li>
#end
</ul>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>