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

knowledgepixels / nanodash / 17319343703

29 Aug 2025 08:53AM UTC coverage: 12.007% (-0.3%) from 12.355%
17319343703

push

github

tkuhn
Fix forcedGet(...) also catching RuntimeExceptions

330 of 3844 branches covered (8.58%)

Branch coverage included in aggregate %.

949 of 6808 relevant lines covered (13.94%)

0.61 hits per line

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

60.0
src/main/java/com/knowledgepixels/nanodash/RegistryAccountInfo.java
1
package com.knowledgepixels.nanodash;
2

3
import com.github.jsonldjava.shaded.com.google.common.reflect.TypeToken;
4
import com.google.gson.Gson;
5
import com.google.gson.JsonIOException;
6
import com.google.gson.JsonSyntaxException;
7
import org.eclipse.rdf4j.model.IRI;
8
import org.eclipse.rdf4j.model.ValueFactory;
9
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
10

11
import java.io.IOException;
12
import java.io.InputStreamReader;
13
import java.lang.reflect.Type;
14
import java.net.URL;
15
import java.util.ArrayList;
16
import java.util.List;
17

18
/**
19
 * This class is used to access registry account lists of Nanopub Registry instances.
20
 */
21
public class RegistryAccountInfo {
3✔
22

23
    private static Gson g = new Gson();
4✔
24
    private static Type listType = new TypeToken<ArrayList<RegistryAccountInfo>>() {
6✔
25
    }.getType();
2✔
26

27
    /**
28
     * @param url e.g. "<a href="https://registry.knowledgepixels.com/list.json">https://registry.knowledgepixels.com/list.json</a>"
29
     */
30
    public static List<RegistryAccountInfo> fromUrl(String url) throws JsonIOException, JsonSyntaxException, IOException {
31
        return g.fromJson(new InputStreamReader(new URL(url).openStream()), listType);
13✔
32
    }
33

34
    private String agent;
35
    private String pubkey;
36
    private String status;
37
    private int depth;
38
    private int pathCount;
39
    private long quota;
40
    private double ratio;
41

42
    public static Type getListType() {
43
        return listType;
×
44
    }
45

46
    public String getAgent() {
47
        return agent;
3✔
48
    }
49

50
    public IRI getAgentIri() {
51
        return vf.createIRI(agent);
5✔
52
    }
53

54
    public String getPubkey() {
55
        return pubkey;
3✔
56
    }
57

58
    public String getStatus() {
59
        return status;
×
60
    }
61

62
    public int getDepth() {
63
        return depth;
×
64
    }
65

66
    public int getPathCount() {
67
        return pathCount;
×
68
    }
69

70
    public long getQuota() {
71
        return quota;
×
72
    }
73

74
    public double getRatio() {
75
        return ratio;
×
76
    }
77

78
    private static ValueFactory vf = SimpleValueFactory.getInstance();
3✔
79

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