oodt-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramirez, Paul M (388J)" <paul.m.rami...@jpl.nasa.gov>
Subject Re: mimetype specific actions for a crawler launcher
Date Wed, 11 Jan 2012 16:35:36 GMT
Hey Faranak,

Actually, that is exactly what the mimetype product crawler does. Here is a sample of an action
that deletes a legend file. The key is that the action itself gets wrapped by another bean
that sets which mimetypes apply for the actionToCall.

   <bean id="DeleteLegendFile" lazy-init="true" class="gov.nasa.jpl.lmmp.actions.DeleteFile">
        <property name="description" value="Deletes the legend file for the current data
        <property name="fileExtension" value="${legend.file.extension}"/>
        <property name="fileSuffix" value="${legend.file.suffix}"/>
        <property name="keepExistingExtension">
            <value type="java.lang.Boolean">false</value>
        <property name="phases">
                <value type="java.lang.String">postIngestSuccess</value>

<bean id="MiTy-DeleteLegendFile" lazy-init="true" class="gov.nasa.jpl.oodt.cas.crawl.action.MimeTypeCrawlerAction">
        <property name="actionToCall">
            <ref bean="DeleteLegendFile"/>
        <property name="mimeTypes">

So the first bean is the definition of the action while the second bean is associating the
mimetypes with the action. Then in your launcher script you simply specify only the mimetype
action (in this case MiTy-DeleteLegendFile" and it will only apply to the mimeTypes listed.
The mimetypes.xml file merely describes how to identify a particular mimetype. The action
bean that uses gov.nasa.jpl.oodt.cas.crawl.action.MimeTypeCrawlerAction makes the association
of mimetype to action.


On Jan 10, 2012, at 5:37 PM, Davoodi, Faranak (388J) wrote:

> In OODT Crawlers, we usually have a launcher that has a series of actions defined in
the action bean. The actions could be run for any product specified in the mimetypes.xml in
the launcher script. However, we are not able to say an specific action to be done just for
one specific mimetype and not the others.  I am wondering if we can specify a mimetype as
an argument in our actions that let the crawler know to run that action just for that specific
mimetype(s) only. Of course as a solution what we do now is to specify the file extension
or its regEx pattern and try it in the java action first and if it was true, then we run that
> Thanks,
> Faranak

View raw message