Skip to content

Commit 0aeb234

Browse files
authored
Develop (#224)
* README update * CHANGELOG update * decontainer setup * Inline nginx and Varnish config templates into docker-compose.yml SaxonJS 3 bump to beta-2 * ssl_verify_client fix * Removed user-supplied `dct:created` values * CHANGELOG update * Fixed XSLT SEF generation in Maven build * Removed comment * [maven-release-plugin] prepare release linkeddatahub-5.0.15 * [maven-release-plugin] prepare for next development iteration * Javadoc fixes * Updated CHANGELOG * More Javadoc fixes * Comment fix * Fixed owl:NamedIndividual case in `.add-constructor` onclick * Removed the unused `ldh:createGraph` property * Replacing `xsl:value-of` * Fixed default datasets to use `ldh:ChildrenView` * Fixed client-side `ldh:base` function External URI hyperlinks now show `⤴` * Fix for multiple factory promises per top-level `<div>` * `@id` value fix * Refactored date/datetime comparison logic Ignore `$object-metadata` loading errors * Removed debug output * Map and chart mode fixes for general Linked Data objects in content mode * Fixed SNAPSHOT version Updated changelog
1 parent 771867d commit 0aeb234

File tree

20 files changed

+150
-100
lines changed

20 files changed

+150
-100
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
[5.0.17] - 2025-06-23
2+
### Changed
3+
- Replaced `xsl:value-of` usage in XSLT stylesheets
4+
- Removed debug output for cleaner production logs
5+
6+
### Fixed
7+
- Fixed map and chart mode rendering for general Linked Data objects in content mode
8+
- Refactored date/datetime comparison logic for improved accuracy
9+
- Fixed `@id` value handling in client-side processing
10+
- Fixed multiple factory promises per top-level `<div>` element
11+
- Fixed client-side `ldh:base` function
12+
- Fixed default datasets to use `ldh:ChildrenView`
13+
- Fixed `owl:NamedIndividual` case in `.add-constructor` onclick handler
14+
15+
### Removed
16+
- Removed the unused ldh:createGraph property
117

218
## [5.0.16] - 2025-06-15
319
## Added

platform/datasets/admin.trig

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@
1919
rdf:_1 <#select-children> .
2020

2121
<#select-children> a ldh:Object ;
22-
rdf:value <#select-children-view> .
23-
24-
<#select-children-view> a ldh:View ;
25-
spin:query ldh:SelectChildren .
22+
rdf:value ldh:ChildrenView .
2623

2724
}
2825

@@ -496,8 +493,8 @@ WHERE
496493
dct:description "Manage agents, user accounts and authorizations" ;
497494
rdf:_1 <acl/#select-children> .
498495

499-
<acl/#select-children> a ldh:View ;
500-
spin:query ldh:SelectChildren .
496+
<acl/#select-children> a ldh:Object ;
497+
rdf:value ldh:ChildrenView .
501498

502499
}
503500

@@ -510,8 +507,8 @@ WHERE
510507
dct:description "Manage who has access to which resources" ;
511508
rdf:_1 <acl/authorizations/#select-children> .
512509

513-
<acl/authorizations/#select-children> a ldh:View ;
514-
spin:query ldh:SelectChildren .
510+
<acl/authorizations/#select-children> a ldh:Object ;
511+
rdf:value ldh:ChildrenView .
515512

516513
}
517514

@@ -524,8 +521,8 @@ WHERE
524521
dct:description "Manage requests for access" ;
525522
rdf:_1 <acl/authorization-requests/#select-children> .
526523

527-
<acl/authorization-requests/#select-children> a ldh:View ;
528-
spin:query ldh:SelectChildren .
524+
<acl/authorization-requests/#select-children> a ldh:Object ;
525+
rdf:value ldh:ChildrenView .
529526

530527
}
531528

@@ -538,8 +535,8 @@ WHERE
538535
dct:description "Manage people and software agents that have access" ;
539536
rdf:_1 <acl/agents/#select-children> .
540537

