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

knowledgepixels / nanodash / 17320701451

29 Aug 2025 09:55AM UTC coverage: 12.02% (+0.01%) from 12.007%
17320701451

push

github

ashleycaselli
refactor: minor code style update

330 of 3842 branches covered (8.59%)

Branch coverage included in aggregate %.

950 of 6807 relevant lines covered (13.96%)

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.URI;
15
import java.net.URISyntaxException;
16
import java.util.ArrayList;
17
import java.util.List;
18

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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