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

knowledgepixels / nanodash / 17725645560

15 Sep 2025 07:36AM UTC coverage: 13.735% (-0.001%) from 13.736%
17725645560

push

github

tkuhn
Include existing journals in Spaces

433 of 3988 branches covered (10.86%)

Branch coverage included in aggregate %.

1113 of 7268 relevant lines covered (15.31%)

0.68 hits per line

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

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

3
import com.knowledgepixels.nanodash.connector.ios.DsConfig;
4
import com.knowledgepixels.nanodash.connector.pensoft.BdjConfig;
5
import com.knowledgepixels.nanodash.connector.pensoft.RioConfig;
6
import org.eclipse.rdf4j.model.IRI;
7

8
import java.io.Serializable;
9
import java.util.*;
10

11
/**
12
 * Abstract class representing the configuration for different connectors in the Nanodash application.
13
 */
14
public abstract class ConnectorConfig implements Serializable {
×
15

16
    /**
17
     * Returns the ConnectorConfig instance for a given connector ID.
18
     *
19
     * @param connectorId the ID of the connector
20
     * @return the ConnectorConfig instance corresponding to the connector ID.
21
     */
22
    public static ConnectorConfig get(String connectorId) {
23
        if (connectorId.equals("ios/ds")) {
×
24
            return DsConfig.get();
×
25
        } else if (connectorId.equals("pensoft/bdj")) {
×
26
            return BdjConfig.get();
×
27
        } else if (connectorId.equals("pensoft/rio")) {
×
28
            return RioConfig.get();
×
29
        } else {
30
            return null;
×
31
        }
32
    }
33

34
    /**
35
     * Returns the logo file name for the connector.
36
     *
37
     * @return the logo file name
38
     */
39
    public abstract String getLogoFileName();
40

41
    /**
42
     * Returns the file name for the submit image.
43
     *
44
     * @return the submit image file name
45
     */
46
    public abstract String getSubmitImageFileName();
47

48
    /**
49
     * Returns the name of the journal associated with the connector.
50
     *
51
     * @return the journal name
52
     */
53
    public abstract String getJournalName();
54

55
    /**
56
     * Returns the abbreviation of the journal associated with the connector.
57
     *
58
     * @return the journal abbreviation
59
     */
60
    public abstract String getJournalAbbrev();
61

62
    /**
63
     * Returns the URL of the journal's homepage.
64
     *
65
     * @return the journal URL
66
     */
67
    public abstract String getJournalUrl();
68

69
    /**
70
     * Returns the ISSN of the journal associated with the connector.
71
     *
72
     * @return the journal ISSN
73
     */
74
    public abstract String getJournalIssn();
75

76
    /**
77
     * Returns the prefix URL for review pages associated with the connector.
78
     *
79
     * @return the review URL prefix
80
     */
81
    public abstract String getReviewUrlPrefix();
82

83
    /**
84
     * Returns the API call URL to fetch candidate nanopublications.
85
     *
86
     * @return the API call URL for candidate nanopublications
87
     */
88
    public abstract String getCandidateNanopubsApiCall();
89

90
    /**
91
     * Returns the connection instruction for the connector.
92
     *
93
     * @return the connection instruction
94
     */
95
    public abstract String getConnectInstruction();
96

97
    /**
98
     * Returns a list of option groups for the connector.
99
     *
100
     * @return a list of ConnectorOptionGroup instances
101
     */
102
    public abstract List<ConnectorOptionGroup> getOptions();
103

104
    /**
105
     * Returns the general reactions API call.
106
     *
107
     * @return the general reactions API call, or {@code null} if not applicable
108
     */
109
    public String getGeneralReactionsApiCall() {
110
        return null;
×
111
    }
112

113
    /**
114
     * Returns the accepted nanopublications API call.
115
     *
116
     * @return the accepted nanopublications API call
117
     */
118
    public String getAcceptedNanopubsApiCall() {
119
        return null;
×
120
    }
121

122
    /**
123
     * Returns the IDs of technical editors for the connector.
124
     *
125
     * @return a set of IRI IDs representing technical editors, or an empty set if not applicable
126
     */
127
    public Set<IRI> getTechnicalEditorIds() {
128
        return Collections.emptySet();
×
129
    }
130

131
    /**
132
     * Returns the IRI of the nanopublication type for this connector.
133
     *
134
     * @return the IRI of the nanopublication type, or null if not applicable
135
     */
136
    public IRI getNanopubType() {
137
        return null;
×
138
    }
139

140
    /**
141
     * Returns the target namespace for the connector.
142
     *
143
     * @return the target namespace as a String, or null if not applicable
144
     */
145
    public String getTargetNamespace() {
146
        return null;
×
147
    }
148

149
    /**
150
     * Returns any extra instructions for the connector.
151
     *
152
     * @return extra instructions as a String, or an empty string if there are none
153
     */
154
    public String getExtraInstructions() {
155
        return "";
×
156
    }
157

158
    private static Map<String, String> queryIds = new HashMap<>();
×
159

160
    static {
161
        load("RAkoDiXZG_CYt978-dZ_vffK-UTbN6e1bmtFy6qdmFzC4/get-latest-accepted-bdj");
×
162
        load("RAgnLJH8kcI_e488VdoyQ0g3-wcumj4mSiusxPmeAYsSI/get-latest-biodiv-candidates");
×
163
        load("RATpsBysLf8yXeMpY7PHKj-aKNCa4-4Okg1hi97OLDXIo/get-latest-accepted-ds");
×
164
        load("RAFNTW3jhWKnNvhMSOfYvG53ZAurxrFv_-vnIJkZyfAuo/get-latest-ds-candidates");
×
165
        load("RA0FiH8gukovvEHPBMn72zUDdMQylQmUwtIGNLYBZXGfk/get-ds-reactions");
×
166
        load("RAAXmnJdXHO86GqJs8VTdqapUWqCrHKRgRT2b4NfjAfgk/get-latest-accepted-rio");
×
167
        load("RAehKOCOnZ3uDBmI0kkCNTh5k9Nl6YYNj7tyc20tVymxY/get-latest-rio-candidates");
×
168
        load("RAe7k3L0oElPOrFoUMkUhqU9dGUqfBaUSw3cVplOUn3Fk/get-reactions");
×
169
    }
×
170

171
    private static void load(String queryId) {
172
        queryIds.put(queryId.substring(46), queryId);
×
173
    }
×
174

175
    /**
176
     * Returns the query ID for a given query name.
177
     *
178
     * @param queryName the name of the query
179
     * @return the query ID if it exists, otherwise null
180
     */
181
    public static String getQueryId(String queryName) {
182
        return queryIds.get(queryName);
×
183
    }
184

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