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

knowledgepixels / nanodash / 21431284807

28 Jan 2026 08:43AM UTC coverage: 14.227% (-0.9%) from 15.111%
21431284807

push

github

tkuhn
feat: show label for profiled resources filled into form

548 of 5082 branches covered (10.78%)

Branch coverage included in aggregate %.

1500 of 9313 relevant lines covered (16.11%)

2.12 hits per line

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

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

3
import java.util.HashMap;
4
import java.util.Map;
5

6
import org.eclipse.rdf4j.model.IRI;
7

8
// TODO Merge this class with User or otherwise make them aligned.
9
public class IndividualAgent extends ProfiledResource {
10

11
    private static Map<String,IndividualAgent> instanceMap = new HashMap<>();
×
12

13
    public static IndividualAgent get(String id) {
14
        if (!instanceMap.containsKey(id)) {
×
15
            instanceMap.put(id, new IndividualAgent(id));
×
16
        }
17
        return instanceMap.get(id);
×
18
    }
19

20
    private IndividualAgent(String id) {
21
        super(id);
×
22
    }
×
23

24
    public boolean isCurrentUser() {
25
        IRI userIri = NanodashSession.get().getUserIri();
×
26
        if (userIri == null) return false;
×
27
        return getId().equals(userIri.stringValue());
×
28
    }
29

30
    @Override
31
    public String getLabel() {
32
        try {
33
            return User.getUserData().getShortDisplayName(Utils.vf.createIRI(getId()));
×
34
        } catch (Exception ex) {
×
35
        }
36
        return getId();
×
37
    }
38

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