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

knowledgepixels / nanodash / 19232563835

10 Nov 2025 01:03PM UTC coverage: 14.137% (+0.2%) from 13.973%
19232563835

push

github

tkuhn
feat(ResourceView): Support for hasPageSize

519 of 4646 branches covered (11.17%)

Branch coverage included in aggregate %.

1354 of 8603 relevant lines covered (15.74%)

0.7 hits per line

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

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

3
import org.nanopub.extra.services.ApiResponseEntry;
4

5
import java.io.Serializable;
6

7
/**
8
 * A class representing the display of a resource view associated with a Space.
9
 */
10
public class ViewDisplay implements Serializable {
11

12
    private ResourceView view;
13
    private String nanopubId;
14
    private String title;
15
    private Integer pageSize;
16

17
    /**
18
     * Constructor for ViewDisplay.
19
     *
20
     * @param entry an ApiResponseEntry containing the view and nanopub ID.
21
     */
22
    public ViewDisplay(ApiResponseEntry entry) {
×
23
        this.view = ResourceView.get(entry.get("view"));
×
24
        if (view == null) throw new IllegalArgumentException("View not found: " + entry.get("view"));
×
25
        this.nanopubId = entry.get("np");
×
26
    }
×
27

28
    /**
29
     * Creates a plain minimal view display without attached view object.
30
     *
31
     * @param pageSize the page size of the view display
32
     */
33
    public ViewDisplay(Integer pageSize) {
×
34
        this.pageSize = pageSize;
×
35
    }
×
36

37
    /**
38
     * Gets the ResourceView associated with this ViewDisplay.
39
     *
40
     * @return the ResourceView
41
     */
42
    public ResourceView getView() {
43
        return view;
×
44
    }
45

46
    /**
47
     * Gets the nanopub ID associated with this ViewDisplay.
48
     *
49
     * @return the nanopub ID
50
     */
51
    public String getNanopubId() {
52
        return nanopubId;
×
53
    }
54

55
    public Integer getPageSize() {
56
        if (pageSize != null) return pageSize;
×
57
        if (view.getPageSize() != null) return view.getPageSize();
×
58
        return 10;
×
59
    }
60

61
    public String getTitle() {
62
        if (title != null) return title;
×
63
        if (view != null) return view.getTitle();
×
64
        return null;
×
65
    }
66

67
}
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