*) SOAP: old urlInfo renamed to urlInfoByHash, new urlInfo Function added.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2662 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 18 years ago
parent 8f143d516b
commit 49fbb688df

@ -45,9 +45,13 @@
package de.anomic.soap.services; package de.anomic.soap.services;
import java.net.MalformedURLException;
import org.apache.axis.AxisFault; import org.apache.axis.AxisFault;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import de.anomic.index.indexURL;
import de.anomic.net.URL;
import de.anomic.plasma.plasmaSearchPreOrder; import de.anomic.plasma.plasmaSearchPreOrder;
import de.anomic.server.serverObjects; import de.anomic.server.serverObjects;
import de.anomic.soap.AbstractService; import de.anomic.soap.AbstractService;
@ -161,9 +165,30 @@ public class SearchService extends AbstractService
} }
} }
/** /**
* @param url the url
* @param viewMode one of (VIEW_MODE_AS_PLAIN_TEXT = 1,
* VIEW_MODE_AS_PARSED_TEXT = 2,
* VIEW_MODE_AS_PARSED_SENTENCES = 3) [Source: ViewFile.java]
* @return an xml document containing the url info.
* *
* * @throws AxisFault if the service could not be executed propery.
*/
public Document urlInfo(String urlStr, int viewMode) throws AxisFault {
try {
// getting the url hash for this url
URL url = new URL(urlStr);
String urlHash = indexURL.urlHash(url);
// fetch urlInfo
return this.urlInfoByHash(urlHash, viewMode);
} catch (Exception e) {
throw new AxisFault(e.getMessage());
}
}
/**
* @param urlHash the url hash * @param urlHash the url hash
* @param viewMode one of (VIEW_MODE_AS_PLAIN_TEXT = 1, * @param viewMode one of (VIEW_MODE_AS_PLAIN_TEXT = 1,
* VIEW_MODE_AS_PARSED_TEXT = 2, * VIEW_MODE_AS_PARSED_TEXT = 2,
@ -172,7 +197,7 @@ public class SearchService extends AbstractService
* *
* @throws AxisFault if the service could not be executed propery. * @throws AxisFault if the service could not be executed propery.
*/ */
public Document urlInfo(String urlHash, int viewMode) throws AxisFault { public Document urlInfoByHash(String urlHash, int viewMode) throws AxisFault {
try { try {
// extracting the message context // extracting the message context
extractMessageContext(true); extractMessageContext(true);

Loading…
Cancel
Save