Skip to content

Commit 5e28878

Browse files
committed
dct:modified handling in Graph::post
Removed debug output from XSLT
1 parent c3c75f3 commit 5e28878

6 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/main/java/com/atomgraph/linkeddatahub/resource/Graph.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ public Response post(Model model, @QueryParam("default") @DefaultValue("false")
190190

191191
// is this implemented correctly? The specification is not very clear.
192192
if (log.isDebugEnabled()) log.debug("POST Model to named graph with URI: {}", getURI());
193-
getService().getGraphStoreClient().add(getURI().toString(), model); // append new data to existing model
193+
// First remove old dct:modified values from the triplestore, then add new data
194+
existingModel.createResource(getURI().toString()).removeAll(DCTerms.modified);
195+
getService().getGraphStoreClient().putModel(getURI().toString(), existingModel.add(model)); // replace entire graph to avoid accumulating dct:modified
194196
Model updatedModel = existingModel.add(model);
195197

196198
submitImports(model);

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ exclude-result-prefixes="#all"
346346

347347
<xsl:choose>
348348
<xsl:when test="$obj-value-id">
349-
<xsl:message>ldh:block-object-apply $obj-value-id: <xsl:value-of select="$obj-value-id"/> exists(id($obj-value-id, ixsl:page())): <xsl:value-of select="exists(id($obj-value-id, ixsl:page()))"/></xsl:message>
349+
<xsl:message>ldh:block-object-apply</xsl:message>
350350

351351
<!-- get the optional promise of the object value resource -->
352352
<xsl:variable name="rendered" as="(function(item()?) as map(*))?">

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/query.xsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ exclude-result-prefixes="#all"
174174
<xsl:for-each select="$container//div[contains-token(@class, 'main')]">
175175
<xsl:variable name="header" select="./div/div[@class = 'well']" as="element()"/>
176176

177-
<xsl:message>contains(.): <xsl:value-of select="ixsl:call(ixsl:page(), 'contains', [ . ])"/></xsl:message>
178177
<xsl:result-document href="?." method="ixsl:replace-content">
179178
<xsl:copy-of select="$header"/>
180179

0 commit comments

Comments
 (0)