Changeset 1793 for TI01-discovery/trunk/ws-Discovery2
- Timestamp:
- 30/11/06 16:46:00 (13 years ago)
- Location:
- TI01-discovery/trunk/ws-Discovery2/src/ndg/services/discovery
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TI01-discovery/trunk/ws-Discovery2/src/ndg/services/discovery/DiscoveryServiceSkeleton.java
r1767 r1793 129 129 discoveryserviceapi.DocumentsType documents = requestContent.getDocuments(); 130 130 String[] documentsString = documents.getDocumentArray(); 131 System.out.println("Building list of " + documentsString.length + " documents for present"); 131 132 Vector documentsVector = new Vector(); 132 for (int i=0; i<documentsString.length; )133 for (int i=0; i<documentsString.length; i++ ) 133 134 { 134 135 documentsVector.add( documentsString[i] ); … … 157 158 responseContent.setStatusMessage("Error creating doPresentReturnDocument : " + e.toString() ); 158 159 } 159 160 160 161 161 return response; -
TI01-discovery/trunk/ws-Discovery2/src/ndg/services/discovery/FullTextSearchAgent.java
r1767 r1793 27 27 */ 28 28 public class FullTextSearchAgent extends SearchAgent implements Searchable { 29 30 static Properties properties = new Properties();31 29 32 30 // Input parameters specific to FullTextSearch … … 74 72 // Load properties file (in root of .aar archive, i.e. from "build/classes") 75 73 ClassLoader loader = getClass().getClassLoader(); 76 properties.load(77 loader.getResourceAsStream("DiscoveryService.properties")78 );79 74 80 75 // Set xmlDbURI as class variable so can reuse it in error messages -
TI01-discovery/trunk/ws-Discovery2/src/ndg/services/discovery/PresentAgent.java
r1786 r1793 27 27 public class PresentAgent { 28 28 29 static Properties properties = new Properties();29 static Properties properties = new ServiceProperties().getProperties(); 30 30 31 31 // Input parameters … … 77 77 PresentSummary result = new PresentSummary(); 78 78 79 byte[] returnDoc = null; 79 //byte[] returnDoc = null; 80 String returnDoc = null; 80 81 XmlRpc.setEncoding("UTF-8"); 81 82 82 83 try 83 84 { 84 85 // Load properties file (in root of .aar archive, i.e. from "build/classes")86 ClassLoader loader = getClass().getClassLoader();87 properties.load(88 loader.getResourceAsStream("DiscoveryService.properties")89 );90 85 91 86 // Set xmlDbURI as class variable so can reuse it in error messages … … 95 90 XmlRpcClient xmlrpc = new XmlRpcClient( uri ); 96 91 xmlrpc.setBasicAuthentication(properties.getProperty("xmlrpc.username"),properties.getProperty("xmlrpc.password")); 97 92 System.out.println("Initialising XMLRPC connection to " + uri); 98 93 99 94 Hashtable options = new Hashtable(); 100 95 options.put("indent", "yes"); 101 96 options.put("encoding", "UTF-8"); 102 options.put("process-xsl-pi", "no");97 //options.put("process-xsl-pi", "no"); 103 98 104 99 //0. For each document requested, do an XMLRPC call to fetch it … … 114 109 System.out.println("present request doc:\t "+thisdoc); 115 110 getDocumentAsStringParams.addElement( options ); 116 returnDoc = (byte[])xmlrpc.execute( "getDocument", getDocumentAsStringParams );117 111 //returnDoc = (byte[])xmlrpc.execute( "getDocument", getDocumentAsStringParams ); 112 returnDoc = (String)xmlrpc.execute("getDocumentAsString", getDocumentAsStringParams ); 118 113 if (returnDoc != null) 119 114 { … … 123 118 if ( this.format.equals("original") ) 124 119 { 125 returnDocs.add( new String( returnDoc ) ); 120 //returnDocs.add( new String( returnDoc ) ); 121 returnDocs.add( returnDoc ); 126 122 } 127 123 else -
TI01-discovery/trunk/ws-Discovery2/src/ndg/services/discovery/SearchAgent.java
r1767 r1793 21 21 public abstract class SearchAgent { 22 22 23 static Properties properties = new Properties();23 static Properties properties = new ServiceProperties().getProperties(); 24 24 25 25 // Defaults
Note: See TracChangeset
for help on using the changeset viewer.