Project

General

Profile

« Previous | Next » 

Revision 45207

codebase used to migrate to java8 the production system

View differences:

modules/dnet-data-provision-rmi/releases/0.0.1/deploy.info
1
{"type_source": "SVN", "goal": "package -U -T 4C source:jar", "url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-data-provision-rmi/trunk/", "deploy_repository": "dnet4-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/dnet4-snapshots", "name": "dnet-data-provision-rmi"}
modules/dnet-data-provision-rmi/releases/0.0.1/src/main/java/eu/dnetlib/data/provision/ResultsResponse.java
1
/**
2
 * Copyright 2008-2009 DRIVER PROJECT (ICM UW)
3
 * Original author: Marek Horst
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License");
6
 * you may not use this file except in compliance with the License.
7
 * You may obtain a copy of the License at
8
 *
9
 *      http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 */
17
package eu.dnetlib.data.provision;
18

  
19
/**
20
 * Data Provider result.
21
 * @author Marek Horst
22
 * @version 0.0.1
23
 *
24
 */
25
public class ResultsResponse {
26
	
27
	protected String status;
28
    
29
	protected int total;
30
	
31
	public String getStatus() {
32
		return status;
33
	}
34
	public void setStatus(String status) {
35
		this.status = status;
36
	}
37
	public int getTotal() {
38
		return total;
39
	}
40
	public void setTotal(int total) {
41
		this.total = total;
42
	}
43
}
modules/dnet-data-provision-rmi/releases/0.0.1/src/main/java/eu/dnetlib/data/provision/index/rmi/IndexServiceException.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
public class IndexServiceException extends Exception {
4

  
5
	private static final long serialVersionUID = 8330264706967294512L;
6

  
7
	public IndexServiceException() {
8
		super();
9
	}
10

  
11
	public IndexServiceException(String message, Throwable cause) {
12
		super(message, cause);
13
	}
14

  
15
	public IndexServiceException(String message) {
16
		super(message);
17
	}
18

  
19
	public IndexServiceException(Throwable cause) {
20
		super(cause);
21
	}
22

  
23
}
modules/dnet-data-provision-rmi/releases/0.0.1/src/main/java/eu/dnetlib/data/provision/index/rmi/IndexService.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
import java.util.List;
4

  
5
import javax.jws.WebMethod;
6
import javax.jws.WebParam;
7
import javax.jws.WebService;
8
import javax.xml.ws.wsaddressing.W3CEndpointReference;
9

  
10
import eu.dnetlib.common.rmi.BaseService;
11

  
12
/**
13
 * Interface for the IndexService.
14
 * 
15
 * @author alessia
16
 * 
17
 */
