[Yanel-commits] rev 26523 -
public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Mon Aug 6 14:21:03 CEST 2007
Author: michi
Date: 2007-08-06 14:21:02 +0200 (Mon, 06 Aug 2007)
New Revision: 26523
Modified:
public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java
Log:
check of custom config exists
Modified: public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java 2007-08-06 12:17:17 UTC (rev 26522)
+++ public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java 2007-08-06 12:21:02 UTC (rev 26523)
@@ -743,8 +743,9 @@
*/
private String getNutchConfigurationFile() throws Exception {
String group = getRequest().getParameter("group");
- if (group != null && group.length() > 0) {
- org.jdom.Document jdomDocument = new org.jdom.input.DOMBuilder().build(getConfiguration().getCustomConfiguration());
+ Document customConfig = getConfiguration().getCustomConfiguration();
+ if (customConfig != null && group != null && group.length() > 0) {
+ org.jdom.Document jdomDocument = new org.jdom.input.DOMBuilder().build(customConfig);
XPath xpath = XPath.newInstance("/yanel:custom-config/nr:groups/nr:group[@name='" + group + "']/nr:nutch-config/@name");
xpath.addNamespace("yanel", "http://www.wyona.org/yanel/resource-config/1.0");
More information about the Yanel-commits
mailing list