Revision 49071
Added by Michele Artini about 7 years ago
modules/dnet-datasource-manager-common/tags/dnet-datasource-manager-rmi-4.0.0/src/main/java/eu/dnetlib/enabling/datasources/rmi/DatasourceManagerServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import eu.dnetlib.common.rmi.RMIException; |
|
4 |
|
|
5 |
public class DatasourceManagerServiceException extends RMIException { |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
*/ |
|
10 |
private static final long serialVersionUID = -5987839351772223236L; |
|
11 |
|
|
12 |
public DatasourceManagerServiceException(final String string) { |
|
13 |
super(string); |
|
14 |
} |
|
15 |
|
|
16 |
public DatasourceManagerServiceException(final String string, final Throwable exception) { |
|
17 |
super(string, exception); |
|
18 |
} |
|
19 |
|
|
20 |
public DatasourceManagerServiceException(final Throwable exception) { |
|
21 |
super(exception); |
|
22 |
} |
|
23 |
|
|
24 |
} |
modules/dnet-datasource-manager-common/trunk/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
3 |
<parent> |
|
4 |
<groupId>eu.dnetlib</groupId> |
|
5 |
<artifactId>dnet45-parent</artifactId> |
|
6 |
<version>1.0.0</version> |
|
7 |
<relativePath /> |
|
8 |
</parent> |
|
9 |
<modelVersion>4.0.0</modelVersion> |
|
10 |
<groupId>eu.dnetlib</groupId> |
|
11 |
<artifactId>dnet-datasource-manager-rmi</artifactId> |
|
12 |
<packaging>jar</packaging> |
|
13 |
<version>4.0.2-SNAPSHOT</version> |
|
14 |
<scm> |
|
15 |
<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet45/modules/dnet-datasource-manager-rmi/trunk</developerConnection> |
|
16 |
</scm> |
|
17 |
<dependencies> |
|
18 |
<dependency> |
|
19 |
<groupId>eu.dnetlib</groupId> |
|
20 |
<artifactId>cnr-rmi-api</artifactId> |
|
21 |
<version>[2.0.0,3.0.0)</version> |
|
22 |
</dependency> |
|
23 |
</dependencies> |
|
24 |
</project> |
modules/dnet-datasource-manager-common/trunk/deploy.info | ||
---|---|---|
1 |
{"type_source": "SVN", "goal": "package -U -T 4C source:jar", "url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet45/modules/dnet-datasource-manager-rmi/trunk/", "deploy_repository": "dnet45-snapshots", "version": "4", "mail": "sandro.labruzzo@isti.cnr.it,michele.artini@isti.cnr.it, claudio.atzori@isti.cnr.it, alessia.bardi@isti.cnr.it", "deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-snapshots", "name": "dnet-datasource-manager-rmi"} |
modules/dnet-datasource-manager-common/tags/dnet-datasource-manager-rmi-4.0.0/src/main/java/eu/dnetlib/enabling/datasources/rmi/RepositoryMapEntry.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import javax.xml.bind.annotation.XmlRootElement; |
|
4 |
|
|
5 |
@XmlRootElement |
|
6 |
public class RepositoryMapEntry { |
|
7 |
|
|
8 |
private String id; |
|
9 |
private String name; |
|
10 |
private float lat; |
|
11 |
private float lng; |
|
12 |
|
|
13 |
public RepositoryMapEntry() {} |
|
14 |
|
|
15 |
public RepositoryMapEntry(final String id, final String name, final float lat, final float lng) { |
|
16 |
this.id = id; |
|
17 |
this.name = name; |
|
18 |
this.lat = lat; |
|
19 |
this.lng = lng; |
|
20 |
} |
|
21 |
|
|
22 |
public String getId() { |
|
23 |
return id; |
|
24 |
} |
|
25 |
|
|
26 |
public void setId(final String id) { |
|
27 |
this.id = id; |
|
28 |
} |
|
29 |
|
|
30 |
public String getName() { |
|
31 |
return name; |
|
32 |
} |
|
33 |
|
|
34 |
public void setName(final String name) { |
|
35 |
this.name = name; |
|
36 |
} |
|
37 |
|
|
38 |
public float getLat() { |
|
39 |
return lat; |
|
40 |
} |
|
41 |
|
|
42 |
public void setLat(final float lat) { |
|
43 |
this.lat = lat; |
|
44 |
} |
|
45 |
|
|
46 |
public float getLng() { |
|
47 |
return lng; |
|
48 |
} |
|
49 |
|
|
50 |
public void setLng(final float lng) { |
|
51 |
this.lng = lng; |
|
52 |
} |
|
53 |
|
|
54 |
} |
modules/dnet-datasource-manager-common/trunk/src/main/java/eu/dnetlib/enabling/datasources/rmi/RepositoryMapEntry.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import javax.xml.bind.annotation.XmlRootElement; |
|
4 |
|
|
5 |
@XmlRootElement |
|
6 |
public class RepositoryMapEntry { |
|
7 |
|
|
8 |
private String id; |
|
9 |
private String name; |
|
10 |
private float lat; |
|
11 |
private float lng; |
|
12 |
|
|
13 |
public RepositoryMapEntry() {} |
|
14 |
|
|
15 |
public RepositoryMapEntry(final String id, final String name, final float lat, final float lng) { |
|
16 |
this.id = id; |
|
17 |
this.name = name; |
|
18 |
this.lat = lat; |
|
19 |
this.lng = lng; |
|
20 |
} |
|
21 |
|
|
22 |
public String getId() { |
|
23 |
return id; |
|
24 |
} |
|
25 |
|
|
26 |
public void setId(final String id) { |
|
27 |
this.id = id; |
|
28 |
} |
|
29 |
|
|
30 |
public String getName() { |
|
31 |
return name; |
|
32 |
} |
|
33 |
|
|
34 |
public void setName(final String name) { |
|
35 |
this.name = name; |
|
36 |
} |
|
37 |
|
|
38 |
public float getLat() { |
|
39 |
return lat; |
|
40 |
} |
|
41 |
|
|
42 |
public void setLat(final float lat) { |
|
43 |
this.lat = lat; |
|
44 |
} |
|
45 |
|
|
46 |
public float getLng() { |
|
47 |
return lng; |
|
48 |
} |
|
49 |
|
|
50 |
public void setLng(final float lng) { |
|
51 |
this.lng = lng; |
|
52 |
} |
|
53 |
|
|
54 |
} |
modules/dnet-datasource-manager-common/tags/dnet-datasource-manager-rmi-4.0.0/src/main/java/eu/dnetlib/enabling/datasources/rmi/BrowsableField.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import javax.xml.bind.annotation.XmlRootElement; |
|
4 |
|
|
5 |
@XmlRootElement |
|
6 |
public class BrowsableField { |
|
7 |
|
|
8 |
private String id; |
|
9 |
private String label; |
|
10 |
|
|
11 |
public BrowsableField() {} |
|
12 |
|
|
13 |
public BrowsableField(final String id, final String label) { |
|
14 |
this.id = id; |
|
15 |
this.label = label; |
|
16 |
} |
|
17 |
|
|
18 |
public String getId() { |
|
19 |
return id; |
|
20 |
} |
|
21 |
|
|
22 |
public void setId(final String id) { |
|
23 |
this.id = id; |
|
24 |
} |
|
25 |
|
|
26 |
public String getLabel() { |
|
27 |
return label; |
|
28 |
} |
|
29 |
|
|
30 |
public void setLabel(final String label) { |
|
31 |
this.label = label; |
|
32 |
} |
|
33 |
} |
modules/dnet-datasource-manager-common/trunk/src/main/java/eu/dnetlib/enabling/datasources/rmi/SimpleDatasourceDesc.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import java.util.HashSet; |
|
4 |
import java.util.Set; |
|
5 |
|
|
6 |
import javax.xml.bind.annotation.XmlRootElement; |
|
7 |
|
|
8 |
@XmlRootElement |
|
9 |
public class SimpleDatasourceDesc implements Comparable<SimpleDatasourceDesc> { |
|
10 |
|
|
11 |
private String id; |
|
12 |
private String name; |
|
13 |
private String typology; |
|
14 |
private String origId; |
|
15 |
private Set<String> apis = new HashSet<String>(); |
|
16 |
private boolean valid; |
|
17 |
|
|
18 |
public String getId() { |
|
19 |
return id; |
|
20 |
} |
|
21 |
|
|
22 |
public void setId(final String id) { |
|
23 |
this.id = id; |
|
24 |
} |
|
25 |
|
|
26 |
public String getName() { |
|
27 |
return name; |
|
28 |
} |
|
29 |
|
|
30 |
public void setName(final String name) { |
|
31 |
this.name = name; |
|
32 |
} |
|
33 |
|
|
34 |
public boolean isValid() { |
|
35 |
return valid; |
|
36 |
} |
|
37 |
|
|
38 |
public void setValid(final boolean valid) { |
|
39 |
this.valid = valid; |
|
40 |
} |
|
41 |
|
|
42 |
public String getTypology() { |
|
43 |
return typology; |
|
44 |
} |
|
45 |
|
|
46 |
public void setTypology(final String typology) { |
|
47 |
this.typology = typology; |
|
48 |
} |
|
49 |
|
|
50 |
public String getOrigId() { |
|
51 |
return origId; |
|
52 |
} |
|
53 |
|
|
54 |
public void setOrigId(final String origId) { |
|
55 |
this.origId = origId; |
|
56 |
} |
|
57 |
|
|
58 |
public Set<String> getApis() { |
|
59 |
return apis; |
|
60 |
} |
|
61 |
|
|
62 |
public void setApis(final Set<String> apis) { |
|
63 |
this.apis = apis; |
|
64 |
} |
|
65 |
|
|
66 |
@Override |
|
67 |
public int compareTo(final SimpleDatasourceDesc e) { |
|
68 |
return getName().compareTo(e.getName()); |
|
69 |
} |
|
70 |
|
|
71 |
} |
modules/dnet-datasource-manager-common/trunk/src/main/java/eu/dnetlib/enabling/datasources/rmi/BrowsableField.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import javax.xml.bind.annotation.XmlRootElement; |
|
4 |
|
|
5 |
@XmlRootElement |
|
6 |
public class BrowsableField { |
|
7 |
|
|
8 |
private String id; |
|
9 |
private String label; |
|
10 |
|
|
11 |
public BrowsableField() {} |
|
12 |
|
|
13 |
public BrowsableField(final String id, final String label) { |
|
14 |
this.id = id; |
|
15 |
this.label = label; |
|
16 |
} |
|
17 |
|
|
18 |
public String getId() { |
|
19 |
return id; |
|
20 |
} |
|
21 |
|
|
22 |
public void setId(final String id) { |
|
23 |
this.id = id; |
|
24 |
} |
|
25 |
|
|
26 |
public String getLabel() { |
|
27 |
return label; |
|
28 |
} |
|
29 |
|
|
30 |
public void setLabel(final String label) { |
|
31 |
this.label = label; |
|
32 |
} |
|
33 |
} |
modules/dnet-datasource-manager-common/tags/dnet-datasource-manager-rmi-4.0.0/src/main/java/eu/dnetlib/enabling/datasources/rmi/DatasourceConstants.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
public class DatasourceConstants { |
|
4 |
|
|
5 |
public static final String OVERRIDING_COMPLIANCE_FIELD = "overriding_compliance"; |
|
6 |
|
|
7 |
} |
modules/dnet-datasource-manager-common/tags/dnet-datasource-manager-rmi-4.0.0/src/main/java/eu/dnetlib/enabling/datasources/rmi/SearchInterfacesEntry.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import javax.xml.bind.annotation.XmlRootElement; |
|
4 |
|
|
5 |
@XmlRootElement |
|
6 |
public class SearchInterfacesEntry implements Comparable<SearchInterfacesEntry> { |
|
7 |
|
|
8 |
private String id; |
|
9 |
private String compliance; |
|
10 |
private String protocol; |
|
11 |
private boolean active; |
|
12 |
private String repoId = "unknown"; |
|
13 |
private String repoName = "unknown"; |
|
14 |
private String repoCountry = "-"; |
|
15 |
private String repoPrefix = ""; |
|
16 |
private String aggrDate = ""; |
|
17 |
private int aggrTotal = 0; |
|
18 |
|
|
19 |
public SearchInterfacesEntry() {} |
|
20 |
|
|
21 |
public SearchInterfacesEntry(final String id, final String compliance, final String protocol, final boolean active, final String repoId, |
|
22 |
final String repoName, final String repoCountry, |
|
23 |
final String repoPrefix, final String aggrDate, final int aggrTotal) { |
|
24 |
this.id = id; |
|
25 |
this.compliance = compliance; |
|
26 |
this.protocol = protocol; |
|
27 |
this.active = active; |
|
28 |
this.repoId = repoId; |
|
29 |
this.repoName = repoName; |
|
30 |
this.repoCountry = repoCountry; |
|
31 |
this.repoPrefix = repoPrefix; |
|
32 |
this.aggrDate = aggrDate; |
|
33 |
this.aggrTotal = aggrTotal; |
|
34 |
} |
|
35 |
|
|
36 |
public String getId() { |
|
37 |
return id; |
|
38 |
} |
|
39 |
|
|
40 |
public void setId(final String id) { |
|
41 |
this.id = id; |
|
42 |
} |
|
43 |
|
|
44 |
public String getCompliance() { |
|
45 |
return compliance; |
|
46 |
} |
|
47 |
|
|
48 |
public void setCompliance(final String compliance) { |
|
49 |
this.compliance = compliance; |
|
50 |
} |
|
51 |
|
|
52 |
public boolean isActive() { |
|
53 |
return active; |
|
54 |
} |
|
55 |
|
|
56 |
public void setActive(final boolean active) { |
|
57 |
this.active = active; |
|
58 |
} |
|
59 |
|
|
60 |
public String getRepoId() { |
|
61 |
return repoId; |
|
62 |
} |
|
63 |
|
|
64 |
public void setRepoId(final String repoId) { |
|
65 |
this.repoId = repoId; |
|
66 |
} |
|
67 |
|
|
68 |
public String getRepoName() { |
|
69 |
return repoName; |
|
70 |
} |
|
71 |
|
|
72 |
public void setRepoName(final String repoName) { |
|
73 |
this.repoName = repoName; |
|
74 |
} |
|
75 |
|
|
76 |
public String getRepoCountry() { |
|
77 |
return repoCountry; |
|
78 |
} |
|
79 |
|
|
80 |
public void setRepoCountry(final String repoCountry) { |
|
81 |
this.repoCountry = repoCountry; |
|
82 |
} |
|
83 |
|
|
84 |
public String getRepoPrefix() { |
|
85 |
return repoPrefix; |
|
86 |
} |
|
87 |
|
|
88 |
public void setRepoPrefix(final String repoPrefix) { |
|
89 |
this.repoPrefix = repoPrefix; |
|
90 |
} |
|
91 |
|
|
92 |
@Override |
|
93 |
public int compareTo(final SearchInterfacesEntry e) { |
|
94 |
return compliance.compareTo(e.getCompliance()); |
|
95 |
} |
|
96 |
|
|
97 |
public String getAggrDate() { |
|
98 |
return aggrDate; |
|
99 |
} |
|
100 |
|
|
101 |
public void setAggrDate(final String aggrDate) { |
|
102 |
this.aggrDate = aggrDate; |
|
103 |
} |
|
104 |
|
|
105 |
public int getAggrTotal() { |
|
106 |
return aggrTotal; |
|
107 |
} |
|
108 |
|
|
109 |
public void setAggrTotal(final int aggrTotal) { |
|
110 |
this.aggrTotal = aggrTotal; |
|
111 |
} |
|
112 |
|
|
113 |
public String getProtocol() { |
|
114 |
return protocol; |
|
115 |
} |
|
116 |
|
|
117 |
public void setProtocol(final String protocol) { |
|
118 |
this.protocol = protocol; |
|
119 |
} |
|
120 |
|
|
121 |
} |
modules/dnet-datasource-manager-common/tags/dnet-datasource-manager-rmi-3.0.1/src/main/java/eu/dnetlib/enabling/datasources/rmi/DatasourceManagerService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import java.util.Date; |
|
4 |
import java.util.List; |
|
5 |
|
|
6 |
import javax.jws.WebParam; |
|
7 |
import javax.jws.WebService; |
|
8 |
|
|
9 |
import eu.dnetlib.common.rmi.BaseService; |
|
10 |
|
|
11 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
12 |
public interface DatasourceManagerService extends BaseService { |
|
13 |
|
|
14 |
/** |
|
15 |
* Register a datasource. |
|
16 |
* |
|
17 |
* @param ds |
|
18 |
* the new datasource |
|
19 |
* @throws DatasourceManagerServiceException |
|
20 |
*/ |
|
21 |
public boolean addDatasource(@WebParam(name = "ds") DatasourceDesc ds) throws DatasourceManagerServiceException; |
|
22 |
|
|
23 |
/** |
|
24 |
* Delete a datasource. |
|
25 |
* |
|
26 |
* @param dsId |
|
27 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
28 |
* @throws DatasourceManagerServiceException |
|
29 |
*/ |
|
30 |
public boolean deleteDatasource(@WebParam(name = "dsId") String dsId) throws DatasourceManagerServiceException; |
|
31 |
|
|
32 |
/** |
|
33 |
* Returns a datasource. |
|
34 |
* |
|
35 |
* @param dsId |
|
36 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
37 |
* @throws DatasourceManagerServiceException |
|
38 |
*/ |
|
39 |
public DatasourceDesc getDatasource(@WebParam(name = "dsId") String dsId) throws DatasourceManagerServiceException; |
|
40 |
|
|
41 |
/** |
|
42 |
* Returns all the datasources. |
|
43 |
* |
|
44 |
* @return a list of XML profiles |
|
45 |
* @throws DatasourceManagerServiceException |
|
46 |
*/ |
|
47 |
public List<DatasourceDesc> listAllDatasources() throws DatasourceManagerServiceException; |
|
48 |
|
|
49 |
/** |
|
50 |
* Returns the datasources with some properties. |
|
51 |
* |
|
52 |
* @param compliance |
|
53 |
* the level of compliance (or NULL to skip the test) |
|
54 |
* @param fileManagementMode |
|
55 |
* the fileManagementMode property (or NULL to skip the test) |
|
56 |
* @param contentDescription |
|
57 |
* the contentDescription property (or NULL to skip the test) |
|
58 |
* @param iisProcessingWorkflow |
|
59 |
* the iisProcessingWorkflow property (or NULL to skip the test) |
|
60 |
* @param collectedFrom |
|
61 |
* the collectedFrom property (or NULL to skip the test) |
|
62 |
* @return a list of XML profiles |
|
63 |
* @throws DatasourceManagerServiceException |
|
64 |
*/ |
|
65 |
public List<DatasourceDesc> listDatasourcesUsingFilter(@WebParam(name = "compliance") String compliance, |
|
66 |
@WebParam(name = "contentDescription") String contentDescription, |
|
67 |
@WebParam(name = "iisProcessingWorkflow") String iisProcessingWorkflow, |
|
68 |
@WebParam(name = "collectedFrom") String collectedFrom) throws DatasourceManagerServiceException; |
|
69 |
|
|
70 |
/** |
|
71 |
* updates the level of compliance of a datasource. |
|
72 |
* |
|
73 |
* @param dsId |
|
74 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
75 |
* @param ifaceId |
|
76 |
* the interface id |
|
77 |
* @param level |
|
78 |
* the new level of compliance |
|
79 |
* @return true if the operation ends successfully |
|
80 |
* @throws DatasourceManagerServiceException |
|
81 |
*/ |
|
82 |
public boolean updateLevelOfCompliance(@WebParam(name = "dsId") String dsId, |
|
83 |
@WebParam(name = "ifaceId") String ifaceId, |
|
84 |
@WebParam(name = "level") String level) throws DatasourceManagerServiceException; |
|
85 |
|
|
86 |
/** |
|
87 |
* update the baseUrl of an interface. |
|
88 |
* |
|
89 |
* @param dsId |
|
90 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
91 |
* @param ifaceId |
|
92 |
* the interface id |
|
93 |
* @param baseUrl |
|
94 |
* the new value |
|
95 |
* @return true if the operation ends successfully |
|
96 |
* @throws DatasourceManagerServiceException |
|
97 |
*/ |
|
98 |
public boolean updateBaseUrl(@WebParam(name = "dsId") String dsId, @WebParam(name = "ifaceId") String ifaceId, @WebParam(name = "baseUrl") String baseUrl) |
|
99 |
throws DatasourceManagerServiceException; |
|
100 |
|
|
101 |
/** |
|
102 |
* update the activation status of an interface (true = there is a related wf). |
|
103 |
* |
|
104 |
* @param dsId |
|
105 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
106 |
* @param ifaceId |
|
107 |
* the interface id |
|
108 |
* @param active |
|
109 |
* true if there is a related wf |
|
110 |
* @return true if the operation ends successfully |
|
111 |
* @throws DatasourceManagerServiceException |
|
112 |
*/ |
|
113 |
public boolean updateActivationStatus(@WebParam(name = "dsId") String dsId, |
|
114 |
@WebParam(name = "ifaceId") String ifaceId, |
|
115 |
@WebParam(name = "active") boolean active) throws DatasourceManagerServiceException; |
|
116 |
|
|
117 |
/** |
|
118 |
* update the "contentDescription" property of an interface. |
|
119 |
* |
|
120 |
* @param dsId |
|
121 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
122 |
* @param ifaceId |
|
123 |
* the interface id |
|
124 |
* @param desc |
|
125 |
* the new value |
|
126 |
* @return true if the operation ends successfully |
|
127 |
* @throws DatasourceManagerServiceException |
|
128 |
*/ |
|
129 |
public boolean updateContentDescription(@WebParam(name = "dsId") String dsId, |
|
130 |
@WebParam(name = "ifaceId") String ifaceId, |
|
131 |
@WebParam(name = "desc") String desc) throws DatasourceManagerServiceException; |
|
132 |
|
|
133 |
/** |
|
134 |
* update the "iis_processing_workflow" property of an interface. |
|
135 |
* |
|
136 |
* @param dsId |
|
137 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
138 |
* @param ifaceId |
|
139 |
* the interface id |
|
140 |
* @param wf |
|
141 |
* the new value |
|
142 |
* @return true if the operation ends successfully |
|
143 |
* @throws DatasourceManagerServiceException |
|
144 |
*/ |
|
145 |
public boolean setIisProcessingWorkflow(@WebParam(name = "dsId") String dsId, @WebParam(name = "ifaceId") String ifaceId, @WebParam(name = "wf") String wf) |
|
146 |
throws DatasourceManagerServiceException; |
|
147 |
|
|
148 |
/** |
|
149 |
* Set a generic extra field of an interface. |
|
150 |
* |
|
151 |
* @param dsId |
|
152 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
153 |
* @param ifaceId |
|
154 |
* the interface id |
|
155 |
* @param field |
|
156 |
* the field name |
|
157 |
* @param value |
|
158 |
* the new value (or null for removing it) |
|
159 |
* @param preserveOriginal |
|
160 |
* preserve the original value in the DB (the value is stored in the "edited" column) |
|
161 |
* @return true if the operation ends successfully |
|
162 |
* @throws DatasourceManagerServiceException |
|
163 |
*/ |
|
164 |
public boolean updateExtraField(@WebParam(name = "dsId") String dsId, |
|
165 |
@WebParam(name = "ifaceId") String ifaceId, |
|
166 |
@WebParam(name = "field") String field, |
|
167 |
@WebParam(name = "value") String value, |
|
168 |
@WebParam(name = "preserveOriginal") boolean preserveOriginal) throws DatasourceManagerServiceException; |
|
169 |
|
|
170 |
/** |
|
171 |
* Update an access param of an interface. |
|
172 |
* |
|
173 |
* @param dsId |
|
174 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
175 |
* @param ifaceId |
|
176 |
* the interface id |
|
177 |
* @param field |
|
178 |
* the field name |
|
179 |
* @param value |
|
180 |
* the new value (or null for removing it) |
|
181 |
* @param preserveOriginal |
|
182 |
* preserve the original value in the DB (the value is stored in the "edited" column) |
|
183 |
* @return true if the operation ends successfully |
|
184 |
* @throws DatasourceManagerServiceException |
|
185 |
*/ |
|
186 |
public boolean updateAccessParam(@WebParam(name = "dsId") String dsId, |
|
187 |
@WebParam(name = "ifaceId") String ifaceId, |
|
188 |
@WebParam(name = "field") String field, |
|
189 |
@WebParam(name = "value") String value, |
|
190 |
@WebParam(name = "preserveOriginal") boolean preserveOriginal) throws DatasourceManagerServiceException; |
|
191 |
|
|
192 |
/** |
|
193 |
* delete a generic extra field or an access param of an interface. |
|
194 |
* |
|
195 |
* @param dsId |
|
196 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
197 |
* @param ifaceId |
|
198 |
* the interface id |
|
199 |
* @param field |
|
200 |
* the field name |
|
201 |
* @return true if the operation ends successfully |
|
202 |
* @throws DatasourceManagerServiceException |
|
203 |
*/ |
|
204 |
public boolean deleteAccessParamOrExtraField(@WebParam(name = "dsId") String dsId, |
|
205 |
@WebParam(name = "ifaceId") String ifaceId, |
|
206 |
@WebParam(name = "field") String field) throws DatasourceManagerServiceException; |
|
207 |
|
|
208 |
/** |
|
209 |
* Add an interface to a datasource. |
|
210 |
* |
|
211 |
* @param dsId |
|
212 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
213 |
* @param iface |
|
214 |
* the interface description |
|
215 |
* @return true if the operation ends successfully |
|
216 |
* @throws DatasourceManagerServiceException |
|
217 |
*/ |
|
218 |
public boolean addInterface(@WebParam(name = "dsId") String dsId, @WebParam(name = "interface") IfaceDesc iface) throws DatasourceManagerServiceException; |
|
219 |
|
|
220 |
/** |
|
221 |
* Delete the interface of a datasource. |
|
222 |
* |
|
223 |
* @param dsId |
|
224 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
225 |
* @param ifcId |
|
226 |
* the id of the interface |
|
227 |
* @return true if the operation ends successfully |
|
228 |
* @throws DatasourceManagerServiceException |
|
229 |
*/ |
|
230 |
public boolean deleteInterface(@WebParam(name = "dsId") String dsId, @WebParam(name = "ifaceId") String ifaceId) throws DatasourceManagerServiceException; |
|
231 |
|
|
232 |
/** |
|
233 |
* Perform a generic SQL update on a datasource. |
|
234 |
* |
|
235 |
* @param dsId |
|
236 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
237 |
* @param sql |
|
238 |
* the sql query to insert/update/delete the datasource |
|
239 |
* @param delete |
|
240 |
* true if the profile must be deleted |
|
241 |
* @return true if the operation ends successfully |
|
242 |
* @throws DatasourceManagerServiceException |
|
243 |
*/ |
|
244 |
public boolean updateSQL(@WebParam(name = "dsId") String dsId, @WebParam(name = "sql") String sql, @WebParam(name = "delete") boolean delete) |
|
245 |
throws DatasourceManagerServiceException; |
|
246 |
|
|
247 |
|
|
248 |
/** |
|
249 |
* Calculate the next execution date of a related metaworkflow |
|
250 |
* |
|
251 |
* @param dsId |
|
252 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
253 |
* @param ifcId |
|
254 |
* the id of the interface |
|
255 |
* @return the date of the next scheduled execution (or null) |
|
256 |
* @throws DatasourceManagerServiceException |
|
257 |
*/ |
|
258 |
public Date findNextScheduledExecution(@WebParam(name = "dsId") String dsId, @WebParam(name = "ifaceId") String ifaceId) throws DatasourceManagerServiceException; |
|
259 |
|
|
260 |
|
|
261 |
} |
modules/dnet-datasource-manager-common/trunk/src/main/java/eu/dnetlib/enabling/datasources/rmi/DatasourceManagerService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import java.util.Date; |
|
4 |
import java.util.List; |
|
5 |
import java.util.Map; |
|
6 |
|
|
7 |
import javax.jws.WebParam; |
|
8 |
import javax.jws.WebService; |
|
9 |
|
|
10 |
import eu.dnetlib.common.rmi.BaseService; |
|
11 |
|
|
12 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
13 |
public interface DatasourceManagerService extends BaseService { |
|
14 |
|
|
15 |
/** |
|
16 |
* Register a datasource. |
|
17 |
* |
|
18 |
* @param ds |
|
19 |
* the new datasource |
|
20 |
* @throws DatasourceManagerServiceException |
|
21 |
*/ |
|
22 |
public boolean addDatasource(@WebParam(name = "ds") DatasourceDesc ds) throws DatasourceManagerServiceException; |
|
23 |
|
|
24 |
/** |
|
25 |
* Delete a datasource. |
|
26 |
* |
|
27 |
* @param dsId |
|
28 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
29 |
* @throws DatasourceManagerServiceException |
|
30 |
*/ |
|
31 |
public boolean deleteDatasource(@WebParam(name = "dsId") String dsId) throws DatasourceManagerServiceException; |
|
32 |
|
|
33 |
/** |
|
34 |
* Returns a datasource. |
|
35 |
* |
|
36 |
* @param dsId |
|
37 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
38 |
* @throws DatasourceManagerServiceException |
|
39 |
*/ |
|
40 |
public DatasourceDesc getDatasource(@WebParam(name = "dsId") String dsId) throws DatasourceManagerServiceException; |
|
41 |
|
|
42 |
/** |
|
43 |
* Returns all the datasources. |
|
44 |
* |
|
45 |
* @return a list of XML profiles |
|
46 |
* @throws DatasourceManagerServiceException |
|
47 |
*/ |
|
48 |
public List<DatasourceDesc> listAllDatasources() throws DatasourceManagerServiceException; |
|
49 |
|
|
50 |
/** |
|
51 |
* Returns the datasources with some properties. |
|
52 |
* |
|
53 |
* @param compliance |
|
54 |
* the level of compliance (or NULL to skip the test) |
|
55 |
* @param fileManagementMode |
|
56 |
* the fileManagementMode property (or NULL to skip the test) |
|
57 |
* @param contentDescription |
|
58 |
* the contentDescription property (or NULL to skip the test) |
|
59 |
* @param iisProcessingWorkflow |
|
60 |
* the iisProcessingWorkflow property (or NULL to skip the test) |
|
61 |
* @param collectedFrom |
|
62 |
* the collectedFrom property (or NULL to skip the test) |
|
63 |
* @return a list of XML profiles |
|
64 |
* @throws DatasourceManagerServiceException |
|
65 |
*/ |
|
66 |
public List<DatasourceDesc> listDatasourcesUsingFilter(@WebParam(name = "compliance") String compliance, |
|
67 |
@WebParam(name = "contentDescription") String contentDescription, |
|
68 |
@WebParam(name = "iisProcessingWorkflow") String iisProcessingWorkflow, |
|
69 |
@WebParam(name = "collectedFrom") String collectedFrom) throws DatasourceManagerServiceException; |
|
70 |
|
|
71 |
/** |
|
72 |
* updates the level of compliance of a api. |
|
73 |
* |
|
74 |
* @param dsId |
|
75 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
76 |
* @param ifaceId |
|
77 |
* the interface id |
|
78 |
* @param level |
|
79 |
* the new level of compliance |
|
80 |
* @return true if the operation ends successfully |
|
81 |
* @throws DatasourceManagerServiceException |
|
82 |
*/ |
|
83 |
public boolean updateLevelOfCompliance(@WebParam(name = "dsId") String dsId, |
|
84 |
@WebParam(name = "ifaceId") String ifaceId, |
|
85 |
@WebParam(name = "level") String level) throws DatasourceManagerServiceException; |
|
86 |
|
|
87 |
/** |
|
88 |
* Override the level of compliance of a api. |
|
89 |
* |
|
90 |
* @param dsId |
|
91 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
92 |
* @param ifaceId |
|
93 |
* the interface id |
|
94 |
* @param level |
|
95 |
* the new level of compliance |
|
96 |
* @return true if the operation ends successfully |
|
97 |
* @throws DatasourceManagerServiceException |
|
98 |
*/ |
|
99 |
public boolean overrideCompliance(@WebParam(name = "dsId") String dsId, |
|
100 |
@WebParam(name = "ifaceId") String ifaceId, |
|
101 |
@WebParam(name = "level") String level) throws DatasourceManagerServiceException; |
|
102 |
|
|
103 |
/** |
|
104 |
* update the baseUrl of an interface. |
|
105 |
* |
|
106 |
* @param dsId |
|
107 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
108 |
* @param ifaceId |
|
109 |
* the interface id |
|
110 |
* @param baseUrl |
|
111 |
* the new value |
|
112 |
* @return true if the operation ends successfully |
|
113 |
* @throws DatasourceManagerServiceException |
|
114 |
*/ |
|
115 |
public boolean updateBaseUrl(@WebParam(name = "dsId") String dsId, @WebParam(name = "ifaceId") String ifaceId, @WebParam(name = "baseUrl") String baseUrl) |
|
116 |
throws DatasourceManagerServiceException; |
|
117 |
|
|
118 |
/** |
|
119 |
* update the activation status of an interface (true = there is a related wf). |
|
120 |
* |
|
121 |
* @param dsId |
|
122 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
123 |
* @param ifaceId |
|
124 |
* the interface id |
|
125 |
* @param active |
|
126 |
* true if there is a related wf |
|
127 |
* @return true if the operation ends successfully |
|
128 |
* @throws DatasourceManagerServiceException |
|
129 |
*/ |
|
130 |
public boolean updateActivationStatus(@WebParam(name = "dsId") String dsId, |
|
131 |
@WebParam(name = "ifaceId") String ifaceId, |
|
132 |
@WebParam(name = "active") boolean active) throws DatasourceManagerServiceException; |
|
133 |
|
|
134 |
/** |
|
135 |
* update the "contentDescription" property of an interface. |
|
136 |
* |
|
137 |
* @param dsId |
|
138 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
139 |
* @param ifaceId |
|
140 |
* the interface id |
|
141 |
* @param desc |
|
142 |
* the new value |
|
143 |
* @return true if the operation ends successfully |
|
144 |
* @throws DatasourceManagerServiceException |
|
145 |
*/ |
|
146 |
public boolean updateContentDescription(@WebParam(name = "dsId") String dsId, |
|
147 |
@WebParam(name = "ifaceId") String ifaceId, |
|
148 |
@WebParam(name = "desc") String desc) throws DatasourceManagerServiceException; |
|
149 |
|
|
150 |
/** |
|
151 |
* update the "iis_processing_workflow" property of an interface. |
|
152 |
* |
|
153 |
* @param dsId |
|
154 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
155 |
* @param ifaceId |
|
156 |
* the interface id |
|
157 |
* @param wf |
|
158 |
* the new value |
|
159 |
* @return true if the operation ends successfully |
|
160 |
* @throws DatasourceManagerServiceException |
|
161 |
*/ |
|
162 |
public boolean setIisProcessingWorkflow(@WebParam(name = "dsId") String dsId, @WebParam(name = "ifaceId") String ifaceId, @WebParam(name = "wf") String wf) |
|
163 |
throws DatasourceManagerServiceException; |
|
164 |
|
|
165 |
/** |
|
166 |
* Set a generic extra field of an interface. |
|
167 |
* |
|
168 |
* @param dsId |
|
169 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
170 |
* @param ifaceId |
|
171 |
* the interface id |
|
172 |
* @param field |
|
173 |
* the field name |
|
174 |
* @param value |
|
175 |
* the new value (or null for removing it) |
|
176 |
* @param preserveOriginal |
|
177 |
* preserve the original value in the DB (the value is stored in the "edited" column) |
|
178 |
* @return true if the operation ends successfully |
|
179 |
* @throws DatasourceManagerServiceException |
|
180 |
*/ |
|
181 |
public boolean updateExtraField(@WebParam(name = "dsId") String dsId, |
|
182 |
@WebParam(name = "ifaceId") String ifaceId, |
|
183 |
@WebParam(name = "field") String field, |
|
184 |
@WebParam(name = "value") String value, |
|
185 |
@WebParam(name = "preserveOriginal") boolean preserveOriginal) throws DatasourceManagerServiceException; |
|
186 |
|
|
187 |
/** |
|
188 |
* Update an access param of an interface. |
|
189 |
* |
|
190 |
* @param dsId |
|
191 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
192 |
* @param ifaceId |
|
193 |
* the interface id |
|
194 |
* @param field |
|
195 |
* the field name |
|
196 |
* @param value |
|
197 |
* the new value (or null for removing it) |
|
198 |
* @param preserveOriginal |
|
199 |
* preserve the original value in the DB (the value is stored in the "edited" column) |
|
200 |
* @return true if the operation ends successfully |
|
201 |
* @throws DatasourceManagerServiceException |
|
202 |
*/ |
|
203 |
public boolean updateAccessParam(@WebParam(name = "dsId") String dsId, |
|
204 |
@WebParam(name = "ifaceId") String ifaceId, |
|
205 |
@WebParam(name = "field") String field, |
|
206 |
@WebParam(name = "value") String value, |
|
207 |
@WebParam(name = "preserveOriginal") boolean preserveOriginal) throws DatasourceManagerServiceException; |
|
208 |
|
|
209 |
/** |
|
210 |
* delete a generic extra field or an access param of an interface. |
|
211 |
* |
|
212 |
* @param dsId |
|
213 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
214 |
* @param ifaceId |
|
215 |
* the interface id |
|
216 |
* @param field |
|
217 |
* the field name |
|
218 |
* @return true if the operation ends successfully |
|
219 |
* @throws DatasourceManagerServiceException |
|
220 |
*/ |
|
221 |
public boolean deleteAccessParamOrExtraField(@WebParam(name = "dsId") String dsId, |
|
222 |
@WebParam(name = "ifaceId") String ifaceId, |
|
223 |
@WebParam(name = "field") String field) throws DatasourceManagerServiceException; |
|
224 |
|
|
225 |
/** |
|
226 |
* Add an interface to a datasource. |
|
227 |
* |
|
228 |
* @param dsId |
|
229 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
230 |
* @param iface |
|
231 |
* the interface description |
|
232 |
* @return true if the operation ends successfully |
|
233 |
* @throws DatasourceManagerServiceException |
|
234 |
*/ |
|
235 |
public boolean addInterface(@WebParam(name = "dsId") String dsId, @WebParam(name = "interface") IfaceDesc iface) throws DatasourceManagerServiceException; |
|
236 |
|
|
237 |
/** |
|
238 |
* Delete the interface of a datasource. |
|
239 |
* |
|
240 |
* @param dsId |
|
241 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
242 |
* @param ifcId |
|
243 |
* the id of the interface |
|
244 |
* @return true if the operation ends successfully |
|
245 |
* @throws DatasourceManagerServiceException |
|
246 |
*/ |
|
247 |
public boolean deleteInterface(@WebParam(name = "dsId") String dsId, @WebParam(name = "ifaceId") String ifaceId) throws DatasourceManagerServiceException; |
|
248 |
|
|
249 |
/** |
|
250 |
* Perform a generic SQL update on a datasource. |
|
251 |
* |
|
252 |
* @param dsId |
|
253 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
254 |
* @param sql |
|
255 |
* the sql query to insert/update/delete the datasource |
|
256 |
* @param delete |
|
257 |
* true if the profile must be deleted |
|
258 |
* @return true if the operation ends successfully |
|
259 |
* @throws DatasourceManagerServiceException |
|
260 |
*/ |
|
261 |
public boolean updateSQL(@WebParam(name = "dsId") String dsId, @WebParam(name = "sql") String sql, @WebParam(name = "delete") boolean delete) |
|
262 |
throws DatasourceManagerServiceException; |
|
263 |
|
|
264 |
/** |
|
265 |
* Calculate the next execution date of a related metaworkflow |
|
266 |
* |
|
267 |
* @param dsId |
|
268 |
* the OpenAireDataSourceId (example: opendoar____::2101) |
|
269 |
* @param ifcId |
|
270 |
* the id of the interface |
|
271 |
* @return the date of the next scheduled execution (or null) |
|
272 |
* @throws DatasourceManagerServiceException |
|
273 |
*/ |
|
274 |
public Date findNextScheduledExecution(@WebParam(name = "dsId") String dsId, @WebParam(name = "ifaceId") String ifaceId) |
|
275 |
throws DatasourceManagerServiceException; |
|
276 |
|
|
277 |
public boolean bulkUpdateApiExtraFields(@WebParam(name = "dsId") String dsId, |
|
278 |
@WebParam(name = "ifaceId") String ifaceId, |
|
279 |
@WebParam(name = "fields") Map<String, String> fields) throws DatasourceManagerServiceException; |
|
280 |
|
|
281 |
public boolean bulkUpdateApiAccessParams(@WebParam(name = "dsId") String dsId, |
|
282 |
@WebParam(name = "ifaceId") String ifaceId, |
|
283 |
@WebParam(name = "params") Map<String, String> params) throws DatasourceManagerServiceException; |
|
284 |
|
|
285 |
public List<BrowsableField> listBrowsableFields() throws DatasourceManagerServiceException; |
|
286 |
|
|
287 |
public List<BrowseTerm> browseField(@WebParam(name = "field") final String field) throws DatasourceManagerServiceException; |
|
288 |
|
|
289 |
public List<SearchInterfacesEntry> searchInterface(@WebParam(name = "field") final String field, @WebParam(name = "value") final String value) |
|
290 |
throws DatasourceManagerServiceException; |
|
291 |
|
|
292 |
public List<RepositoryMapEntry> getRepositoryMap() throws DatasourceManagerServiceException; |
|
293 |
|
|
294 |
public List<SimpleDatasourceDesc> simpleListDatasourcesByType(@WebParam(name = "type") String type) throws DatasourceManagerServiceException; |
|
295 |
|
|
296 |
} |
modules/dnet-datasource-manager-common/trunk/src/main/java/eu/dnetlib/enabling/datasources/rmi/DatasourceConstants.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
public class DatasourceConstants { |
|
4 |
|
|
5 |
public static final String OVERRIDING_COMPLIANCE_FIELD = "overriding_compliance"; |
|
6 |
|
|
7 |
} |
modules/dnet-datasource-manager-common/trunk/src/main/java/eu/dnetlib/enabling/datasources/rmi/BrowseTerm.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import javax.xml.bind.annotation.XmlRootElement; |
|
4 |
|
|
5 |
@XmlRootElement |
|
6 |
public class BrowseTerm implements Comparable<BrowseTerm> { |
|
7 |
|
|
8 |
private String id; |
|
9 |
private String name; |
|
10 |
private int value; |
|
11 |
|
|
12 |
public BrowseTerm() {} |
|
13 |
|
|
14 |
public BrowseTerm(final String id, final String name, final int value) { |
|
15 |
this.id = id; |
|
16 |
this.name = name; |
|
17 |
this.value = value; |
|
18 |
} |
|
19 |
|
|
20 |
public String getId() { |
|
21 |
return id; |
|
22 |
} |
|
23 |
|
|
24 |
public void setId(final String id) { |
|
25 |
this.id = id; |
|
26 |
} |
|
27 |
|
|
28 |
public int getValue() { |
|
29 |
return value; |
|
30 |
} |
|
31 |
|
|
32 |
public void setValue(final int value) { |
|
33 |
this.value = value; |
|
34 |
} |
|
35 |
|
|
36 |
public String getName() { |
|
37 |
return name; |
|
38 |
} |
|
39 |
|
|
40 |
public void setName(final String name) { |
|
41 |
this.name = name; |
|
42 |
} |
|
43 |
|
|
44 |
@Override |
|
45 |
public int compareTo(final BrowseTerm o) { |
|
46 |
return Integer.compare(value, o.getValue()); |
|
47 |
} |
|
48 |
} |
modules/dnet-datasource-manager-common/tags/dnet-datasource-manager-rmi-4.0.0/src/main/java/eu/dnetlib/enabling/datasources/rmi/IfaceDesc.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import java.util.HashMap; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import javax.xml.bind.annotation.XmlRootElement; |
|
7 |
|
|
8 |
@XmlRootElement |
|
9 |
public class IfaceDesc { |
|
10 |
|
|
11 |
private String id; |
|
12 |
private String typology; |
|
13 |
private String compliance; |
|
14 |
private String contentDescription; |
|
15 |
private String accessProtocol; |
|
16 |
private String baseUrl; |
|
17 |
private boolean active = false; |
|
18 |
private boolean removable = false; |
|
19 |
private Map<String, String> accessParams = new HashMap<String, String>(); |
|
20 |
private Map<String, String> extraFields = new HashMap<String, String>(); |
|
21 |
|
|
22 |
public IfaceDesc() {} |
|
23 |
|
|
24 |
public String getId() { |
|
25 |
return id; |
|
26 |
} |
|
27 |
|
|
28 |
public void setId(final String id) { |
|
29 |
this.id = id; |
|
30 |
} |
|
31 |
|
|
32 |
public String getTypology() { |
|
33 |
return typology; |
|
34 |
} |
|
35 |
|
|
36 |
public void setTypology(final String typology) { |
|
37 |
this.typology = typology; |
|
38 |
} |
|
39 |
|
|
40 |
public String getCompliance() { |
|
41 |
return compliance; |
|
42 |
} |
|
43 |
|
|
44 |
public void setCompliance(final String compliance) { |
|
45 |
this.compliance = compliance; |
|
46 |
} |
|
47 |
|
|
48 |
public String getContentDescription() { |
|
49 |
return contentDescription; |
|
50 |
} |
|
51 |
|
|
52 |
public void setContentDescription(final String contentDescription) { |
|
53 |
this.contentDescription = contentDescription; |
|
54 |
} |
|
55 |
|
|
56 |
public String getAccessProtocol() { |
|
57 |
return accessProtocol; |
|
58 |
} |
|
59 |
|
|
60 |
public void setAccessProtocol(final String accessProtocol) { |
|
61 |
this.accessProtocol = accessProtocol; |
|
62 |
} |
|
63 |
|
|
64 |
public String getBaseUrl() { |
|
65 |
return baseUrl; |
|
66 |
} |
|
67 |
|
|
68 |
public void setBaseUrl(final String baseUrl) { |
|
69 |
this.baseUrl = baseUrl; |
|
70 |
} |
|
71 |
|
|
72 |
public Map<String, String> getAccessParams() { |
|
73 |
return accessParams; |
|
74 |
} |
|
75 |
|
|
76 |
public void setAccessParams(final Map<String, String> accessParams) { |
|
77 |
this.accessParams = accessParams; |
|
78 |
} |
|
79 |
|
|
80 |
public Map<String, String> getExtraFields() { |
|
81 |
return extraFields; |
|
82 |
} |
|
83 |
|
|
84 |
public void setExtraFields(final Map<String, String> extraFields) { |
|
85 |
this.extraFields = extraFields; |
|
86 |
} |
|
87 |
|
|
88 |
public boolean getActive() { |
|
89 |
return active; |
|
90 |
} |
|
91 |
|
|
92 |
public void setActive(final boolean active) { |
|
93 |
this.active = active; |
|
94 |
} |
|
95 |
|
|
96 |
public boolean getRemovable() { |
|
97 |
return removable; |
|
98 |
} |
|
99 |
|
|
100 |
public void setRemovable(final boolean removable) { |
|
101 |
this.removable = removable; |
|
102 |
} |
|
103 |
|
|
104 |
} |
modules/dnet-datasource-manager-common/tags/dnet-datasource-manager-rmi-3.0.1/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
3 |
<parent> |
|
4 |
<groupId>eu.dnetlib</groupId> |
|
5 |
<artifactId>dnet-parent</artifactId> |
|
6 |
<version>1.0.0</version> |
|
7 |
<relativePath /> |
|
8 |
</parent> |
|
9 |
<modelVersion>4.0.0</modelVersion> |
|
10 |
<groupId>eu.dnetlib</groupId> |
|
11 |
<artifactId>dnet-datasource-manager-rmi</artifactId> |
|
12 |
<packaging>jar</packaging> |
|
13 |
<version>3.0.1</version> |
|
14 |
<scm> |
|
15 |
<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-datasource-manager-rmi/tags/dnet-datasource-manager-rmi-3.0.1</developerConnection> |
|
16 |
</scm> |
|
17 |
<dependencies> |
|
18 |
<dependency> |
|
19 |
<groupId>eu.dnetlib</groupId> |
|
20 |
<artifactId>cnr-rmi-api</artifactId> |
|
21 |
<version>[2.0.0,3.0.0)</version> |
|
22 |
</dependency> |
|
23 |
</dependencies> |
|
24 |
</project> |
modules/dnet-datasource-manager-common/tags/dnet-datasource-manager-rmi-3.0.1/src/main/java/eu/dnetlib/enabling/datasources/rmi/IfaceDesc.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import java.util.HashMap; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import javax.xml.bind.annotation.XmlRootElement; |
|
7 |
|
|
8 |
@XmlRootElement |
|
9 |
public class IfaceDesc { |
|
10 |
|
|
11 |
private String id; |
|
12 |
private String typology; |
|
13 |
private String compliance; |
|
14 |
private String contentDescription; |
|
15 |
private String accessProtocol; |
|
16 |
private String baseUrl; |
|
17 |
private boolean active = false; |
|
18 |
private boolean removable = false; |
|
19 |
private Map<String, String> accessParams = new HashMap<String, String>(); |
|
20 |
private Map<String, String> extraFields = new HashMap<String, String>(); |
|
21 |
|
|
22 |
public IfaceDesc() {} |
|
23 |
|
|
24 |
public String getId() { |
|
25 |
return id; |
|
26 |
} |
|
27 |
|
|
28 |
public void setId(final String id) { |
|
29 |
this.id = id; |
|
30 |
} |
|
31 |
|
|
32 |
public String getTypology() { |
|
33 |
return typology; |
|
34 |
} |
|
35 |
|
|
36 |
public void setTypology(final String typology) { |
|
37 |
this.typology = typology; |
|
38 |
} |
|
39 |
|
|
40 |
public String getCompliance() { |
|
41 |
return compliance; |
|
42 |
} |
|
43 |
|
|
44 |
public void setCompliance(final String compliance) { |
|
45 |
this.compliance = compliance; |
|
46 |
} |
|
47 |
|
|
48 |
public String getContentDescription() { |
|
49 |
return contentDescription; |
|
50 |
} |
|
51 |
|
|
52 |
public void setContentDescription(final String contentDescription) { |
|
53 |
this.contentDescription = contentDescription; |
|
54 |
} |
|
55 |
|
|
56 |
public String getAccessProtocol() { |
|
57 |
return accessProtocol; |
|
58 |
} |
|
59 |
|
|
60 |
public void setAccessProtocol(final String accessProtocol) { |
|
61 |
this.accessProtocol = accessProtocol; |
|
62 |
} |
|
63 |
|
|
64 |
public String getBaseUrl() { |
|
65 |
return baseUrl; |
|
66 |
} |
|
67 |
|
|
68 |
public void setBaseUrl(final String baseUrl) { |
|
69 |
this.baseUrl = baseUrl; |
|
70 |
} |
|
71 |
|
|
72 |
public Map<String, String> getAccessParams() { |
|
73 |
return accessParams; |
|
74 |
} |
|
75 |
|
|
76 |
public void setAccessParams(final Map<String, String> accessParams) { |
|
77 |
this.accessParams = accessParams; |
|
78 |
} |
|
79 |
|
|
80 |
public Map<String, String> getExtraFields() { |
|
81 |
return extraFields; |
|
82 |
} |
|
83 |
|
|
84 |
public void setExtraFields(final Map<String, String> extraFields) { |
|
85 |
this.extraFields = extraFields; |
|
86 |
} |
|
87 |
|
|
88 |
public boolean getActive() { |
|
89 |
return active; |
|
90 |
} |
|
91 |
|
|
92 |
public void setActive(final boolean active) { |
|
93 |
this.active = active; |
|
94 |
} |
|
95 |
|
|
96 |
public boolean getRemovable() { |
|
97 |
return removable; |
|
98 |
} |
|
99 |
|
|
100 |
public void setRemovable(final boolean removable) { |
|
101 |
this.removable = removable; |
|
102 |
} |
|
103 |
|
|
104 |
} |
modules/dnet-datasource-manager-common/tags/dnet-datasource-manager-rmi-3.0.1/src/main/java/eu/dnetlib/enabling/datasources/rmi/DatasourceManagerServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import eu.dnetlib.common.rmi.RMIException; |
|
4 |
|
|
5 |
public class DatasourceManagerServiceException extends RMIException { |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
*/ |
|
10 |
private static final long serialVersionUID = -5987839351772223236L; |
|
11 |
|
|
12 |
public DatasourceManagerServiceException(final String string) { |
|
13 |
super(string); |
|
14 |
} |
|
15 |
|
|
16 |
public DatasourceManagerServiceException(final String string, final Throwable exception) { |
|
17 |
super(string, exception); |
|
18 |
} |
|
19 |
|
|
20 |
public DatasourceManagerServiceException(final Throwable exception) { |
|
21 |
super(exception); |
|
22 |
} |
|
23 |
|
|
24 |
} |
modules/dnet-datasource-manager-common/trunk/src/main/java/eu/dnetlib/enabling/datasources/rmi/SearchInterfacesEntry.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.datasources.rmi; |
|
2 |
|
|
3 |
import javax.xml.bind.annotation.XmlRootElement; |
|
4 |
|
|
5 |
@XmlRootElement |
|
6 |
public class SearchInterfacesEntry implements Comparable<SearchInterfacesEntry> { |
|
7 |
|
|
8 |
private String id; |
|
9 |
private String compliance; |
|
10 |
private String protocol; |
|
11 |
private boolean active; |
|
12 |
private String repoId = "unknown"; |
|
13 |
private String repoName = "unknown"; |
|
14 |
private String repoCountry = "-"; |
|
15 |
private String repoPrefix = ""; |
|
16 |
private String aggrDate = ""; |
|
17 |
private int aggrTotal = 0; |
|
18 |
|
|
19 |
public SearchInterfacesEntry() {} |
|
20 |
|
|
21 |
public SearchInterfacesEntry(final String id, final String compliance, final String protocol, final boolean active, final String repoId, |
|
22 |
final String repoName, final String repoCountry, |
|
23 |
final String repoPrefix, final String aggrDate, final int aggrTotal) { |
|
24 |
this.id = id; |
|
25 |
this.compliance = compliance; |
|
26 |
this.protocol = protocol; |
|
27 |
this.active = active; |
|
28 |
this.repoId = repoId; |
|
29 |
this.repoName = repoName; |
|
30 |
this.repoCountry = repoCountry; |
|
31 |
this.repoPrefix = repoPrefix; |
|
32 |
this.aggrDate = aggrDate; |
|
33 |
this.aggrTotal = aggrTotal; |
|
34 |
} |
|
35 |
|
|
36 |
public String getId() { |
|
37 |
return id; |
|
38 |
} |
|
39 |
|
|
40 |
public void setId(final String id) { |
|
41 |
this.id = id; |
|
42 |
} |
|
43 |
|
|
44 |
public String getCompliance() { |
|
45 |
return compliance; |
|
46 |
} |
|
47 |
|
|
48 |
public void setCompliance(final String compliance) { |
|
49 |
this.compliance = compliance; |
|
50 |
} |
|
51 |
|
|
52 |
public boolean isActive() { |
|
53 |
return active; |
|
54 |
} |
|
55 |
|
|
56 |
public void setActive(final boolean active) { |
|
57 |
this.active = active; |
|
58 |
} |
|
59 |
|
|
60 |
public String getRepoId() { |
|
61 |
return repoId; |
|
62 |
} |
|
63 |
|
|
64 |
public void setRepoId(final String repoId) { |
|
65 |
this.repoId = repoId; |
|
66 |
} |
|
67 |
|
|
68 |
public String getRepoName() { |
|
69 |
return repoName; |
|
70 |
} |
|
71 |
|
|
72 |
public void setRepoName(final String repoName) { |
|
73 |
this.repoName = repoName; |
|
74 |
} |
|
75 |
|
|
76 |
public String getRepoCountry() { |
|
77 |
return repoCountry; |
|
78 |
} |
|
79 |
|
|
80 |
public void setRepoCountry(final String repoCountry) { |
|
81 |
this.repoCountry = repoCountry; |
|
82 |
} |
|
83 |
|
|
84 |
public String getRepoPrefix() { |
|
85 |
return repoPrefix; |
|
86 |
} |
|
87 |
|
|
88 |
public void setRepoPrefix(final String repoPrefix) { |
|
89 |
this.repoPrefix = repoPrefix; |
|
90 |
} |
|
91 |
|
|
92 |
@Override |
|
93 |
public int compareTo(final SearchInterfacesEntry e) { |
|
94 |
return compliance.compareTo(e.getCompliance()); |
|
95 |
} |
|
96 |
|
|
97 |
public String getAggrDate() { |
|
98 |
return aggrDate; |
|
99 |
} |
|
100 |
|
|
101 |
public void setAggrDate(final String aggrDate) { |
|
102 |
this.aggrDate = aggrDate; |
|
103 |
} |
|
104 |
|
|
105 |
public int getAggrTotal() { |
|
106 |
return aggrTotal; |
|
107 |
} |
|
108 |
|
|
109 |
public void setAggrTotal(final int aggrTotal) { |
|
110 |
this.aggrTotal = aggrTotal; |
|
111 |
} |
|
112 |
|
|
113 |
public String getProtocol() { |
|
114 |
return protocol; |
|
115 |
} |
Also available in: Unified diff
new module