541-
<acl/agents/#select-children> a ldh:View ;
542-
spin:query ldh:SelectChildren .
538+
<acl/agents/#select-children> a ldh:Object ;
539+
rdf:value ldh:ChildrenView .
543540

544541
}
545542

@@ -552,8 +549,8 @@ WHERE
552549
dct:description "Manage RSA public keys" ;
553550
rdf:_1 <acl/public-keys/#select-children> .
554551

555-
<acl/public-keys/#select-children> a ldh:View ;
556-
spin:query ldh:SelectChildren .
552+
<acl/public-keys/#select-children> a ldh:Object ;
553+
rdf:value ldh:ChildrenView .
557554

558555
}
559556

@@ -566,8 +563,8 @@ WHERE
566563
dct:description "Manage agent user accounts and credentials" ;
567564
rdf:_1 <acl/users/#select-children> .
568565

569-
<acl/users/#select-children> a ldh:View ;
570-
spin:query ldh:SelectChildren .
566+
<acl/users/#select-children> a ldh:Object ;
567+
rdf:value ldh:ChildrenView .
571568

572569
}
573570

@@ -580,8 +577,8 @@ WHERE
580577
dct:description "Manage agent groups that have access" ;
581578
rdf:_1 <acl/groups/#select-children> .
582579

583-
<acl/groups/#select-children> a ldh:View ;
584-
spin:query ldh:SelectChildren .
580+
<acl/groups/#select-children> a ldh:Object ;
581+
rdf:value ldh:ChildrenView .
585582

586583
}
587584

@@ -881,8 +878,8 @@ WHERE
881878
dct:description "Manage ontologies that define application domain" ;
882879
rdf:_1 <ontologies/#select-children> .
883880

884-
<ontologies/#select-children> a ldh:View ;
885-
spin:query ldh:SelectChildren .
881+
<ontologies/#select-children> a ldh:Object ;
882+
rdf:value ldh:ChildrenView .
886883

887884
}
888885

platform/datasets/end-user.trig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@
1919
rdf:_1 <#select-children> .
2020

2121
<#select-children> a ldh:Object ;
22-
rdf:value <#select-children-view> .
23-
24-
<#select-children-view> a ldh:View ;
25-
spin:query ldh:SelectChildren .
22+
rdf:value ldh:ChildrenView .
2623

2724
}
2825

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>com.atomgraph</groupId>
55
<artifactId>linkeddatahub</artifactId>
6-
<version>5.0.16-SNAPSHOT</version>
6+
<version>5.0.17-SNAPSHOT</version>
77
<packaging>${packaging.type}</packaging>
88

99
<name>AtomGraph LinkedDataHub</name>

src/main/java/com/atomgraph/linkeddatahub/vocabulary/LDH.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,8 @@ public static String getURI()
9898
/** Request URI property */
9999
public static final ObjectProperty requestUri = m_model.createObjectProperty(NS + "requestUri");
100100

101-
/** Create graph property */
102-
public static final DatatypeProperty createGraph = m_model.createDatatypeProperty( NS + "createGraph" );
103-
104-
105101
/** Service property */
106-
public static final DatatypeProperty service = m_model.createDatatypeProperty( NS + "service" );
102+
public static final ObjectProperty service = m_model.createObjectProperty( NS + "service" );
107103

108104
/**
109105
* For shape property */