18
@WebService(targetNamespace = "http://services.dnetlib.eu/")
19
public interface IndexService extends BaseService {
20

  
21
	/**
22
	 * Searches records matching the given CQL query in the index for the given metadata format, layout and interpretation.
23
	 * <p>
24
	 * If ixId is equals ignore case ALL, then the search is performed on all virtual indices. Otherwise the search is performed only the
25
	 * virtual index with the given identifier.
26
	 * </p>
27
	 * 
28
	 * @param ixId
29
	 *            identifier of the virtual index, or ALL.
30
	 * @param query
31
	 *            CQL query
32
	 * @param mdformat
33
	 *            format of the target index
34
	 * @param layout
35
	 *            layout of the target index
36
	 * @param interpretation
37
	 *            interpretation of the target index
38
	 * @return an endpoint to the ResultSet containing the matching records.
39
	 * @throws IndexServiceException
40
	 */
41
	@WebMethod(operationName = "lookup", action = "lookup")
42
	public W3CEndpointReference lookup(@WebParam(name = "id") final String ixId,
43
			@WebParam(name = "query") final String query,
44
			@WebParam(name = "mdformat") final String mdformat,
45
			@WebParam(name = "layout") final String layout,
46
			@WebParam(name = "interpretation") final String interpretation) throws IndexServiceException;
47

  
48
	/**
49
	 * 
50
	 * Searches records matching the given CQL query in the index for the given metadata format, layout and interpretation.
51
	 * 
52
	 * @param query
53
	 *            CQL query
54
	 * @param mdformat
55
	 *            format of the target index
56
	 * @param layout
57
	 *            layout of the target index
58
	 * @param interpretation
59
	 *            interpretation of the target index
60
	 * @return an endpoint to the ResultSet containing the matching records.
61
	 * @throws IndexServiceException
62
	 */
63
	@WebMethod(operationName = "lookupAll", action = "lookupAll")
64
	public W3CEndpointReference lookup(@WebParam(name = "query") final String query,
65
			@WebParam(name = "mdformat") final String mdformat,
66
			@WebParam(name = "layout") final String layout,
67
			@WebParam(name = "interpretation") final String interpretation) throws IndexServiceException;
68

  
69
	/**
70
	 * Browses the index with the given metadata format, layout and interpretation according to the given CQL query.
71
	 * <p>
72
	 * If ixId is equals ignore case ALL, then the browse is performed on all virtual indices. Otherwise the browse is performed only in the
73
	 * virtual index with the given identifier.
74
	 * </p>
75
	 * 
76
	 * @param ixId
77
	 *            identifier of the virtual index, or ALL.
78
	 * @param query
79
	 *            CQL query
80
	 * @param mdformat
81
	 *            format of the target index
82
	 * @param layout
83
	 *            layout of the target index
84
	 * @param interpretation
85
	 *            interpretation of the target index
86
	 * @throws IndexServiceException
87
	 * @return an endpoint to a ResultSet with the browsing results.
88
	 */
89
	@WebMethod(operationName = "browse", action = "browse")
90
	public W3CEndpointReference browse(@WebParam(name = "index") final String ixId,
91
			@WebParam(name = "query") final String query,
92
			@WebParam(name = "mdformat") final String mdFormat,
93
			@WebParam(name = "layout") final String layout,
94
			@WebParam(name = "interpretation") final String interpretation) throws IndexServiceException;
95

  
96
	/**
97
	 * Browses the index with the given metadata format, layout and interpretation according to the given CQL query.
98
	 * 
99
	 * @param query
100
	 *            CQL query
101
	 * @param mdformat
102
	 *            format of the target index
103
	 * @param layout
104
	 *            layout of the target index
105
	 * @param interpretation
106
	 *            interpretation of the target index
107
	 * 
108
	 * @throws IndexServiceException
109
	 * @return an endpoint to a ResultSet with the browsing results.
110
	 */
111
	@WebMethod(operationName = "browseAll", action = "browseAll")
112
	public W3CEndpointReference browse(@WebParam(name = "query") final String query,
113
			@WebParam(name = "mdformat") final String mdFormat,
114
			@WebParam(name = "layout") final String layout,
115
			@WebParam(name = "interpretation") final String interpretation) throws IndexServiceException;
116

  
117
	@WebMethod(operationName = "getIndexFiles", action = "getIndexFiles")
118
	public List<String> getIndexFiles(@WebParam(name = "mdformat") final String format,
119
			@WebParam(name = "layout") final String layout,
120
			@WebParam(name = "interpretation") final String interpretation);
121

  
122
	/**
123
	 * Returns list of all stored indices.
124
	 * 
125
	 * @return list of all stored indices
126
	 */
127
	@WebMethod(operationName = "getListOfIndices", action = "getListOfIndices")
128
	public List<String> getListOfIndices();
129

  
130
	/**
131
	 * Returns list of all stored indices in CSV format.
132
	 * 
133
	 * @return list of all stored indices in CSV format
134
	 */
135
	@WebMethod(operationName = "getListOfIndicesCSV", action = "getListOfIndicesCSV")
136
	public String getListOfIndicesCSV();
137
}
modules/dnet-data-provision-rmi/releases/0.0.1/src/main/resources/eu/dnetlib/applicationContext-dnet-data-provision-rmi.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
4
	xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:wsa="http://cxf.apache.org/ws/addressing"
5
	xmlns:p="http://www.springframework.org/schema/p" xmlns:http="http://cxf.apache.org/transports/http/configuration"
