Modified: oodt/trunk/crawler/src/main/resources/crawler-beans.xml URL: http://svn.apache.org/viewvc/oodt/trunk/crawler/src/main/resources/crawler-beans.xml?rev=1294389&r1=1294388&r2=1294389&view=diff ============================================================================== --- oodt/trunk/crawler/src/main/resources/crawler-beans.xml (original) +++ oodt/trunk/crawler/src/main/resources/crawler-beans.xml Mon Feb 27 23:14:03 2012 @@ -16,23 +16,19 @@ License for the specific language govern the License. --> <beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - <bean class="org.apache.oodt.commons.spring.postprocessor.SetIdBeanPostProcessor"/> - - <!-- Product Crawlers --> - - <bean id="StdProductCrawler" lazy-init="true" class="org.apache.oodt.cas.crawl.StdProductCrawler"> - <description>Ingests data files based on existing metadata files</description> - </bean> - - <bean id="MetExtractorProductCrawler" lazy-init="true" class="org.apache.oodt.cas.crawl.MetExtractorProductCrawler"> - <description>Ingests data files after generating a metadat file for it with a given metadata extractor</description> - </bean> - - <bean id="AutoDetectProductCrawler" lazy-init="true" class="org.apache.oodt.cas.crawl.AutoDetectProductCrawler"> - <description>Ingests data files based on existing metadata files choosing metadata extractors based on mimetypes given in specified mimetype xml file</description> - </bean> - + <!-- Product Crawlers --> + <bean id="StdProductCrawler" lazy-init="true" class="org.apache.oodt.cas.crawl.StdProductCrawler"> + <description>Ingests data files based on existing metadata files</description> + </bean> + + <bean id="MetExtractorProductCrawler" lazy-init="true" class="org.apache.oodt.cas.crawl.MetExtractorProductCrawler"> + <description>Ingests data files after generating a metadata file for it with a given metadata extractor</description> + </bean> + + <bean id="AutoDetectProductCrawler" lazy-init="true" class="org.apache.oodt.cas.crawl.AutoDetectProductCrawler"> + <description>Ingests data files by choosing metadata extractors based on mimetypes given in specified mimetype xml file</description> + </bean> </beans>
Modified: oodt/trunk/crawler/src/main/resources/crawler-config.xml URL: http://svn.apache.org/viewvc/oodt/trunk/crawler/src/main/resources/crawler-config.xml?rev=1294389&r1=1294388&r2=1294389&view=diff ============================================================================== --- oodt/trunk/crawler/src/main/resources/crawler-config.xml (original) +++ oodt/trunk/crawler/src/main/resources/crawler-config.xml Mon Feb 27 23:14:03 2012 @@ -16,13 +16,13 @@ License for the specific language govern the License. --> <beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:p="http://www.springframework.org/schema/p" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - <import resource="classpath:/org/apache/oodt/cas/crawl/crawler-beans.xml"/> - <import resource="classpath:/org/apache/oodt/cas/crawl/action/action-beans.xml"/> - <import resource="classpath:/org/apache/oodt/cas/crawl/comparator/precondition-beans.xml"/> - <import resource="classpath:/org/apache/oodt/cas/crawl/option/cmd-line-option-beans.xml"/> + <bean class="org.apache.oodt.cas.crawl.util.CasPropertyOverrideConfigurer" /> + + <import resource="crawler-beans.xml" /> + <import resource="action-beans.xml" /> + <import resource="precondition-beans.xml" /> </beans> Added: oodt/trunk/crawler/src/main/resources/legacy-cmd-line-actions.xml URL: http://svn.apache.org/viewvc/oodt/trunk/crawler/src/main/resources/legacy-cmd-line-actions.xml?rev=1294389&view=auto ============================================================================== --- oodt/trunk/crawler/src/main/resources/legacy-cmd-line-actions.xml (added) +++ oodt/trunk/crawler/src/main/resources/legacy-cmd-line-actions.xml Mon Feb 27 23:14:03 2012 @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one or more contributor +license agreements. See the NOTICE.txt file distributed with this work for +additional information regarding copyright ownership. The ASF licenses this +file to you under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy of +the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations under +the License. +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + + <!-- Product Crawlers --> + <bean id="StdProductCrawler" lazy-init="true" class="org.apache.oodt.cas.crawl.cli.action.CrawlerLauncherCliAction"> + <property name="description" value="Triggers StdProductCrawler" /> + </bean> + + <bean id="MetExtractorProductCrawler" lazy-init="true" class="org.apache.oodt.cas.crawl.cli.action.CrawlerLauncherCliAction"> + <property name="description" value="Triggers MetExtractorProductCrawler" /> + </bean> + + <bean id="AutoDetectProductCrawler" lazy-init="true" class="org.apache.oodt.cas.crawl.cli.action.CrawlerLauncherCliAction"> + <property name="description" value="Triggers AutoDetectProductCrawler" /> + </bean> +</beans> Propchange: oodt/trunk/crawler/src/main/resources/legacy-cmd-line-actions.xml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: oodt/trunk/crawler/src/main/resources/legacy-cmd-line-options.xml URL: http://svn.apache.org/viewvc/oodt/trunk/crawler/src/main/resources/legacy-cmd-line-options.xml?rev=1294389&view=auto ============================================================================== --- oodt/trunk/crawler/src/main/resources/legacy-cmd-line-options.xml (added) +++ oodt/trunk/crawler/src/main/resources/legacy-cmd-line-options.xml Mon Feb 27 23:14:03 2012 @@ -0,0 +1,659 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Author: bfoster (Brian Foster) +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + + <bean id="crawlerId" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"> + <property name="shortOption" value="cid" /> + <property name="longOption" value="crawlerId" /> + <property name="description" value="The ProductCrawler to use" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="ProductCrawler id" /> + <property name="required" value="true" /> + </bean> + + <bean id="printSupportedCrawlerActions" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="psca" /> + <property name="longOption" value="printSupportedCrawlerActions" /> + <property name="description" value="Prints a list and description of all supported CrawlerActions" /> + <property name="hasArgs" value="false" /> + <property name="required" value="false" /> + <property name="performAndQuit" value="true" /> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerActionInfoHandler"> + <property name="applicationContext"> + <bean class="org.springframework.context.support.FileSystemXmlApplicationContext"> + <constructor-arg value="../policy/action-beans.xml" /> + </bean> + </property> + </bean> + </property> + </bean> + + <bean id="printSupportedPreconditions" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="psp" /> + <property name="longOption" value="printSupportedPreconditions" /> + <property name="description" value="Prints a list and description of all supported Preconditions" /> + <property name="hasArgs" value="false" /> + <property name="required" value="false" /> + <property name="performAndQuit" value="true" /> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.PreconditionInfoHandler"> + <property name="applicationContext"> + <bean class="org.springframework.context.support.FileSystemXmlApplicationContext"> + <constructor-arg value="../policy/precondition-beans.xml" /> + </bean> + </property> + </bean> + </property> + </bean> + + <bean id="filemgrUrl" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="fm" /> + <property name="longOption" value="filemgrUrl" /> + <property name="description" value="File Manager URL" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="url" /> + <property name="required" value="true" /> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.filemgrUrl</value> + <value>MetExtractorProductCrawler.filemgrUrl</value> + <value>AutoDetectProductCrawler.filemgrUrl</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.ArgRegExpCmdLineOptionValidator"> + <property name="allowedArgs"> + <list> + <value>http://.*:\d*</value> + </list> + </property> + </bean> + </list> + </property> + </bean> + + <bean id="failureDir" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="fd" /> + <property name="longOption" value="failureDir" /> + <property name="description" value="Directory where files will be moved on failure" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="directory" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>MoveMetadataToFailureDir.toDir</value> + <value>MovePushpullMetFileToFailureDir.toDir</value> + <value>MoveDataFileToFailureDir.toDir</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.FileExistCmdLineOptionValidator" /> + </list> + </property> + </bean> + + <bean id="successDir" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="sd" /> + <property name="longOption" value="successDir" /> + <property name="description" value="Directory where files will be moved on success" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="directory" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>MovePushpullMetFileToBackupDir.toDir</value> + <value>MoveMetadataFileToBackupDir.toDir</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.FileExistCmdLineOptionValidator" /> + </list> + </property> + </bean> + + <bean id="workflowMgrUrl" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="wm" /> + <property name="longOption" value="workflowMgrUrl" /> + <property name="description" value="Workflow Manager URL" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="url" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>UpdateWorkflowStatusToIngest.workflowMgrUrl</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.ArgRegExpCmdLineOptionValidator"> + <property name="allowedArgs"> + <list> + <value>http://.*:\d*</value> + </list> + </property> + </bean> + </list> + </property> + </bean> + + <bean id="clientTransferer" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="ct" /> + <property name="longOption" value="clientTransferer" /> + <property name="description" value="File Manager data transferer factory class" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="class" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.clientTransferer</value> + <value>MetExtractorProductCrawler.clientTransferer</value> + <value>AutoDetectProductCrawler.clientTransferer</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.ClassExistsCmdLineOptionValidator" /> + </list> + </property> + </bean> + + <bean id="requiredMetadata" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="rqm" /> + <property name="longOption" value="requiredMetadata" /> + <property name="type" value="java.util.List" /> + <property name="description" value="Metadata required for ingest to take place" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="metadata_elements" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.requiredMetadata</value> + <value>MetExtractorProductCrawler.requiredMetadata</value> + <value>AutoDetectProductCrawler.requiredMetadata</value> + </list> + </property> + </bean> + </property> + </bean> + + <bean id="actionIds" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="ais" /> + <property name="longOption" value="actionIds" /> + <property name="type" value="java.util.List" /> + <property name="description" value="CrawlerActions that should be performed" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="CrawlerAction ids" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.actionIds</value> + <value>MetExtractorProductCrawler.actionIds</value> + <value>AutoDetectProductCrawler.actionIds</value> + </list> + </property> + </bean> + </property> + </bean> + + <bean id="preCondIds" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="pids" /> + <property name="longOption" value="preCondIds" /> + <property name="type" value="java.util.List" /> + <property name="description" value="PreConditionComparator ids that must pass before any metadata extraction will run" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="PreConditionComparator ids" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>MetExtractorProductCrawler.preCondIds</value> + </list> + </property> + </bean> + </property> + </bean> + + <bean id="noRecur" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="nr" /> + <property name="longOption" value="noRecur" /> + <property name="description" value="Turns off recursive crawling - will only process files in productPath directory" /> + <property name="hasArgs" value="false" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.noRecur</value> + <value>MetExtractorProductCrawler.noRecur</value> + <value>AutoDetectProductCrawler.noRecur</value> + </list> + </property> + </bean> + </property> + </bean> + + <bean id="crawlForDirs" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="cfd" /> + <property name="longOption" value="crawlForDirs" /> + <property name="description" value="Will crawl for directories instead of files" /> + <property name="hasArgs" value="false" /> + <property name="required" value="false" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.crawlForDirs</value> + <value>MetExtractorProductCrawler.crawlForDirs</value> + <value>AutoDetectProductCrawler.crawlForDirs</value> + </list> + </property> + </bean> + </property> + </bean> + + <bean id="skipIngest" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="si" /> + <property name="longOption" value="skipIngest" /> + <property name="description" value="Will skip ingest to file manager and any post ingest actions" /> + <property name="hasArgs" value="false" /> + <property name="required" value="false" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.skipIngest</value> + <value>MetExtractorProductCrawler.skipIngest</value> + <value>AutoDetectProductCrawler.skipIngest</value> + </list> + </property> + </bean> + </property> + </bean> + + <bean id="daemonPort" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="dp" /> + <property name="longOption" value="daemonPort" /> + <property name="type" value="int" /> + <property name="description" value="Cause crawler to become a daemon with a XML-RPC webserver started on the given port number" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="portNum" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.daemonPort</value> + <value>MetExtractorProductCrawler.daemonPort</value> + <value>AutoDetectProductCrawler.daemonPort</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.ArgRegExpCmdLineOptionValidator"> + <property name="allowedArgs"> + <list> + <value>\d*</value> + </list> + </property> + </bean> + </list> + </property> + </bean> + + <bean id="daemonWait" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="dw" /> + <property name="longOption" value="daemonWait" /> + <property name="type" value="int" /> + <property name="description" value="Cause crawler to become a daemon and sleep for given number of seconds between crawls" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="seconds" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.daemonWait</value> + <value>MetExtractorProductCrawler.daemonWait</value> + <value>AutoDetectProductCrawler.daemonWait</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.ArgRegExpCmdLineOptionValidator"> + <property name="allowedArgs"> + <list> + <value>\d*</value> + </list> + </property> + </bean> + </list> + </property> + </bean> + + <bean id="productPath" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="pp" /> + <property name="longOption" value="productPath" /> + <property name="description" value="Root directory to crawl" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="directory" /> + <property name="required" value="true" /> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.productPath</value> + <value>MetExtractorProductCrawler.productPath</value> + <value>AutoDetectProductCrawler.productPath</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.FileExistCmdLineOptionValidator" /> + </list> + </property> + </bean> + + <bean id="metFileExtension" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="mfx" /> + <property name="longOption" value="metFileExtension" /> + <property name="description" value="The file extension of existing and to be created PCS metadata files" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="file extension" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="REQUIRED" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>StdProductCrawler.metFileExtension</value> + <value>DeleteMetadataFile.fileExtension</value> + <value>MoveMetadataFileToBackupDir.fileExtension</value> + <value>MoveMetadataFileToFailureDir.fileExtension</value> + </list> + </property> + </bean> + </property> + </bean> + + <bean id="metExtractor" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="mx" /> + <property name="longOption" value="metExtractor" /> + <property name="description" value="Metadata extractor class to use" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="class" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="REQUIRED" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>MetExtractorProductCrawler.metExtractor</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.ClassExistsCmdLineOptionValidator" /> + </list> + </property> + </bean> + + <bean id="metExtractorConfig" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="mxc" /> + <property name="longOption" value="metExtractorConfig" /> + <property name="description" value="Config file for metadata extractor" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="file" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="REQUIRED" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>MetExtractorProductCrawler.metExtractorConfig</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.FileExistCmdLineOptionValidator" /> + </list> + </property> + </bean> + + <bean id="mimeExtractorRepo" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="mxr" /> + <property name="longOption" value="mimeExtractorRepo" /> + <property name="description" value="Mime-type to metadata extractor mapping xml file" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="file" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="REQUIRED" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>AutoDetectProductCrawler.mimeExtractorRepo</value> + </list> + </property> + </bean> + </property> + <property name="validators"> + <list> + <bean class="org.apache.oodt.cas.cli.option.validator.FileExistCmdLineOptionValidator" /> + </list> + </property> + </bean> + + <bean id="pushpullMetFileExtension" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="ppmfx" /> + <property name="longOption" value="pushpullMetFileExtension" /> + <property name="description" value="File extension of push-pull metadata files" /> + <property name="hasArgs" value="true" /> + <property name="argsDescription" value="file extension" /> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="StdProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="MetExtractorProductCrawler" p:relation="OPTIONAL" /> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="AutoDetectProductCrawler" p:relation="OPTIONAL" /> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.crawl.cli.option.handler.CrawlerBeansPropHandler"> + <property name="properties"> + <list> + <value>DeletePushpullMetFile.fileExtension</value> + <value>MovePushpullMetFileToBackupDir.fileExtension</value> + <value>MovePushpullMetFileToFailureDir.fileExtension</value> + <value>CheckThatPushPullMetFileExists.fileExtension</value> + </list> + </property> + </bean> + </property> + </bean> +</beans> Propchange: oodt/trunk/crawler/src/main/resources/legacy-cmd-line-options.xml ------------------------------------------------------------------------------ svn:executable = * Propchange: oodt/trunk/crawler/src/main/resources/legacy-cmd-line-options.xml ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: oodt/trunk/crawler/src/main/resources/precondition-beans.xml URL: http://svn.apache.org/viewvc/oodt/trunk/crawler/src/main/resources/precondition-beans.xml?rev=1294389&r1=1294388&r2=1294389&view=diff ============================================================================== --- oodt/trunk/crawler/src/main/resources/precondition-beans.xml (original) +++ oodt/trunk/crawler/src/main/resources/precondition-beans.xml Mon Feb 27 23:14:03 2012 @@ -16,35 +16,33 @@ License for the specific language govern the License. --> <beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - - <bean class="org.apache.oodt.commons.spring.postprocessor.SetIdBeanPostProcessor"/> - - <!-- Precondition Comparators --> - - <bean id="CheckThatPushPullMetFileExists" lazy-init="true" class="org.apache.oodt.cas.metadata.preconditions.ExistanceCheckComparator"> - <property name="description" value="Checks if the push-pull metadata file exists for the current data file"/> - <property name="compareItem"> - <value type="java.lang.Boolean">true</value> - </property> - <property name="type" value="equal_to"/> - </bean> - - <bean id="CheckThatDataFileSizeIsGreaterThanZero" lazy-init="true" class="org.apache.oodt.cas.metadata.preconditions.FileSizeComparator"> - <property name="description" value="Check if the current data file size is greater than zero"/> - <property name="compareItem"> - <value type="java.lang.Long">0</value> - </property> - <property name="type" value="greater_than"/> - </bean> - - <bean id="AprioriUniquessCheckWithFilemgr" lazy-init="true" class="org.apache.oodt.cas.crawl.comparator.FilemgrUniquenessCheckComparator"> - <property name="description" value="Checks where the current data file existing in the filemgr based on its FILENAME"/> - <property name="compareItem"> - <value type="java.lang.Boolean">false</value> - </property> - <property name="type" value="equal_to"/> - </bean> - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + + <bean class="org.apache.oodt.commons.spring.postprocessor.SetIdBeanPostProcessor" /> + + <!-- Precondition Comparators --> + <bean id="CheckThatPushPullMetFileExists" lazy-init="true" class="org.apache.oodt.cas.metadata.preconditions.ExistanceCheckComparator"> + <property name="description" value="Checks if the push-pull metadata file exists for the current data file" /> + <property name="compareItem"> + <value type="java.lang.Boolean">true</value> + </property> + <property name="type" value="equal_to" /> + </bean> + + <bean id="CheckThatDataFileSizeIsGreaterThanZero" lazy-init="true" class="org.apache.oodt.cas.metadata.preconditions.FileSizeComparator"> + <property name="description" value="Check if the current data file size is greater than zero" /> + <property name="compareItem"> + <value type="java.lang.Long">0</value> + </property> + <property name="type" value="greater_than" /> + </bean> + + <bean id="AprioriUniquessCheckWithFilemgr" lazy-init="true" class="org.apache.oodt.cas.crawl.comparator.FilemgrUniquenessCheckComparator"> + <property name="description" value="Checks where the current data file existing in the filemgr based on its FILENAME" /> + <property name="compareItem"> + <value type="java.lang.Boolean">false</value> + </property> + <property name="type" value="equal_to" /> + </bean> </beans>
