Changeset 1076


Ignore:
Timestamp:
08/14/11 22:39:03 (9 years ago)
Author:
philsmart
Message:
 
Location:
raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/wsmodel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/wsmodel/ProcessorInformation.java

    r1023 r1076  
    33import java.io.Serializable; 
    44 
    5 public class ProcessorInformation implements Serializable{ 
     5public class ProcessorInformation implements Serializable { 
    66 
    7     /** Generated Serial UID*/ 
     7    /** Generated Serial UID */ 
    88    private static final long serialVersionUID = 3004339123572624352L; 
    99 
    10     /**Bean name of the processor*/ 
     10    /** Bean name of the processor */ 
    1111    private String beanName; 
    12      
    13     /** Name (fully qualified) of this processor class **/ 
     12 
     13    /** Name (fully qualified) of this processors class **/ 
    1414    private String className; 
    1515 
    1616    /** 
    17      * @param beanName the beanName to set 
     17     * @param beanName 
     18     *            the beanName to set 
    1819     */ 
    1920    public void setBeanName(String beanName) { 
     
    2930 
    3031    /** 
    31      * @param className the className to set 
     32     * @param className 
     33     *            the className to set 
    3234     */ 
    3335    public void setClassName(String className) { 
     
    4143        return className; 
    4244    } 
    43      
    44      
     45 
    4546} 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/wsmodel/StatisticalUnitInformation.java

    r1023 r1076  
    77import java.util.List; 
    88 
     9import org.slf4j.Logger; 
     10import org.slf4j.LoggerFactory; 
    911 
    1012/** 
    1113 * This class only represents information, the dattypes are strings, and the strings maybe formatted As a result, this class is only for human consumption (or 
    1214 * presentation to the user) 
    13  * 
     15 *  
    1416 * @author philsmart 
    15  * 
     17 *  
    1618 */ 
    1719public class StatisticalUnitInformation implements Serializable { 
     
    2022    private static final long serialVersionUID = 4580271084108294958L; 
    2123 
     24    /** class logger */ 
     25    private final Logger log = LoggerFactory.getLogger(StatisticalUnitInformation.class); 
     26 
    2227    /** Class representing all parameters for this statistical unit */ 
    2328    private StatisticParameters statisticParameters; 
    2429 
    25     /** Simple list (representing names) of the configured pre-processors*/ 
     30    /** List of the configured pre-processors */ 
    2631    private List<ProcessorInformation> preprocessors; 
    2732 
    28     /** Simple list (representing names) of the configured post-processors*/ 
     33    /** List of the configured post-processors */ 
    2934    private List<ProcessorInformation> postprocessors; 
    3035 
    31  
    32  
    3336    public void setStatisticParameters(StatisticParameters statisticParameters) { 
    34         this.statisticParameters = statisticParameters; 
     37        this.statisticParameters = statisticParameters; 
    3538    } 
    3639 
    3740    public StatisticParameters getStatisticParameters() { 
    38         return statisticParameters; 
     41        return statisticParameters; 
    3942    } 
    40  
    4143 
    4244    /** 
    4345     * human consumable output method for array of preprocessors 
     46     *  
    4447     * @return 
    4548     */ 
    46     public String getPreProcessorsAsString(){ 
    47         StringBuilder output = new StringBuilder(); 
    48         if (preprocessors==null) 
    49             return output.toString(); 
    50         int count=0; 
    51         for (ProcessorInformation preprocessor : preprocessors){ 
    52             output.append(preprocessor.getBeanName()); 
    53             if (count < preprocessors.size()-1)output.append(", "); 
    54             count++; 
    55         } 
    56         return output.toString(); 
     49    public String getPreProcessorsAsString() { 
     50        StringBuilder output = new StringBuilder(); 
     51        if (preprocessors == null) 
     52            return output.toString(); 
     53        int count = 0; 
     54        for (ProcessorInformation preprocessor : preprocessors) { 
     55            output.append(preprocessor.getBeanName()); 
     56            if (count < preprocessors.size() - 1) 
     57                output.append(", "); 
     58            count++; 
     59        } 
     60        return output.toString(); 
    5761    } 
    5862 
    5963    /** 
    6064     * human consumable output method for array of postprocessors 
     65     *  
    6166     * @return 
    6267     */ 
    63     public String getPostProcessorsAsString(){ 
    64         StringBuilder output = new StringBuilder(); 
    65         if (preprocessors==null) 
    66             return output.toString(); 
    67         int count=0; 
    68         for (ProcessorInformation postprocessor : postprocessors){ 
    69             output.append(postprocessor.getBeanName()); 
    70             if (count < postprocessors.size()-1)output.append(", "); 
    71             count++; 
    72         } 
    73         return output.toString(); 
     68    public String getPostProcessorsAsString() { 
     69        StringBuilder output = new StringBuilder(); 
     70        if (preprocessors == null) 
     71            return output.toString(); 
     72        int count = 0; 
     73        for (ProcessorInformation postprocessor : postprocessors) { 
     74            output.append(postprocessor.getBeanName()); 
     75            if (count < postprocessors.size() - 1) 
     76                output.append(", "); 
     77            count++; 
     78        } 
     79        return output.toString(); 
    7480    } 
    7581 
    7682    /** 
    77      * @param preprocessors the preprocessors to set 
     83     * @param preprocessors 
     84     *            the preprocessors to set 
    7885     */ 
    7986    public void setPreprocessors(List<ProcessorInformation> preprocessors) { 
     
    8996 
    9097    /** 
    91      * @param postprocessors the postprocessors to set 
     98     * @param postprocessors 
     99     *            the postprocessors to set 
    92100     */ 
    93101    public void setPostprocessors(List<ProcessorInformation> postprocessors) { 
     102        for (ProcessorInformation processor : postprocessors) { 
     103            log.debug("Post processor {} added", processor.getBeanName()); 
     104 
     105        } 
    94106        this.postprocessors = postprocessors; 
    95107    } 
     
    102114    } 
    103115 
    104  
    105116} 
Note: See TracChangeset for help on using the changeset viewer.