sdx-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE : RE : [sdx-users] modification du pipeline d'indexation


From: Rasik Pandey
Subject: RE : RE : [sdx-users] modification du pipeline d'indexation
Date: Mon, 19 May 2003 12:07:26 +0200

Bonjour,

>Je sais, mais ce n'est pas plus difficile en SAX. Tu hérites d'un 
>filtre qui ne fait rien (par exemple un XMLPipe de Cocoon), et tu as 
>des trucs
>:

>startElement(...) {
>  if (disabled) super.startElement();
>  else {
>    // Tu fais quelque chose
>  }

>>Question qui résume tout ce thread IMHO : si disabled est un paramètre
qui a pour vocation a entrer dans SDX, est-ce que les gentils 
>>développeurs ne pourraient pas proposer ce code aux gentils
utilisateurs ?


Voila,  dans AbstractTransformation.java j'ai mis la méthode (non
testée):

 /**Returns a boolean indicating whether 
     * this transformation is enabled
     * first check the tranformations parameters
     * secondly checking the parameters passed
     * from the containing pipeline
     * 
     */ 
    protected boolean isStepEnabled(){
        boolean ret = true;
        //verifying the 'disable' parameter from this TRANSFORMATION's
parameters
        if (transParameters != null ){
            String disable =
transParameters.getParameter(PARAMETER_NAME_DISABLE, "false");
            ret = Boolean.getBoolean(disable);
        }

        /*verifying the 'disable' parameter from the GOVERNING PIPELINE
parameters
        *currently any pipeline parameters passed will 
        *be overriding in nature with regards to this 
        *parameter and method
        */
        if (parameters != null ){
            String disableTransId =
parameters.getParameter(PARAMETER_NAME_DISABLE, null);
            if (Utilities.checkString(disableTransId)){
                if (disableTransId.equals(this.id))
                    ret = false;
             }
        }

        return ret;
    }


Ça suffit, n'est-ce pas? Qu'est-ce que vous en pensez?

Rasik





reply via email to

[Prev in Thread] Current Thread [Next in Thread]