Author: sshafroi
Date: 2008-08-25 15:54:06 +0200 (Mon, 25 Aug 2008)
New Revision: 6789
Added:
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/SolrCommandConfig.java
Removed:
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/SolrSearchConfig.java
Modified:
trunk/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/SolrSearchCommand.java
Log:
Follow the same naming as the other config classes. If this is not changed it
will not pass the xml modes xsd test, without a change to the class that
generates the xsd files.
Copied:
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/SolrCommandConfig.java
(from rev 6788,
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/SolrSearchConfig.java)
===================================================================
---
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/SolrCommandConfig.java
(rev 0)
+++
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/SolrCommandConfig.java
2008-08-25 13:54:06 UTC (rev 6789)
@@ -0,0 +1,99 @@
+/* Copyright (2008) Schibsted Søk AS
+ * This file is part of SESAT.
+ *
+ * SESAT is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * SESAT is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with SESAT. If not, see <http://www.gnu.org/licenses/>.
+ * AbstractXmlSearchConfiguration.java
+ *
+ * Created on June 12, 2006, 10:58 AM
+ *
+ */
+
+package no.sesat.search.mode.config;
+
+import no.sesat.search.mode.SearchModeFactory.Context;
+import no.sesat.search.mode.config.CommandConfig.Controller;
+import no.sesat.search.site.config.AbstractDocumentFactory;
+import no.sesat.search.site.config.AbstractDocumentFactory.ParseType;
+import org.w3c.dom.Element;
+
+/** Searching against a Solr index using the Solrj client.
+ *
+ * @version $Id$
+ */
[EMAIL PROTECTED]("SolrSearchCommand")
+public class SolrCommandConfig extends CommandConfig {
+
+
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ /**
+ * Holds value of property key for serverUrl.
+ */
+ private String serverUrl = "";
+
+ // Static --------------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ // Public --------------------------------------------------------
+
+ /**
+ * Getter for property serverUrl.
+ * The value returned is the key used
+ * to look up the real value via SiteConfiguration(via in
configuration.properties)
+ *
+ * @return Value of property serverUrl.
+ */
+ public String getServerUrl() {
+ return this.serverUrl;
+ }
+
+ /**
+ * Setter for property serverUrl.
+ * @param serverUrl New value of property serverUrl.
+ */
+ public void setServerUrl(final String serverUrl) {
+ this.serverUrl = serverUrl;
+ }
+
+ @Override
+ public SolrCommandConfig readSearchConfiguration(
+ final Element element,
+ final SearchConfiguration inherit,
+ final Context context) {
+
+ super.readSearchConfiguration(element, inherit, context);
+
+ AbstractDocumentFactory.fillBeanProperty(this, inherit, "serverUrl",
ParseType.String, element, "");
+
+ return this;
+ }
+
+
+
+ // Z implementation ----------------------------------------------
+
+ // Y overrides ---------------------------------------------------
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+
+}
Deleted:
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/SolrSearchConfig.java
===================================================================
---
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/SolrSearchConfig.java
2008-08-21 12:07:11 UTC (rev 6788)
+++
trunk/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/SolrSearchConfig.java
2008-08-25 13:54:06 UTC (rev 6789)
@@ -1,99 +0,0 @@
-/* Copyright (2008) Schibsted Søk AS
- * This file is part of SESAT.
- *
- * SESAT is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * SESAT is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with SESAT. If not, see <http://www.gnu.org/licenses/>.
- * AbstractXmlSearchConfiguration.java
- *
- * Created on June 12, 2006, 10:58 AM
- *
- */
-
-package no.sesat.search.mode.config;
-
-import no.sesat.search.mode.SearchModeFactory.Context;
-import no.sesat.search.mode.config.CommandConfig.Controller;
-import no.sesat.search.site.config.AbstractDocumentFactory;
-import no.sesat.search.site.config.AbstractDocumentFactory.ParseType;
-import org.w3c.dom.Element;
-
-/** Searching against a Solr index using the Solrj client.
- *
- * @version $Id$
- */
[EMAIL PROTECTED]("SolrSearchCommand")
-public class SolrSearchConfig extends CommandConfig {
-
-
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- /**
- * Holds value of property key for serverUrl.
- */
- private String serverUrl = "";
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- /**
- * Getter for property serverUrl.
- * The value returned is the key used
- * to look up the real value via SiteConfiguration(via in
configuration.properties)
- *
- * @return Value of property serverUrl.
- */
- public String getServerUrl() {
- return this.serverUrl;
- }
-
- /**
- * Setter for property serverUrl.
- * @param serverUrl New value of property serverUrl.
- */
- public void setServerUrl(final String serverUrl) {
- this.serverUrl = serverUrl;
- }
-
- @Override
- public SolrSearchConfig readSearchConfiguration(
- final Element element,
- final SearchConfiguration inherit,
- final Context context) {
-
- super.readSearchConfiguration(element, inherit, context);
-
- AbstractDocumentFactory.fillBeanProperty(this, inherit, "serverUrl",
ParseType.String, element, "");
-
- return this;
- }
-
-
-
- // Z implementation ----------------------------------------------
-
- // Y overrides ---------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
-}
Modified:
trunk/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/SolrSearchCommand.java
===================================================================
---
trunk/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/SolrSearchCommand.java
2008-08-21 12:07:11 UTC (rev 6788)
+++
trunk/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/SolrSearchCommand.java
2008-08-25 13:54:06 UTC (rev 6789)
@@ -19,7 +19,7 @@
import java.net.MalformedURLException;
import java.util.Map;
-import no.sesat.search.mode.config.SolrSearchConfig;
+import no.sesat.search.mode.config.SolrCommandConfig;
import no.sesat.search.result.BasicResultItem;
import no.sesat.search.result.BasicResultList;
import no.sesat.search.result.ResultItem;
@@ -61,7 +61,7 @@
super(cxt);
try {
- final String serverUrl =
((SolrSearchConfig)cxt.getSearchConfiguration()).getServerUrl();
+ final String serverUrl =
((SolrCommandConfig)cxt.getSearchConfiguration()).getServerUrl();
final SiteConfiguration siteConf =
cxt.getDataModel().getSite().getSiteConfiguration();
server = new
CommonsHttpSolrServer(siteConf.getProperty(serverUrl));
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits