1
|
package gr.uoa.di.validator.api;
|
2
|
|
3
|
import gr.uoa.di.validator.api.listeners.OpenAIREValidatorRegistrationListener;
|
4
|
import gr.uoa.di.validator.dao.Entry;
|
5
|
import gr.uoa.di.validator.dao.JobSubmitted;
|
6
|
import gr.uoa.di.validator.dao.RulePair;
|
7
|
import gr.uoa.di.validator.dao.RuleSet;
|
8
|
import gr.uoa.di.validator.dao.RuleStored;
|
9
|
import gr.uoa.di.validator.dao.TaskStored;
|
10
|
import gr.uoa.di.validatorweb.actions.admin.rules.FieldPair;
|
11
|
import gr.uoa.di.validatorweb.actions.admin.rulesets.RuleS;
|
12
|
import gr.uoa.di.validatorweb.actions.compTest.RuleD;
|
13
|
|
14
|
import java.io.Serializable;
|
15
|
import java.util.List;
|
16
|
import java.util.Map;
|
17
|
import java.util.Properties;
|
18
|
import java.util.Set;
|
19
|
|
20
|
/**
|
21
|
*
|
22
|
* @author Nikon Gasparis
|
23
|
*
|
24
|
*/
|
25
|
public interface OpenAIREValidator {
|
26
|
|
27
|
public void createRuleSet(String name, String description, String[] ruleIdsContent,
|
28
|
String[] ruleIdsUsage) throws OpenAIREValidatorException;
|
29
|
|
30
|
public void editRuleSet(int setId, String name, String description, String[] ruleIdsContent,
|
31
|
String[] ruleIdsUsage) throws OpenAIREValidatorException;
|
32
|
|
33
|
public void deleteRuleSet(int setId) throws OpenAIREValidatorException;
|
34
|
|
35
|
public String getRuleSetName(int setId) throws OpenAIREValidatorException;
|
36
|
|
37
|
public RuleSet getRuleSet(int setId) throws OpenAIREValidatorException;
|
38
|
|
39
|
public List<RuleSet> getRuleSetIdNames() throws OpenAIREValidatorException;
|
40
|
|
41
|
public List<String> getRuleSetRuleIdsByJobType(int setId, String jobType)
|
42
|
throws OpenAIREValidatorException;
|
43
|
|
44
|
public List<RuleS> getAllRulesForPresentationByJobType(String jobType)
|
45
|
throws OpenAIREValidatorException;
|
46
|
|
47
|
public List<RuleS> getAllRulesForPresentationByJobTypeByRuleSet(
|
48
|
List<String> ruleSetRuleIds, String jobType)
|
49
|
throws OpenAIREValidatorException;
|
50
|
|
51
|
public List<RuleD> getRulesForJobValidationByJobType(String jobType)
|
52
|
throws OpenAIREValidatorException;
|
53
|
|
54
|
public List<RuleD> getRulesForJobValidationByJobTypeByRuleSet(int setId,
|
55
|
String jobType) throws OpenAIREValidatorException;
|
56
|
|
57
|
public List<RuleStored> getAllRulesByJobType(String jobType)
|
58
|
throws OpenAIREValidatorException;
|
59
|
|
60
|
public List<RulePair> getAllRulesToRulePair() throws OpenAIREValidatorException;
|
61
|
|
62
|
public JobSubmitted submitContentJob(Properties pros, Set<Integer> crules,
|
63
|
String user, String groupBy_xpath, OpenAIREValidatorRegistrationListener regListener) throws OpenAIREValidatorException;
|
64
|
|
65
|
public JobSubmitted submitUsageJob(Properties pros, Set<Integer> urules,
|
66
|
String user, OpenAIREValidatorRegistrationListener regListener) throws OpenAIREValidatorException;
|
67
|
|
68
|
public List<JobSubmitted> getJobsOfUser(String userName)
|
69
|
throws OpenAIREValidatorException;
|
70
|
|
71
|
public String addNewRule(String type, String jobType, String[] inputs)
|
72
|
throws OpenAIREValidatorException;
|
73
|
|
74
|
public String editRule(String ruleId, String type, String jobType,
|
75
|
String[] inputs) throws OpenAIREValidatorException;
|
76
|
|
77
|
List<FieldPair> getRuleValuePairs(String ruleId) throws OpenAIREValidatorException;
|
78
|
|
79
|
public Properties getRuleProperties(String ruleId)
|
80
|
throws OpenAIREValidatorException;
|
81
|
|
82
|
public String deleteRule(String ruleId) throws OpenAIREValidatorException;
|
83
|
|
84
|
public List<String> getConstantRuleTypes() throws OpenAIREValidatorException;
|
85
|
|
86
|
public String[] getJobTypesAsArray() throws OpenAIREValidatorException;
|
87
|
|
88
|
public List<String> getRuleLabels(String type) throws OpenAIREValidatorException;
|
89
|
|
90
|
public Serializable getRuleClassInstanceByType(String type, Properties pros,int id) throws OpenAIREValidatorException;
|
91
|
|
92
|
public List<String> getAllRuleIdsByJobType(String jobType)
|
93
|
throws OpenAIREValidatorException;
|
94
|
|
95
|
public List<RuleD> convertRuleIdsListToRuleDList(List<String> ruleIds);
|
96
|
|
97
|
public List<String> getValidationErrors(int jobId, int ruleId)
|
98
|
throws OpenAIREValidatorException;
|
99
|
|
100
|
public boolean userOverridesRepoRegistration(String user)
|
101
|
throws OpenAIREValidatorException;
|
102
|
|
103
|
public JobSubmitted getJobSubmitted(String jobId) throws OpenAIREValidatorException;
|
104
|
|
105
|
public List<TaskStored> getJobTasks(String jobId, JobSubmitted job)
|
106
|
throws OpenAIREValidatorException;
|
107
|
|
108
|
public List<Entry> getJobSummary(String jobId, String groupBy) throws OpenAIREValidatorException;
|
109
|
|
110
|
public void deleteOldJobs(String date,String target) throws OpenAIREValidatorException;
|
111
|
|
112
|
public Map<String, String> getRuleSetsMap() throws OpenAIREValidatorException;
|
113
|
|
114
|
public void linkRules(int ruleRegistry, int ruleStored);
|
115
|
|
116
|
public int getRuleFromLink(int ruleRegistry);
|
117
|
|
118
|
public RuleStored getRule(String ruleId) throws OpenAIREValidatorException;
|
119
|
|
120
|
public void restore();
|
121
|
|
122
|
public List<String> getDistinctGroupByValues(String jobId) throws OpenAIREValidatorException;
|
123
|
|
124
|
public String getFilteredScore(String jobId, String groupBy) throws OpenAIREValidatorException;
|
125
|
|
126
|
public void preRegistrationValidations(String baseUrl, String officialName,
|
127
|
String activationId, String user, List<String> adminEmails,
|
128
|
String validationSet, String desiredCompatibility, String datasourceId, String interfaceId) throws OpenAIREValidatorException;
|
129
|
|
130
|
public void storeJobForRegistration(String baseUrl, String officialName,
|
131
|
String activationId, String user, List<String> adminEmails, String validationSet, String desiredCompatibility, String datasourceId, String interfaceId) throws OpenAIREValidatorException;
|
132
|
|
133
|
public List<String> getJobForRegistration(String activationId) throws OpenAIREValidatorException;
|
134
|
|
135
|
public void deleteJobForRegistration(String activationId) throws OpenAIREValidatorException;
|
136
|
|
137
|
public void cleanUncompletedJobs() throws OpenAIREValidatorException;
|
138
|
|
139
|
}
|