6
	xmlns:t="http://dnetlib.eu/springbeans/t" xmlns:template="http://dnetlib.eu/springbeans/template"
7
	xmlns:util="http://www.springframework.org/schema/util"
8
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
9
                                    http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws-addr-conf.xsd
10
                                    http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
11
                                    http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
12
                            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
13
                            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
14
                            http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd">
15

  
16

  
17

  
18

  
19
</beans>
modules/dnet-data-provision-rmi/releases/0.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-SNAPSHOT</version>
7
    <relativePath></relativePath>
8
  </parent>
9
  <modelVersion>4.0.0</modelVersion>
10
  <groupId>eu.dnetlib</groupId>
11
  <artifactId>dnet-data-provision-rmi</artifactId>
12
  <packaging>jar</packaging>
13
  <version>0.0.1-SNAPSHOT</version>
14
  <dependencies>
15
    <dependency>
16
      <groupId>eu.dnetlib</groupId>
17
      <artifactId>cnr-rmi-api</artifactId>
18
      <version>[2.0.0-SNAPSHOT]</version>
19
    </dependency>
20
  </dependencies>
21
</project>
modules/dnet-data-provision-rmi/trunk/deploy.info
1
{"type_source": "SVN", "goal": "package -U -T 4C source:jar", "url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-data-provision-rmi/trunk/", "deploy_repository": "dnet4-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/dnet4-snapshots", "name": "dnet-data-provision-rmi"}
modules/dnet-data-provision-rmi/trunk/src/main/java/eu/dnetlib/data/provision/index/rmi/BrowsingRow.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
import java.util.List;
4

  
5
import javax.xml.bind.annotation.XmlAccessType;
6
import javax.xml.bind.annotation.XmlAccessorType;
7
import javax.xml.bind.annotation.XmlElement;
8
import javax.xml.bind.annotation.XmlRootElement;
9

  
10
/**
11
 * 
12
 * serialization of the browsing result.
13
 * 
14
 * <row> <groupresult field="facetFieldName1"> <value>facetFieldValue</value> <count>1</count> </groupresult>
15
 * 
16
 * <groupresult field="facetFieldName2"> <value>facetFieldValue</value> <count>1</count> </groupresult>
17
 * 
18
 * </row>
19
 * 
20
 * @author claudio
21
 * 
22
 */
23
@XmlRootElement(namespace = "", name = "row")
24
@XmlAccessorType(XmlAccessType.FIELD)
25
public class BrowsingRow {
26

  
27
	@XmlElement(name = "groupresult", required = true)
28
	private List<GroupResult> groupresult;
29

  
30
	public BrowsingRow() {}
31

  
32
	public BrowsingRow(final List<GroupResult> groupresult) {
33
		this.groupresult = groupresult;
34
	}
35

  
36
	/**
37
	 * adds a GroupResult.
38
	 * 
39
	 * @param fieldName
40
	 * @param fieldValue
41
	 * @param count
42
	 */
43
	public void addBrowsingRow(final String fieldName, final String fieldValue, final int count) {
44
		groupresult.add(new GroupResult(fieldName, fieldValue, count));
45
	}
46

  
47
	@Override
48
	public boolean equals(final Object obj) {
49

  
50
		if (!(obj instanceof BrowsingRow)) return false;
51

  
52
		final BrowsingRow brws = (BrowsingRow) obj;
53

  
54
		return groupresult.equals(brws.getGroupResult());
55
	}
56

  
57
	public List<GroupResult> getGroupResult() {
58
		return groupresult;
59
	}
60

  
61
	public void setGroupResult(final List<GroupResult> groupresult) {
62
		this.groupresult = groupresult;
63
	}
64

  
65
}
modules/dnet-data-provision-rmi/trunk/src/main/java/eu/dnetlib/data/provision/index/rmi/protocols/IndexProtocols.java
1
package eu.dnetlib.data.provision.index.rmi.protocols;
2

  
3
public enum IndexProtocols {
4
	SOLR, SOLR_CLOUD
5
}
modules/dnet-data-provision-rmi/trunk/src/main/java/eu/dnetlib/data/provision/index/rmi/IndexServiceException.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
public class IndexServiceException extends Exception {
4

  
5
	private static final long serialVersionUID = 8330264706967294512L;
6

  
7
	public IndexServiceException() {
8
		super();
9
	}
10

  
11
	public IndexServiceException(String message, Throwable cause) {
12
		super(message, cause);
13
	}
14

  
15
	public IndexServiceException(String message) {
16
		super(message);
17
	}
18

  
19
	public IndexServiceException(Throwable cause) {
20
		super(cause);
21
	}
22

  
23
}
modules/dnet-data-provision-rmi/trunk/src/main/java/eu/dnetlib/data/provision/index/rmi/IndexService.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
import java.util.List;
4

  
5
import javax.jws.WebMethod;
6
import javax.jws.WebService;
7

  
8
import eu.dnetlib.common.rmi.BaseService;
9

  
10
/**
11
 * Interface for the IndexService.
12
 *
13
 * @author alessia
14
 *
15
 */
16
@WebService(targetNamespace = "http://services.dnetlib.eu/")
17
public interface IndexService extends BaseService {
18

  
19
	/**
20
	 * Returns list of all stored indices.
21
	 *
22
	 * @return list of all stored indices
23
	 * @throws IndexServiceException
24
	 */
25
	@WebMethod(operationName = "getListOfIndices", action = "getListOfIndices")
26
	public List<String> getListOfIndices() throws IndexServiceException;
27
}
modules/dnet-data-provision-rmi/trunk/src/main/java/eu/dnetlib/data/provision/index/rmi/GroupResult.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
import javax.xml.bind.annotation.XmlAttribute;
4
import javax.xml.bind.annotation.XmlRootElement;
5

  
6
/**
7
 * <pre>
8
 * {@code
9
 * <groupresult field="facetFieldName">
10
 * 	<value>facetFieldValue</value>
11
 * 	<count>1</count>
12
 * </groupresult>
13
 * }
14
 * </pre>
15
 * 
16
 * @author claudio
17
 * 
18
 */
19
@XmlRootElement(namespace = "", name = "groupresult")
20
public class GroupResult {
21

  
22
	private String name;
23

  
24
	private String value;
25

  
26
	private int count;
27

  
28
	public GroupResult() {}
29

  
30
	/**
31
	 * Builds a groupResult.
32
	 * 
33
	 * @param fieldName
34
	 * @param fieldValue
35
	 * @param count
36
	 */
37
	public GroupResult(final String name, final String value, final int count) {
38
		this.name = name;
39
		this.value = value;
40
		this.count = count;
41
	}
42

  
43
	@Override
44
	public boolean equals(final Object obj) {
45
		if (!(obj instanceof GroupResult)) return false;
46
		final GroupResult g = (GroupResult) obj;
47
		if ((this.getCount() == g.getCount()) && this.getName().equals(g.getName()) && this.getValue().equals(g.getValue())) return true;
48
		return false;
49
	}
50

  
51
	@XmlAttribute(name = "field", required = true)
52
	public String getName() {
53
		return name;
54
	}
55

  
56
	public String getValue() {
57
		return value;
58
	}
59

  
60
	public int getCount() {
61
		return count;
62
	}
63

  
64
	public void setName(final String name) {
65
		this.name = name;
66
	}
67

  
68
	public void setValue(final String value) {
69
		this.value = value;
70
	}
71

  
72
	public void setCount(final int count) {
73
		this.count = count;
74
	}
75

  
76
}
modules/dnet-data-provision-rmi/trunk/src/main/resources/eu/dnetlib/applicationContext-dnet-data-provision-rmi.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
4
	xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:wsa="http://cxf.apache.org/ws/addressing"
5
	xmlns:p="http://www.springframework.org/schema/p" xmlns:http="http://cxf.apache.org/transports/http/configuration"
6
	xmlns:t="http://dnetlib.eu/springbeans/t" xmlns:template="http://dnetlib.eu/springbeans/template"
7
	xmlns:util="http://www.springframework.org/schema/util"
8
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
9
                                    http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws-addr-conf.xsd
10
                                    http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
11
                                    http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
12
                            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
13
                            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
14
                            http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd">
15

  
16

  
17

  
18

  
19
</beans>
modules/dnet-data-provision-rmi/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>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-data-provision-rmi</artifactId>
12
  <packaging>jar</packaging>
13
  <version>1.0.1-SNAPSHOT</version>
14
  <scm>
15
    <developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-data-provision-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-data-provision-rmi/branches/1.0.0/deploy.info
1
{"type_source": "SVN", "goal": "package -U -T 4C source:jar", "url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-data-provision-rmi/trunk/", "deploy_repository": "dnet4-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/dnet4-snapshots", "name": "dnet-data-provision-rmi"}
modules/dnet-data-provision-rmi/branches/1.0.0/src/main/java/eu/dnetlib/data/provision/index/rmi/BrowsingRow.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
import java.util.List;
4

  
5
import javax.xml.bind.annotation.XmlAccessType;
6
import javax.xml.bind.annotation.XmlAccessorType;
7
import javax.xml.bind.annotation.XmlElement;
8
import javax.xml.bind.annotation.XmlRootElement;
9

  
10
/**
11
 * 
12
 * serialization of the browsing result.
13
 * 
14
 * <row> <groupresult field="facetFieldName1"> <value>facetFieldValue</value> <count>1</count> </groupresult>
15
 * 
16
 * <groupresult field="facetFieldName2"> <value>facetFieldValue</value> <count>1</count> </groupresult>
17
 * 
18
 * </row>
19
 * 
20
 * @author claudio
21
 * 
22
 */
23
@XmlRootElement(namespace = "", name = "row")
24
@XmlAccessorType(XmlAccessType.FIELD)
25
public class BrowsingRow {
26

  
27
	@XmlElement(name = "groupresult", required = true)
28
	private List<GroupResult> groupresult;
29

  
30
	public BrowsingRow() {}
31

  
32
	public BrowsingRow(final List<GroupResult> groupresult) {
33
		this.groupresult = groupresult;
34
	}
35

  
36
	/**
37
	 * adds a GroupResult.
38
	 * 
39
	 * @param fieldName
40
	 * @param fieldValue
41
	 * @param count
42
	 */
43
	public void addBrowsingRow(final String fieldName, final String fieldValue, final int count) {
44
		groupresult.add(new GroupResult(fieldName, fieldValue, count));
45
	}
46

  
47
	@Override
48
	public boolean equals(final Object obj) {
49

  
50
		if (!(obj instanceof BrowsingRow)) return false;
51

  
52
		final BrowsingRow brws = (BrowsingRow) obj;
53

  
54
		return groupresult.equals(brws.getGroupResult());
55
	}
56

  
57
	public List<GroupResult> getGroupResult() {
58
		return groupresult;
59
	}
60

  
61
	public void setGroupResult(final List<GroupResult> groupresult) {
62
		this.groupresult = groupresult;
63
	}
64

  
65
}
modules/dnet-data-provision-rmi/branches/1.0.0/src/main/java/eu/dnetlib/data/provision/index/rmi/protocols/IndexProtocols.java
1
package eu.dnetlib.data.provision.index.rmi.protocols;
2

  
3
public enum IndexProtocols {
4
	SOLR, SOLR_CLOUD
5
}
modules/dnet-data-provision-rmi/branches/1.0.0/src/main/java/eu/dnetlib/data/provision/index/rmi/IndexServiceException.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
public class IndexServiceException extends Exception {
4

  
5
	private static final long serialVersionUID = 8330264706967294512L;
6

  
7
	public IndexServiceException() {
8
		super();
9
	}
10

  
11
	public IndexServiceException(String message, Throwable cause) {
12
		super(message, cause);
13
	}
14

  
15
	public IndexServiceException(String message) {
16
		super(message);
17
	}
18

  
19
	public IndexServiceException(Throwable cause) {
20
		super(cause);
21
	}
22

  
23
}
modules/dnet-data-provision-rmi/branches/1.0.0/src/main/java/eu/dnetlib/data/provision/index/rmi/IndexService.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
import java.util.List;
4

  
5
import javax.jws.WebMethod;
6
import javax.jws.WebService;
7

  
8
import eu.dnetlib.common.rmi.BaseService;
9

  
10
/**
11
 * Interface for the IndexService.
12
 *
13
 * @author alessia
14
 *
15
 */
16
@WebService(targetNamespace = "http://services.dnetlib.eu/")
17
public interface IndexService extends BaseService {
18

  
19
	/**
20
	 * Returns list of all stored indices.
21
	 *
22
	 * @return list of all stored indices
23
	 * @throws IndexServiceException
24
	 */
25
	@WebMethod(operationName = "getListOfIndices", action = "getListOfIndices")
26
	public List<String> getListOfIndices() throws IndexServiceException;
27
}
modules/dnet-data-provision-rmi/branches/1.0.0/src/main/java/eu/dnetlib/data/provision/index/rmi/GroupResult.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
import javax.xml.bind.annotation.XmlAttribute;
4
import javax.xml.bind.annotation.XmlRootElement;
5

  
6
/**
7
 * <pre>
8
 * {@code
9
 * <groupresult field="facetFieldName">
10
 * 	<value>facetFieldValue</value>
11
 * 	<count>1</count>
12
 * </groupresult>
13
 * }
14
 * </pre>
15
 * 
16
 * @author claudio
17
 * 
18
 */
19
@XmlRootElement(namespace = "", name = "groupresult")
20
public class GroupResult {
21

  
22
	private String name;
23

  
24
	private String value;
25

  
26
	private int count;
27

  
28
	public GroupResult() {}
29

  
30
	/**
31
	 * Builds a groupResult.
32
	 * 
33
	 * @param fieldName
34
	 * @param fieldValue
35
	 * @param count
36
	 */
37
	public GroupResult(final String name, final String value, final int count) {
38
		this.name = name;
39
		this.value = value;
40
		this.count = count;
41
	}
42

  
43
	@Override
44
	public boolean equals(final Object obj) {
45
		if (!(obj instanceof GroupResult)) return false;
46
		final GroupResult g = (GroupResult) obj;
47
		if ((this.getCount() == g.getCount()) && this.getName().equals(g.getName()) && this.getValue().equals(g.getValue())) return true;
48
		return false;
49
	}
50

  
51
	@XmlAttribute(name = "field", required = true)
52
	public String getName() {
53
		return name;
54
	}
55

  
56
	public String getValue() {
57
		return value;
58
	}
59

  
60
	public int getCount() {
61
		return count;
62
	}
63

  
64
	public void setName(final String name) {
65
		this.name = name;
66
	}
67

  
68
	public void setValue(final String value) {
69
		this.value = value;
70
	}
71

  
72
	public void setCount(final int count) {
73
		this.count = count;
74
	}
75

  
76
}
modules/dnet-data-provision-rmi/branches/1.0.0/src/main/resources/eu/dnetlib/applicationContext-dnet-data-provision-rmi.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
4
	xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:wsa="http://cxf.apache.org/ws/addressing"
5
	xmlns:p="http://www.springframework.org/schema/p" xmlns:http="http://cxf.apache.org/transports/http/configuration"
6
	xmlns:t="http://dnetlib.eu/springbeans/t" xmlns:template="http://dnetlib.eu/springbeans/template"
7
	xmlns:util="http://www.springframework.org/schema/util"
8
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
9
                                    http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws-addr-conf.xsd
10
                                    http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
11
                                    http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
12
                            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
13
                            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
14
                            http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd">
15

  
16

  
17

  
18

  
19
</beans>
modules/dnet-data-provision-rmi/branches/1.0.0/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-SNAPSHOT</version>
7
    <relativePath></relativePath>
8
  </parent>
9
  <modelVersion>4.0.0</modelVersion>
10
  <groupId>eu.dnetlib</groupId>
11
  <artifactId>dnet-data-provision-rmi</artifactId>
12
  <packaging>jar</packaging>
13
  <version>1.0.0-SNAPSHOT</version>
14
  <dependencies>
15
    <dependency>
16
      <groupId>eu.dnetlib</groupId>
17
      <artifactId>cnr-rmi-api</artifactId>
18
      <version>[2.0.0-SNAPSHOT]</version>
19
    </dependency>
20
  </dependencies>
21
</project>
modules/dnet-data-provision-rmi/tags/dnet-data-provision-rmi-1.0.0/deploy.info
1
{"type_source": "SVN", "goal": "package -U -T 4C source:jar", "url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-data-provision-rmi/trunk/", "deploy_repository": "dnet4-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/dnet4-snapshots", "name": "dnet-data-provision-rmi"}
modules/dnet-data-provision-rmi/tags/dnet-data-provision-rmi-1.0.0/src/main/java/eu/dnetlib/data/provision/index/rmi/BrowsingRow.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
import java.util.List;
4

  
5
import javax.xml.bind.annotation.XmlAccessType;
6
import javax.xml.bind.annotation.XmlAccessorType;
7
import javax.xml.bind.annotation.XmlElement;
8
import javax.xml.bind.annotation.XmlRootElement;
9

  
10
/**
11
 * 
12
 * serialization of the browsing result.
13
 * 
14
 * <row> <groupresult field="facetFieldName1"> <value>facetFieldValue</value> <count>1</count> </groupresult>
15
 * 
16
 * <groupresult field="facetFieldName2"> <value>facetFieldValue</value> <count>1</count> </groupresult>
17
 * 
18
 * </row>
19
 * 
20
 * @author claudio
21
 * 
22
 */
23
@XmlRootElement(namespace = "", name = "row")
24
@XmlAccessorType(XmlAccessType.FIELD)
25
public class BrowsingRow {
26

  
27
	@XmlElement(name = "groupresult", required = true)
28
	private List<GroupResult> groupresult;
29

  
30
	public BrowsingRow() {}
31

  
32
	public BrowsingRow(final List<GroupResult> groupresult) {
33
		this.groupresult = groupresult;
34
	}
35

  
36
	/**
37
	 * adds a GroupResult.
38
	 * 
39
	 * @param fieldName
40
	 * @param fieldValue
41
	 * @param count
42
	 */
43
	public void addBrowsingRow(final String fieldName, final String fieldValue, final int count) {
44
		groupresult.add(new GroupResult(fieldName, fieldValue, count));
45
	}
46

  
47
	@Override
48
	public boolean equals(final Object obj) {
49

  
50
		if (!(obj instanceof BrowsingRow)) return false;
51

  
52
		final BrowsingRow brws = (BrowsingRow) obj;
53

  
54
		return groupresult.equals(brws.getGroupResult());
55
	}
56

  
57
	public List<GroupResult> getGroupResult() {
58
		return groupresult;
59
	}
60

  
61
	public void setGroupResult(final List<GroupResult> groupresult) {
62
		this.groupresult = groupresult;
63
	}
64

  
65
}
modules/dnet-data-provision-rmi/tags/dnet-data-provision-rmi-1.0.0/src/main/java/eu/dnetlib/data/provision/index/rmi/protocols/IndexProtocols.java
1
package eu.dnetlib.data.provision.index.rmi.protocols;
2

  
3
public enum IndexProtocols {
4
	SOLR, SOLR_CLOUD
5
}
modules/dnet-data-provision-rmi/tags/dnet-data-provision-rmi-1.0.0/src/main/java/eu/dnetlib/data/provision/index/rmi/IndexServiceException.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
public class IndexServiceException extends Exception {
4

  
5
	private static final long serialVersionUID = 8330264706967294512L;
6

  
7
	public IndexServiceException() {
8
		super();
9
	}
10

  
11
	public IndexServiceException(String message, Throwable cause) {
12
		super(message, cause);
13
	}
14

  
15
	public IndexServiceException(String message) {
16
		super(message);
17
	}
18

  
19
	public IndexServiceException(Throwable cause) {
20
		super(cause);
21
	}
22

  
23
}
modules/dnet-data-provision-rmi/tags/dnet-data-provision-rmi-1.0.0/src/main/java/eu/dnetlib/data/provision/index/rmi/IndexService.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
import java.util.List;
4

  
5
import javax.jws.WebMethod;
6
import javax.jws.WebService;
7

  
8
import eu.dnetlib.common.rmi.BaseService;
9

  
10
/**
11
 * Interface for the IndexService.
12
 *
13
 * @author alessia
14
 *
15
 */
