("nanopub-link", ExplorePage.class, new PageParameters().set("id", npId)));
- }
-
- };
- dataView.setItemsPerPage(10);
- dataView.setOutputMarkupId(true);
- r.add(dataView);
-
- WebMarkupContainer navigation = new WebMarkupContainer("navigation");
- navigation.add(new NavigatorLabel("navigatorLabel", dataView));
- AjaxPagingNavigator pagingNavigator = new AjaxPagingNavigator("navigator", dataView);
- navigation.setVisible(dataView.getPageCount() > 1);
- navigation.add(pagingNavigator);
- r.add(navigation);
-
- return r;
- }
-
- private ThingResults(String id) {
- super(id);
- setOutputMarkupId(true);
- }
-
-}
diff --git a/src/main/java/com/knowledgepixels/nanodash/page/ExplorePage.html b/src/main/java/com/knowledgepixels/nanodash/page/ExplorePage.html
index 444c86be..e6377f04 100644
--- a/src/main/java/com/knowledgepixels/nanodash/page/ExplorePage.html
+++ b/src/main/java/com/knowledgepixels/nanodash/page/ExplorePage.html
@@ -48,13 +48,10 @@
diff --git a/src/main/java/com/knowledgepixels/nanodash/page/ExplorePage.java b/src/main/java/com/knowledgepixels/nanodash/page/ExplorePage.java
index 2de510a5..817b731f 100644
--- a/src/main/java/com/knowledgepixels/nanodash/page/ExplorePage.java
+++ b/src/main/java/com/knowledgepixels/nanodash/page/ExplorePage.java
@@ -55,6 +55,11 @@ public class ExplorePage extends NanodashPage {
*/
public static final String MOUNT_PATH = "/explore";
+ private static final String DESCRIBED_IN_VIEW = "https://w3id.org/np/RAMH_7qMY-jmgXr2jqqk5F_XW7t2k2n3NCB6LtoKEXDzY/described-in-view";
+ private static final String CLASSES_VIEW = "https://w3id.org/np/RAHPtR1VriEW09tcvZhrM8Dr3vE1JnMWWi9-ajKJWNOJs/classes-view";
+ private static final String INSTANCES_VIEW = "https://w3id.org/np/RABXfsNoT_RYlk8LpDmKfJ2poSlvIGk3jgq4DkR4YLAps/instances-view";
+ private static final String TEMPLATES_VIEW = "https://w3id.org/np/RAP0-S9PUUVF1rQiqo8vq8z6XWsXkeGBUo60DJf8JsXsc/templates-view";
+
/**
* {@inheritDoc}
*/
@@ -300,18 +305,26 @@ private void initPage() {
if (publishedNanopub != null) {
infoSection.add(new Label("classes-panel").setVisible(false));
} else {
- infoSection.add(ThingListPanel.createComponent("classes-panel", ThingListPanel.Mode.CLASSES, ref, "Searching for classes..."));
+ View classesView = View.get(CLASSES_VIEW);
+ QueryRef classesQueryRef = new QueryRef(classesView.getQuery().getQueryId(), "thing", ref);
+ infoSection.add(QueryResultListBuilder.create("classes-panel", classesQueryRef, new ViewDisplay(classesView)).build());
}
if (isNanopubId) {
infoSection.add(new Label("definitions-panel").setVisible(false));
infoSection.add(new Label("instances-panel").setVisible(false));
- infoSection.add(new Label("parts-panel").setVisible(false));
infoSection.add(new Label("templates-panel").setVisible(false));
} else {
- infoSection.add(ThingListPanel.createComponent("definitions-panel", ThingListPanel.Mode.DESCRIPTIONS, ref, "Searching for term descriptions..."));
- infoSection.add(ThingListPanel.createComponent("instances-panel", ThingListPanel.Mode.INSTANCES, ref, "Searching for instances..."));
- infoSection.add(ThingListPanel.createComponent("parts-panel", ThingListPanel.Mode.PARTS, ref, "Searching for parts..."));
- infoSection.add(ThingListPanel.createComponent("templates-panel", ThingListPanel.Mode.TEMPLATES, ref, "Searching for templates..."));
+ View describedInView = View.get(DESCRIBED_IN_VIEW);
+ QueryRef describedInQueryRef = new QueryRef(describedInView.getQuery().getQueryId(), "term", ref);
+ infoSection.add(QueryResultNanopubSetBuilder.create("definitions-panel", describedInQueryRef, new ViewDisplay(describedInView)).build());
+
+ View instancesView = View.get(INSTANCES_VIEW);
+ QueryRef instancesQueryRef = new QueryRef(instancesView.getQuery().getQueryId(), "class", ref);
+ infoSection.add(QueryResultListBuilder.create("instances-panel", instancesQueryRef, new ViewDisplay(instancesView)).build());
+
+ View templatesView = View.get(TEMPLATES_VIEW);
+ QueryRef templatesQueryRef = new QueryRef(templatesView.getQuery().getQueryId(), "thing", ref);
+ infoSection.add(QueryResultListBuilder.create("templates-panel", templatesQueryRef, new ViewDisplay(templatesView)).build());
}
add(infoSection);
}
diff --git a/src/main/webapp/style.css b/src/main/webapp/style.css
index 9c7345a2..363f1f11 100644
--- a/src/main/webapp/style.css
+++ b/src/main/webapp/style.css
@@ -2162,6 +2162,14 @@ td div:has(.button-list) {
display: block;
}
+.flex-container.list-view {
+ padding-top: 0;
+}
+
+.flex-container.list-view > .nanopub-item:first-child .meta {
+ margin-top: 8px;
+}
+
.flex-container.list-view .nanopub-item {
border: 0;
border-top: 1px solid #ccc;
@@ -2279,6 +2287,13 @@ a.source:hover {
display: inline;
}
+.no-records-note {
+ margin: 0;
+ padding: 8px 15px;
+ color: #888;
+ font-style: italic;
+}
+
.cell-data-html p,
.cell-data-html span,
.cell-data-html div {