src/main/java/com/atomgraph/linkeddatahub/writer/XSLTWriterBase.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ public <T extends XdmValue> Map<QName, XdmValue> getParameters(MultivaluedMap<St
159159
params.put(new QName("acl", ACL.mode.getNameSpace(), ACL.mode.getLocalName()),
160160
XdmValue.makeSequence(getAuthorizationContext().get().get().getModeURIs()));
161161

162-
if (getUriInfo().getQueryParameters().containsKey(LDH.createGraph.getLocalName()))
163-
params.put(new QName("ldh", LDH.createGraph.getNameSpace(), LDH.createGraph.getLocalName()),
164-
new XdmAtomicValue(Boolean.parseBoolean(getUriInfo().getQueryParameters().getFirst(LDH.createGraph.getLocalName()))));
165-
166162
// TO-DO: move to client-side?
167163
if (getUriInfo().getQueryParameters().containsKey(LDH.access_to.getLocalName()))
168164
params.put(new QName("ldh", LDH.access_to.getNameSpace(), LDH.access_to.getLocalName()),

src/main/resources/com/atomgraph/linkeddatahub/app/admin/adm.ttl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ owl:Ontology spin:constructor [
7070
ldh:template :OntologyClassView .
7171

7272
:OntologyClassView a ldh:View ;
73-
dct:title "Ontology class view" ;
73+
dct:title "Ontology classes" ;
7474
spin:query :SelectOntologyClasses ;
7575
ac:mode ac:TableMode ;
7676
rdfs:isDefinedBy : .
@@ -219,7 +219,7 @@ acl:Authorization spin:constructor [
219219
ldh:template :AuthorizationAgentView .
220220

221221
:AuthorizationAgentView a ldh:View ;
222-
dct:title "Authorization agent view" ;
222+
dct:title "Authorization agents" ;
223223
spin:query :SelectAuthorizationAgents ;
224224
rdfs:isDefinedBy : .
225225

src/main/webapp/static/com/atomgraph/linkeddatahub/css/bootstrap.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ ul.dropdown-menu ul { margin: 0; }
3131
.btn.btn-primary.create-action { background-image: url('../icons/ic_note_add_white_24px.svg'); background-position: 12px center; background-repeat: no-repeat; padding-left: 40px; /* height: 30px; */ }
3232
.btn.create-action, a.create-action { background-image: url('../icons/ic_note_add_black_24px.svg'); background-position: 12px center; background-repeat: no-repeat; padding-left: 40px; /* height: 30px; */ }
3333
button.btn.create-action { height: 30px; }
34+
a.external::after { content: "⤴"; padding-left: 0.2em; }
3435
a.btn.create-action { height: 20px; }
3536
.create-resource .btn.create-action { margin-top: 1em; }
3637
.btn-group.open .btn.dropdown-toggle.create-action { background-image: url('../icons/ic_note_add_black_24px.svg'); }

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ exclude-result-prefixes="#all"
125125

126126
<!-- render row -->
127127

128-
<xsl:template match="*" mode="ldh:RenderRow" as="(function(item()?) as map(*))?">
128+
<xsl:template match="*" mode="ldh:RenderRow" as="(function(item()?) as map(*))*">
129129
<xsl:apply-templates mode="#current"/>
130130
</xsl:template>
131131

132-
<xsl:template match="text()" mode="ldh:RenderRow" as="(function(item()?) as map(*))?"/>
132+
<xsl:template match="text()" mode="ldh:RenderRow" as="(function(item()?) as map(*))*"/>
133133

134134
<!-- hide type control -->
135135
<xsl:template match="*[rdf:type/@rdf:resource = '&ldh;XHTML']" mode="bs2:TypeControl" priority="1">
@@ -161,7 +161,8 @@ exclude-result-prefixes="#all"
161161
<xsl:variable name="offset-x-treshold" select="120" as="xs:double"/>
162162
<xsl:variable name="offset-y-treshold" select="20" as="xs:double"/>
163163

164-
<xsl:variable name="row-block-controls" select="key('elements-by-class', 'row-block-controls', .)" as="element()"/>
164+
<!-- there might be multiple .row-block-controls in a block if the main block is followed by blocks rendered from ldh:template -->
165+
<xsl:variable name="row-block-controls" select="key('elements-by-class', 'row-block-controls', .)[1]" as="element()"/>
165166
<xsl:variable name="btn-edit" select="key('elements-by-class', 'btn-edit', $row-block-controls)" as="element()"/>
166167
<!-- check that the mouse is on the top edge and show the block controls if they're not already shown -->
167168
<xsl:if test="$offset-x &gt;= $width - $offset-x-treshold and $offset-y &lt;= $offset-y-treshold and ixsl:style($row-block-controls)?z-index = '-1'">

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

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ exclude-result-prefixes="#all"
251251
<xsl:when test="?status = 200 and ?media-type = 'application/rdf+xml'">
252252
<xsl:variable name="object-metadata" select="?body" as="document-node()"/>
253253

254-
<xsl:message>ldh:block-object-metadata-response 200</xsl:message>
255-
256254
<xsl:variable name="row" as="node()*">
257255
<xsl:apply-templates select="$resource" mode="bs2:Row">
258256
<xsl:with-param name="graph" select="$graph" tunnel="yes"/>
@@ -275,9 +273,55 @@ exclude-result-prefixes="#all"
275273
</xsl:for-each>
276274

277275
<xsl:sequence select="map:put($context, 'obj-value-id', $obj-value-id)"/>
276+
277+
<!-- we don't want any of the other resources that may be part of root($resource) document -->
278+
<xsl:variable name="resource-doc" as="document-node()">
279+
<xsl:document>
280+
<rdf:RDF>
281+
<xsl:sequence select="$resource"/>
282+
</rdf:RDF>
283+
</xsl:document>
284+
</xsl:variable>
285+
286+
<xsl:if test="not(ixsl:contains(ixsl:get(ixsl:window(), 'LinkedDataHub.contents'), '`' || $block/@about || '`'))">
287+
<ixsl:set-property name="{'`' || $block/@about || '`'}" select="ldh:new-object()" object="ixsl:get(ixsl:window(), 'LinkedDataHub.contents')"/>
288+
</xsl:if>
289+
290+
<!-- TO-DO: reuse similar initialization code from client.xsl -->
291+
<xsl:if test="$mode = '&ac;MapMode' and key('elements-by-class', 'map-canvas', $block)">
292+
<xsl:for-each select="$resource-doc">
293+
<!-- initialize maps -->
294+
<xsl:if test="key('elements-by-class', 'map-canvas', $block)">
295+
<xsl:call-template name="ldh:DrawMap">
296+
<xsl:with-param name="block-uri" select="$block/@about"/>
297+
<xsl:with-param name="canvas-id" select="key('elements-by-class', 'map-canvas', $block)/@id"/>
298+
</xsl:call-template>
299+
</xsl:if>
300+
</xsl:for-each>
301+
</xsl:if>
302+
<xsl:if test="$mode = '&ac;ChartMode' and key('elements-by-class', 'chart-canvas', $block)">
303+
<!-- initialize charts -->
304+
<xsl:for-each select="key('elements-by-class', 'chart-canvas', $block)">
305+
<xsl:variable name="canvas-id" select="@id" as="xs:string"/>
306+
<xsl:variable name="chart-type" select="xs:anyURI('&ac;Table')" as="xs:anyURI"/>
307+
<xsl:variable name="category" as="xs:string?"/>
308+
<xsl:variable name="series" select="distinct-values($resource-doc/*/*/concat(namespace-uri(), local-name()))" as="xs:string*"/>
309+
<xsl:variable name="data-table" select="ac:rdf-data-table($resource-doc, $category, $series)"/>
310+
311+
<ixsl:set-property name="data-table" select="$data-table" object="ixsl:get(ixsl:get(ixsl:window(), 'LinkedDataHub.contents'), '`' || $block/@about || '`')"/>
312+
313+
<xsl:call-template name="ldh:RenderChart">
314+
<xsl:with-param name="data-table" select="$data-table"/>
315+
<xsl:with-param name="canvas-id" select="$canvas-id"/>
316+
<xsl:with-param name="chart-type" select="$chart-type"/>
317+
<xsl:with-param name="category" select="$category"/>
318+
<xsl:with-param name="series" select="$series"/>
319+
</xsl:call-template>
320+
</xsl:for-each>
321+
</xsl:if>
278322
</xsl:when>
279323
<xsl:otherwise>
280-
<xsl:value-of select="ixsl:call(ixsl:window(), 'alert', [ ?message ])[current-date() lt xs:date('2000-01-01')]"/>
324+
<xsl:sequence select="ixsl:call(ixsl:window(), 'alert', [ ?message ])[current-date() lt xs:date('2000-01-01')]"/>
281325

282326
<xsl:sequence select="$context"/>
283327
</xsl:otherwise>

0 commit comments

Comments
 (0)