• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

knowledgepixels / nanodash / 27831881428

19 Jun 2026 02:34PM UTC coverage: 26.652% (+0.07%) from 26.583%
27831881428

push

github

web-flow
Merge pull request #489 from knowledgepixels/feat/per-type-preset-templates

feat: per-type "add preset" templates (type-filtered preset choice)

1553 of 6847 branches covered (22.68%)

Branch coverage included in aggregate %.

3421 of 11816 relevant lines covered (28.95%)

4.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
src/main/java/com/knowledgepixels/nanodash/component/AboutResourcePanel.java
1
package com.knowledgepixels.nanodash.component;
2

3
import com.knowledgepixels.nanodash.QueryApiAccess;
4
import com.knowledgepixels.nanodash.View;
5
import com.knowledgepixels.nanodash.ViewDisplay;
6
import com.knowledgepixels.nanodash.domain.MaintainedResource;
7
import org.apache.wicket.markup.html.panel.Panel;
8
import org.nanopub.extra.services.QueryRef;
9

10
/**
11
 * The "About" tab body for a maintained resource: its assigned presets and the
12
 * listing of its configured view displays (issue #302). Resource-level
13
 * members/roles are intentionally not shown (roles live on the parent space).
14
 */
15
public class AboutResourcePanel extends Panel {
16

17
    /**
18
     * The "ℹ️ Info" view for a maintained resource: key-value facts (type,
19
     * namespace, maintaining space). Also shown on the Content tab; surfaced here
20
     * at the top of the About tab.
21
     */
22
    public static final String MAINTAINED_RESOURCE_INFO_VIEW = "https://w3id.org/np/RAqKkqvOFWWCDJ4LOa6rrgQJMFbDnoaG56zkIBN5AMBZw/maintained-resource-info-view-kind";
23

24
    /**
25
     * View listing a maintained resource's configured view displays. Mirrors the space
26
     * view-displays view but its "add view display" action links the maintained-resource-
27
     * specific creation template.
28
     */
29
    public static final String MAINTAINED_RESOURCE_VIEW_DISPLAYS_VIEW = "https://w3id.org/np/RAZOxROZRaxSeoeO05iI0tKpDIy2mEN3jlUuVIo0uZN1I/view-displays-view";
30

31
    /**
32
     * View listing the presets assigned to a maintained resource. Mirrors the space
33
     * preset-assignments view but its "add preset" action links the maintained-resource-specific
34
     * template (offering only presets that apply to maintained resources).
35
     */
36
    public static final String MAINTAINED_RESOURCE_PRESET_ASSIGNMENTS_VIEW = "https://w3id.org/np/RA-CRSYJrYf-uaw1fip7hr_kdPqVb7_6dENwTPYQpikRY/preset-assignments-view";
37

38
    /**
39
     * @param id       the Wicket markup id
40
     * @param resource the maintained resource whose About listings to render
41
     */
42
    public AboutResourcePanel(String id, MaintainedResource resource) {
43
        super(id);
×
44

45
        // The info view leads the "Structure" section (to the left of the presets).
46
        View infoView = View.get(MAINTAINED_RESOURCE_INFO_VIEW);
×
47
        add(QueryResultTableBuilder.create("info", new QueryRef(infoView.getQuery().getQueryId(), "resource", resource.getId()), new ViewDisplay(infoView)).resourceWithProfile(resource).id(resource.getId()).contextId(resource.getId()).build());
×
48

49
        View presetsView = View.get(MAINTAINED_RESOURCE_PRESET_ASSIGNMENTS_VIEW);
×
50
        add(QueryResultTableBuilder.create("presets", new QueryRef(presetsView.getQuery().getQueryId(), "resource", resource.getId()), new ViewDisplay(presetsView)).resourceWithProfile(resource).id(resource.getId()).contextId(resource.getId()).build());
×
51

52
        View vdView = View.get(MAINTAINED_RESOURCE_VIEW_DISPLAYS_VIEW);
×
53
        add(QueryResultTableBuilder.create("viewdisplays", new QueryRef(QueryApiAccess.LIST_VIEW_DISPLAYS, "resource", resource.getId()), new ViewDisplay(vdView)).resourceWithProfile(resource).id(resource.getId()).contextId(resource.getId()).build());
×
54
    }
×
55

56
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc