Revision 2658 trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/drivers/SRWCatalogServiceDriver.java

View differences:

SRWCatalogServiceDriver.java
1
package es.gva.cit.catalogClient.drivers;
1
	package es.gva.cit.catalogClient.drivers;
2 2

  
3 3
import java.net.URL;
4 4
import java.util.StringTokenizer;
......
18 18
/* Generated by Together */
19 19

  
20 20
public class SRWCatalogServiceDriver extends AbstractCatalogServiceDriver {
21
    private String communicationProtocol;
22
	private String version = "1.1";
21
    private String version = "1.1";
23 22
	private String recordXPath;
24 23
    private String resultSetTTL;
25 24
	/* (non-Javadoc)
......
31 30
    	
32 31
    	Node[] nodos = new HTTPGetProtocol().doQuery(url,getMessageCapabilities(),0);
33 32
		if (nodos != null){
34
			communicationProtocol = "GET";
33
			setCommunicationProtocol("GET");
35 34
			return nodos;
36 35
		}
37 36
    	
38 37
		nodos = new HTTPPostProtocol().doQuery(url,getMessageCapabilities(),0);
39 38
		if (nodos != null){
40
			communicationProtocol = "POST";
39
			setCommunicationProtocol("POST");
41 40
			return nodos;
42 41
		}
43 42
		
44 43
		nodos = new SOAPProtocol().doQuery(url,getSOAPMessageCapabilities(),0);
45 44
		if (nodos != null){
46
			communicationProtocol = "SOAP";
45
			setCommunicationProtocol("SOAP");
47 46
		}
48 47
		
49 48
		return nodos;
......
57 56
		Node[] answerNodes = null;
58 57
		Node[] nodes = null;
59 58
		
60
		if (communicationProtocol.equals("GET"))		
59
		if (getCommunicationProtocol().equals("GET"))		
61 60
			nodes = new HTTPGetProtocol().doQuery(url,getMessageRecords(getQuery(),firstRecord),firstRecord);
62
		if (communicationProtocol.equals("POST"))		
61
		if (getCommunicationProtocol().equals("POST"))		
63 62
			nodes = new HTTPPostProtocol().doQuery(url,getMessageRecords(getQuery(),firstRecord),firstRecord);
64
		if (communicationProtocol.equals("SOAP"))		
63
		if (getCommunicationProtocol().equals("SOAP"))		
65 64
			nodes = new SOAPProtocol().doQuery(url,getMessageRecords(getQuery(),firstRecord),firstRecord);
66 65
		
67 66
		String prefix = new StringTokenizer(nodes[0].getNodeName(),":").nextToken();

Also available in: Unified diff