16
@WebService(targetNamespace = "http://services.dnetlib.eu/")
17
public interface IndexService extends BaseService {
18

  
19
	/**
20
	 * Returns list of all stored indices.
21
	 *
22
	 * @return list of all stored indices
23
	 * @throws IndexServiceException
24
	 */
25
	@WebMethod(operationName = "getListOfIndices", action = "getListOfIndices")
26
	public List<String> getListOfIndices() throws IndexServiceException;
27
}
modules/dnet-data-provision-rmi/tags/dnet-data-provision-rmi-1.0.0/src/main/java/eu/dnetlib/data/provision/index/rmi/GroupResult.java
1
package eu.dnetlib.data.provision.index.rmi;
2

  
3
import javax.xml.bind.annotation.XmlAttribute;
4
import javax.xml.bind.annotation.XmlRootElement;
5

  
6
/**
7
 * <pre>
8
 * {@code
9
 * <groupresult field="facetFieldName">
10
 * 	<value>facetFieldValue</value>
11
 * 	<count>1</count>
12
 * </groupresult>
13
 * }
14
 * </pre>
15
 * 
16
 * @author claudio
17
 * 
18
 */
19
@XmlRootElement(namespace = "", name = "groupresult")
20
public class GroupResult {
21

  
22
	private String name;
23

  
24
	private String value;
25

  
26
	private int count;
27

  
28
	public GroupResult() {}
29

  
30
	/**
31
	 * Builds a groupResult.
32
	 * 
33
	 * @param fieldName
34
	 * @param fieldValue
35
	 * @param count
36
	 */
37
	public GroupResult(final String name, final String value, final int count) {
38
		this.name = name;
39
		this.value = value;
40
		this.count = count;
41
	}
42

  
43
	@Override
44
	public boolean equals(final Object obj) {
45
		if (!(obj instanceof GroupResult)) return false;
46
		final GroupResult g = (GroupResult) obj;
47
		if ((this.getCount() == g.getCount()) && this.getName().equals(g.getName()) && this.getValue().equals(g.getValue())) return true;
48
		return false;
49
	}
50

  
51
	@XmlAttribute(name = "field", required = true)
52
	public String getName() {
53
		return name;
54
	}
55

  
56
	public String getValue() {
57
		return value;
58
	}
59

  
60
	public int getCount() {
61
		return count;
62
	}
63

  
64
	public void setName(final String name) {
65
		this.name = name;
66
	}
67

  
68
	public void setValue(final String value) {
69
		this.value = value;
70
	}
71

  
72
	public void setCount(final int count) {
73
		this.count = count;
74
	}
75

  
76
}
modules/dnet-data-provision-rmi/tags/dnet-data-provision-rmi-1.0.0/src/main/resources/eu/dnetlib/applicationContext-dnet-data-provision-rmi.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
4
	xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:wsa="http://cxf.apache.org/ws/addressing"
5
	xmlns:p="http://www.springframework.org/schema/p" xmlns:http="http://cxf.apache.org/transports/http/configuration"
6
	xmlns:t="http://dnetlib.eu/springbeans/t" xmlns:template="http://dnetlib.eu/springbeans/template"
7
	xmlns:util="http://www.springframework.org/schema/util"
8
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
9
                                    http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws-addr-conf.xsd
10
                                    http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
11
                                    http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
12
                            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
13
                            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
14
                            http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd">
15

  
16

  
17

  
18

  
19
</beans>
modules/dnet-data-provision-rmi/tags/dnet-data-provision-rmi-1.0.0/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-data-provision-rmi</artifactId>
12
  <packaging>jar</packaging>
13
  <version>1.0.0</version>
14
  <scm>
15
    <developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-data-provision-rmi/tags/dnet-data-provision-rmi-1.0.0</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>

Also available in: Unified diff