Changeset 983


Ignore:
Timestamp:
08/28/10 23:54:43 (18 months ago)
Author:
kasper
Message:

Ticket #382: Improved testing and examples. Added classpath scanning and more to configuration.

Location:
AnalyzerBeans/trunk
Files:
3 added
39 edited

Legend:

Unmodified
Added
Removed
  • AnalyzerBeans/trunk/examples/employees_conf.xml

    r982 r983  
    1717        <multithreaded-taskrunner max-threads="20" /> 
    1818 
     19        <classpath-scanner> 
     20                <package recursive="true">org.eobjects.analyzer.beans</package> 
     21                <package>org.eobjects.analyzer.result.renderer</package> 
     22        </classpath-scanner> 
     23 
    1924</configuration> 
  • AnalyzerBeans/trunk/examples/employees_job.xml

    r982 r983  
    33 
    44        <job-metadata> 
    5                  
     5 
    66        </job-metadata> 
    77 
     
    1010                <columns> 
    1111                        <column id="col_name" path="employees.csv.employees.name" /> 
    12                         <column id="col_email" path="employees.csv.employees.name" /> 
     12                        <column id="col_email" path="employees.csv.employees.email" /> 
    1313                </columns> 
    1414        </source> 
     
    1818                        <descriptor ref="Email standardizer" /> 
    1919                        <input ref="col_email" /> 
    20                         <output id="col_username" name="username" /> 
    21                         <output id="col_domain" name="domain" /> 
     20                        <output id="col_username" name="Email username" /> 
     21                        <output id="col_domain" name="Email domain" /> 
    2222                </transformer> 
    23                  
     23 
    2424                <transformer> 
    2525                        <descriptor ref="Name standardizer" /> 
    2626                        <input ref="col_name" /> 
    27                         <output id="col_firstname" /> 
     27                        <output id="col_firstname" name="First name" /> 
    2828                        <output id="col_lastname" /> 
    2929                        <output id="col_middlename" /> 
     
    4141                        <input ref="col_titulation" /> 
    4242                </analyzer> 
     43 
     44                <analyzer> 
     45                        <descriptor ref="Value distribution" /> 
     46                        <input ref="col_firstname" /> 
     47                </analyzer> 
     48 
     49                <analyzer> 
     50                        <descriptor ref="Value distribution" /> 
     51                        <input ref="col_lastname" /> 
     52                </analyzer> 
     53 
     54                <analyzer> 
     55                        <descriptor ref="Value distribution" /> 
     56                        <input ref="col_username" /> 
     57                </analyzer> 
     58 
     59                <analyzer> 
     60                        <descriptor ref="Value distribution" /> 
     61                        <input ref="col_domain" /> 
     62                </analyzer> 
    4363        </analysis> 
    4464 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/beans/valuedist/ValueDistributionResult.java

    r956 r983  
    33import java.util.Collection; 
    44import java.util.Collections; 
     5import java.util.List; 
    56 
    67import org.eobjects.analyzer.data.InputColumn; 
     
    7071                return _columnName; 
    7172        } 
     73 
     74        @Override 
     75        public String toString() { 
     76                StringBuilder sb = new StringBuilder(); 
     77                sb.append("Value distribution for column: "); 
     78                sb.append(_columnName); 
     79                sb.append('\n'); 
     80 
     81                if (_topValues != null && _topValues.getActualSize() > 0) { 
     82                        sb.append("Top values:"); 
     83                        List<ValueCount> valueCounts = _topValues.getValueCounts(); 
     84                        for (ValueCount valueCount : valueCounts) { 
     85                                sb.append("\n - "); 
     86                                sb.append(valueCount.getValue()); 
     87                                sb.append(": "); 
     88                                sb.append(valueCount.getCount()); 
     89                        } 
     90                } 
     91 
     92                if (_bottomValues != null && _bottomValues.getActualSize() > 0) { 
     93                        sb.append("Bottom values:"); 
     94                        List<ValueCount> valueCounts = _bottomValues.getValueCounts(); 
     95                        for (ValueCount valueCount : valueCounts) { 
     96                                sb.append("\n - "); 
     97                                sb.append(valueCount.getValue()); 
     98                                sb.append(": "); 
     99                                sb.append(valueCount.getCount()); 
     100                        } 
     101                } 
     102 
     103                sb.append("\nNull count: "); 
     104                sb.append(_nullCount); 
     105 
     106                sb.append("\nUnique values: "); 
     107                if (_uniqueValues == null) { 
     108                        sb.append(_uniqueValueCount); 
     109                } else { 
     110                        for (String value : _uniqueValues) { 
     111                                sb.append("\n - "); 
     112                                sb.append(value); 
     113                        } 
     114                } 
     115                return sb.toString(); 
     116        } 
    72117} 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/cli/Main.java

    r982 r983  
    3838                AnalyzerBeansConfiguration configuration = new JaxbConfigurationFactory() 
    3939                                .create(configurationFile); 
    40                 AnalysisJobBuilder analysisJobBuilder = new JaxbJobFactory( 
    41                                 configuration).create(jobFile); 
     40                try { 
     41                        AnalysisJobBuilder analysisJobBuilder = new JaxbJobFactory( 
     42                                        configuration).create(jobFile); 
    4243 
    43                 List<AnalyzerResult> results = new AnalysisRunnerImpl(configuration) 
    44                                 .run(analysisJobBuilder.toAnalysisJob()).getResults(); 
     44                        List<AnalyzerResult> results = new AnalysisRunnerImpl(configuration) 
     45                                        .run(analysisJobBuilder.toAnalysisJob()).getResults(); 
    4546 
    46                 for (AnalyzerResult analyzerResult : results) { 
    47                         System.out.println("RESULT: " + analyzerResult); 
     47                        for (AnalyzerResult analyzerResult : results) { 
     48                                System.out.println("\nRESULT:"); 
     49                                System.out.println(analyzerResult); 
     50                        } 
     51                } finally { 
     52                        TaskRunner taskRunner = configuration.getTaskRunner(); 
     53                        taskRunner.shutdown(); 
    4854                } 
    49  
    50                 TaskRunner taskRunner = configuration.getTaskRunner(); 
    51                 taskRunner.shutdown(); 
    5255        } 
    5356} 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationFactory.java

    r982 r983  
    1414import javax.xml.bind.Unmarshaller; 
    1515 
     16import org.eobjects.analyzer.configuration.jaxb.ClasspathScannerType; 
     17import org.eobjects.analyzer.configuration.jaxb.ClasspathScannerType.Package; 
    1618import org.eobjects.analyzer.configuration.jaxb.CompositeDatastoreType; 
    1719import org.eobjects.analyzer.configuration.jaxb.Configuration; 
     
    3133import org.eobjects.analyzer.connection.JdbcDatastore; 
    3234import org.eobjects.analyzer.descriptors.ClasspathScanDescriptorProvider; 
    33 import org.eobjects.analyzer.descriptors.DescriptorProvider; 
    3435import org.eobjects.analyzer.job.JaxbJobFactory; 
    3536import org.eobjects.analyzer.job.concurrent.MultiThreadedTaskRunner; 
     
    102103                                .getDatastoreCatalog()); 
    103104 
     105                ClasspathScanDescriptorProvider descriptorProvider = new ClasspathScanDescriptorProvider(); 
     106                ClasspathScannerType classpathScanner = configuration 
     107                                .getClasspathScanner(); 
     108                if (classpathScanner != null) { 
     109                        List<Package> packages = classpathScanner.getPackage(); 
     110                        for (Package pkg : packages) { 
     111                                String packageName = pkg.getValue(); 
     112                                if (packageName != null) { 
     113                                        packageName = packageName.trim(); 
     114                                        Boolean recursive = pkg.isRecursive(); 
     115                                        if (recursive == null) { 
     116                                                recursive = true; 
     117                                        } 
     118                                        descriptorProvider.scanPackage(packageName, recursive); 
     119                                } 
     120                        } 
     121                } 
     122 
    104123                // TODO: Make these components configurable as well 
    105124                ReferenceDataCatalog referenceDataCatalog = new ReferenceDataCatalogImpl(); 
    106                 DescriptorProvider descriptorProvider = new ClasspathScanDescriptorProvider() 
    107                                 .scanPackage("org.eobjects.analyzer.beans", true).scanPackage( 
    108                                                 "org.eobjects.analyzer.result.renderer", true); 
    109125                CollectionProvider collectionProvider = new BerkeleyDbCollectionProvider(); 
    110126                return new AnalyzerBeansConfigurationImpl(datastoreCatalog, 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/CompositeDatastoreType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/Configuration.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
     
    3333 *           &lt;element name="custom-taskrunner" type="{http://eobjects.org/analyzerbeans/configuration/1.0}customTaskrunnerType"/> 
    3434 *         &lt;/choice> 
     35 *         &lt;element name="classpath-scanner" type="{http://eobjects.org/analyzerbeans/configuration/1.0}classpathScannerType" minOccurs="0"/> 
    3536 *       &lt;/sequence> 
    3637 *     &lt;/restriction> 
     
    4748    "multithreadedTaskrunner", 
    4849    "singlethreadedTaskrunner", 
    49     "customTaskrunner" 
     50    "customTaskrunner", 
     51    "classpathScanner" 
    5052}) 
    5153@XmlRootElement(name = "configuration") 
     
    6264    @XmlElement(name = "custom-taskrunner") 
    6365    protected CustomTaskrunnerType customTaskrunner; 
     66    @XmlElement(name = "classpath-scanner") 
     67    protected ClasspathScannerType classpathScanner; 
    6468 
    6569    /** 
     
    183187    } 
    184188 
     189    /** 
     190     * Gets the value of the classpathScanner property. 
     191     *  
     192     * @return 
     193     *     possible object is 
     194     *     {@link ClasspathScannerType } 
     195     *      
     196     */ 
     197    public ClasspathScannerType getClasspathScanner() { 
     198        return classpathScanner; 
     199    } 
     200 
     201    /** 
     202     * Sets the value of the classpathScanner property. 
     203     *  
     204     * @param value 
     205     *     allowed object is 
     206     *     {@link ClasspathScannerType } 
     207     *      
     208     */ 
     209    public void setClasspathScanner(ClasspathScannerType value) { 
     210        this.classpathScanner = value; 
     211    } 
     212 
    185213} 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/ConfigurationMetadataType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/CsvDatastoreType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/CustomTaskrunnerType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/DatastoreCatalogType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/JdbcDatastoreType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/MultithreadedTaskrunnerType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/ObjectFactory.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
     
    3838 
    3939    /** 
    40      * Create an instance of {@link ConfigurationMetadataType } 
     40     * Create an instance of {@link Configuration } 
    4141     *  
    4242     */ 
    43     public ConfigurationMetadataType createConfigurationMetadataType() { 
    44         return new ConfigurationMetadataType(); 
     43    public Configuration createConfiguration() { 
     44        return new Configuration(); 
     45    } 
     46 
     47    /** 
     48     * Create an instance of {@link ClasspathScannerType.Package } 
     49     *  
     50     */ 
     51    public ClasspathScannerType.Package createClasspathScannerTypePackage() { 
     52        return new ClasspathScannerType.Package(); 
     53    } 
     54 
     55    /** 
     56     * Create an instance of {@link CustomTaskrunnerType } 
     57     *  
     58     */ 
     59    public CustomTaskrunnerType createCustomTaskrunnerType() { 
     60        return new CustomTaskrunnerType(); 
    4561    } 
    4662 
     
    5470 
    5571    /** 
     72     * Create an instance of {@link ConfigurationMetadataType } 
     73     *  
     74     */ 
     75    public ConfigurationMetadataType createConfigurationMetadataType() { 
     76        return new ConfigurationMetadataType(); 
     77    } 
     78 
     79    /** 
     80     * Create an instance of {@link ClasspathScannerType } 
     81     *  
     82     */ 
     83    public ClasspathScannerType createClasspathScannerType() { 
     84        return new ClasspathScannerType(); 
     85    } 
     86 
     87    /** 
    5688     * Create an instance of {@link CompositeDatastoreType } 
    5789     *  
     
    6294 
    6395    /** 
    64      * Create an instance of {@link DatastoreCatalogType } 
     96     * Create an instance of {@link JdbcDatastoreType } 
    6597     *  
    6698     */ 
    67     public DatastoreCatalogType createDatastoreCatalogType() { 
    68         return new DatastoreCatalogType(); 
    69     } 
    70  
    71     /** 
    72      * Create an instance of {@link Configuration } 
    73      *  
    74      */ 
    75     public Configuration createConfiguration() { 
    76         return new Configuration(); 
     99    public JdbcDatastoreType createJdbcDatastoreType() { 
     100        return new JdbcDatastoreType(); 
    77101    } 
    78102 
     
    86110 
    87111    /** 
    88      * Create an instance of {@link CustomTaskrunnerType } 
    89      *  
    90      */ 
    91     public CustomTaskrunnerType createCustomTaskrunnerType() { 
    92         return new CustomTaskrunnerType(); 
    93     } 
    94  
    95     /** 
    96112     * Create an instance of {@link MultithreadedTaskrunnerType } 
    97113     *  
     
    102118 
    103119    /** 
    104      * Create an instance of {@link JdbcDatastoreType } 
     120     * Create an instance of {@link DatastoreCatalogType } 
    105121     *  
    106122     */ 
    107     public JdbcDatastoreType createJdbcDatastoreType() { 
    108         return new JdbcDatastoreType(); 
     123    public DatastoreCatalogType createDatastoreCatalogType() { 
     124        return new DatastoreCatalogType(); 
    109125    } 
    110126 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/SinglethreadedTaskrunnerType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/package-info.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:24 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/JaxbJobFactory.java

    r982 r983  
    268268 
    269269                                        InputColumn<?> inputColumn = inputColumns.get(ref); 
     270                                        if (inputColumn == null) { 
     271                                                throw new IllegalStateException( 
     272                                                                "No such input column: " + ref); 
     273                                        } 
    270274                                        analyzerJobBuilder.addInputColumn(inputColumn); 
    271275                                } 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/AnalysisType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/AnalyzerDescriptorType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/AnalyzerType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/ColumnType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/ColumnsType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/ConfiguredPropertiesType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/DataContextType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/InputType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/Job.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/JobMetadataType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/ObjectFactory.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
     
    3838 
    3939    /** 
    40      * Create an instance of {@link ColumnType } 
     40     * Create an instance of {@link DataContextType } 
    4141     *  
    4242     */ 
    43     public ColumnType createColumnType() { 
    44         return new ColumnType(); 
     43    public DataContextType createDataContextType() { 
     44        return new DataContextType(); 
    4545    } 
    4646 
     
    5454 
    5555    /** 
    56      * Create an instance of {@link TransformerDescriptorType } 
    57      *  
    58      */ 
    59     public TransformerDescriptorType createTransformerDescriptorType() { 
    60         return new TransformerDescriptorType(); 
    61     } 
    62  
    63     /** 
    64      * Create an instance of {@link AnalyzerType } 
    65      *  
    66      */ 
    67     public AnalyzerType createAnalyzerType() { 
    68         return new AnalyzerType(); 
    69     } 
    70  
    71     /** 
    72      * Create an instance of {@link TransformationType } 
    73      *  
    74      */ 
    75     public TransformationType createTransformationType() { 
    76         return new TransformationType(); 
    77     } 
    78  
    79     /** 
    80      * Create an instance of {@link AnalysisType } 
    81      *  
    82      */ 
    83     public AnalysisType createAnalysisType() { 
    84         return new AnalysisType(); 
    85     } 
    86  
    87     /** 
    8856     * Create an instance of {@link AnalyzerDescriptorType } 
    8957     *  
     
    9462 
    9563    /** 
    96      * Create an instance of {@link SourceType } 
     64     * Create an instance of {@link InputType } 
    9765     *  
    9866     */ 
    99     public SourceType createSourceType() { 
    100         return new SourceType(); 
    101     } 
    102  
    103     /** 
    104      * Create an instance of {@link DataContextType } 
    105      *  
    106      */ 
    107     public DataContextType createDataContextType() { 
    108         return new DataContextType(); 
    109     } 
    110  
    111     /** 
    112      * Create an instance of {@link ColumnsType } 
    113      *  
    114      */ 
    115     public ColumnsType createColumnsType() { 
    116         return new ColumnsType(); 
    117     } 
    118  
    119     /** 
    120      * Create an instance of {@link Job } 
    121      *  
    122      */ 
    123     public Job createJob() { 
    124         return new Job(); 
    125     } 
    126  
    127     /** 
    128      * Create an instance of {@link JobMetadataType } 
    129      *  
    130      */ 
    131     public JobMetadataType createJobMetadataType() { 
    132         return new JobMetadataType(); 
     67    public InputType createInputType() { 
     68        return new InputType(); 
    13369    } 
    13470 
     
    15086 
    15187    /** 
     88     * Create an instance of {@link SourceType } 
     89     *  
     90     */ 
     91    public SourceType createSourceType() { 
     92        return new SourceType(); 
     93    } 
     94 
     95    /** 
     96     * Create an instance of {@link AnalyzerType } 
     97     *  
     98     */ 
     99    public AnalyzerType createAnalyzerType() { 
     100        return new AnalyzerType(); 
     101    } 
     102 
     103    /** 
     104     * Create an instance of {@link ColumnType } 
     105     *  
     106     */ 
     107    public ColumnType createColumnType() { 
     108        return new ColumnType(); 
     109    } 
     110 
     111    /** 
     112     * Create an instance of {@link TransformerDescriptorType } 
     113     *  
     114     */ 
     115    public TransformerDescriptorType createTransformerDescriptorType() { 
     116        return new TransformerDescriptorType(); 
     117    } 
     118 
     119    /** 
    152120     * Create an instance of {@link ConfiguredPropertiesType } 
    153121     *  
     
    158126 
    159127    /** 
    160      * Create an instance of {@link InputType } 
     128     * Create an instance of {@link TransformationType } 
    161129     *  
    162130     */ 
    163     public InputType createInputType() { 
    164         return new InputType(); 
     131    public TransformationType createTransformationType() { 
     132        return new TransformationType(); 
     133    } 
     134 
     135    /** 
     136     * Create an instance of {@link JobMetadataType } 
     137     *  
     138     */ 
     139    public JobMetadataType createJobMetadataType() { 
     140        return new JobMetadataType(); 
     141    } 
     142 
     143    /** 
     144     * Create an instance of {@link Job } 
     145     *  
     146     */ 
     147    public Job createJob() { 
     148        return new Job(); 
     149    } 
     150 
     151    /** 
     152     * Create an instance of {@link AnalysisType } 
     153     *  
     154     */ 
     155    public AnalysisType createAnalysisType() { 
     156        return new AnalysisType(); 
     157    } 
     158 
     159    /** 
     160     * Create an instance of {@link ColumnsType } 
     161     *  
     162     */ 
     163    public ColumnsType createColumnsType() { 
     164        return new ColumnsType(); 
    165165    } 
    166166 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/OutputType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/ProvidedPropertyTypeEnum.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/SourceType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/TransformationType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/TransformerDescriptorType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/TransformerType.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/package-info.java

    r982 r983  
    33// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  
    44// Any modifications to this file will be lost upon recompilation of the source schema.  
    5 // Generated on: 2010.08.28 at 05:39:23 PM CEST  
     5// Generated on: 2010.08.28 at 11:24:27 PM CEST  
    66// 
    77 
  • AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/result/Crosstab.java

    r980 r983  
    99import java.util.List; 
    1010import java.util.Map; 
    11 import java.util.Map.Entry; 
    1211import java.util.Set; 
     12import java.util.TreeSet; 
    1313 
    1414import org.apache.commons.lang.ArrayUtils; 
     
    202202        public String toString() { 
    203203                StringBuilder sb = new StringBuilder("Crosstab:"); 
    204                  
    205                 Set<Entry<String, E>> entrySet = values.entrySet(); 
    206                 for (Entry<String, E> entry : entrySet) { 
     204 
     205                Set<String> keySet = new TreeSet<String>(values.keySet()); 
     206                for (String key : keySet) { 
    207207                        sb.append('\n'); 
    208                         sb.append(entry.getKey().replaceAll("\\^", ",")); 
     208                        sb.append(key.replaceAll("\\^", ",")); 
    209209                        sb.append(": "); 
    210                         sb.append(entry.getValue()); 
    211                 } 
    212                  
     210                        sb.append(values.get(key)); 
     211                } 
     212 
    213213                return sb.toString(); 
    214214        } 
  • AnalyzerBeans/trunk/src/main/resources/configuration.xsd

    r982 r983  
    2020                                                minOccurs="1" maxOccurs="1" /> 
    2121                                </choice> 
     22                                <element name="classpath-scanner" minOccurs="0" maxOccurs="1" 
     23                                        type="ab:classpathScannerType" /> 
    2224                        </sequence> 
    2325                </complexType> 
     
    3840                        <element name="updated-date" type="date" minOccurs="0" 
    3941                                maxOccurs="1" /> 
     42                </sequence> 
     43        </complexType> 
     44 
     45        <complexType name="classpathScannerType"> 
     46                <sequence> 
     47                        <element name="package" minOccurs="1" maxOccurs="unbounded"> 
     48                                <complexType> 
     49                                        <simpleContent> 
     50                                                <extension base="string"> 
     51                                                        <attribute name="recursive" type="boolean" use="optional" /> 
     52                                                </extension> 
     53                                        </simpleContent> 
     54                                </complexType> 
     55                        </element> 
    4056                </sequence> 
    4157        </complexType> 
  • AnalyzerBeans/trunk/src/test/java/org/eobjects/analyzer/job/JaxbJobFactoryTest.java

    r982 r983  
    9999                assertEquals(1, results.size()); 
    100100                CrosstabResult crosstabResult = (CrosstabResult) results.get(0); 
    101                 assertEquals("Crosstab:|" + "domain,Lowercase chars: 95%|" 
    102                                 + "domain,Uppercase chars: 0%|" + "domain,Avg white spaces: 0|" 
    103                                 + "username,Max chars: 10|" + "FIRSTNAME,Word count: 24|" 
    104                                 + "domain,Word count: 23|" + "username,Max white spaces: 0|" 
    105                                 + "FIRSTNAME,Max words: 2|" + "LASTNAME,Min words: 1|" 
    106                                 + "FIRSTNAME,Max white spaces: 1|" 
    107                                 + "username,Char count: 172|" + "username,Avg chars: 7,48|" 
    108                                 + "LASTNAME,Word count: 23|" + "username,Min white spaces: 0|" 
    109                                 + "LASTNAME,Max white spaces: 0|" + "LASTNAME,Char count: 147|" 
    110                                 + "FIRSTNAME,Avg chars: 5,39|" + "domain,Min white spaces: 0|" 
    111                                 + "domain,Max chars: 20|" + "LASTNAME,Avg chars: 6,39|" 
    112                                 + "username,Uppercase chars: 0%|" 
    113                                 + "username,Lowercase chars: 100%|" + "LASTNAME,Max words: 1|" 
    114                                 + "LASTNAME,Avg white spaces: 0|" + "LASTNAME,Min chars: 3|" 
    115                                 + "domain,Min chars: 20|" + "FIRSTNAME,Min white spaces: 0|" 
    116                                 + "username,Avg white spaces: 0|" 
    117                                 + "FIRSTNAME,Char count: 124|" 
    118                                 + "LASTNAME,Min white spaces: 0|" + "domain,Avg chars: 20|" 
    119                                 + "FIRSTNAME,Non-letter chars: 0%|" + "domain,Max words: 1|" 
    120                                 + "FIRSTNAME,Uppercase chars: 19%|" + "username,Max words: 1|" 
    121                                 + "FIRSTNAME,Min words: 1|" + "username,Min chars: 5|" 
    122                                 + "LASTNAME,Lowercase chars: 84%|" + "username,Min words: 1|" 
    123                                 + "FIRSTNAME,Max chars: 8|" + "domain,Min words: 1|" 
    124                                 + "FIRSTNAME,Avg white spaces: 0,04|" 
    125                                 + "username,Word count: 23|" + "LASTNAME,Uppercase chars: 15%|" 
    126                                 + "LASTNAME,Non-letter chars: 0%|" + "domain,Char count: 460|" 
    127                                 + "username,Non-letter chars: 0%|" + "FIRSTNAME,Min chars: 3|" 
    128                                 + "domain,Non-letter chars: 5%|" 
    129                                 + "domain,Max white spaces: 0|" 
    130                                 + "FIRSTNAME,Lowercase chars: 79%|" + "LASTNAME,Max chars: 9", 
     101                assertEquals( 
     102                                "Crosstab:|FIRSTNAME,Avg chars: 5,39|FIRSTNAME,Avg white spaces: 0,04|" 
     103                                                + "FIRSTNAME,Char count: 124|FIRSTNAME,Lowercase chars: 79%|FIRSTNAME,Max chars: 8|" 
     104                                                + "FIRSTNAME,Max white spaces: 1|FIRSTNAME,Max words: 2|FIRSTNAME,Min chars: 3|" 
     105                                                + "FIRSTNAME,Min white spaces: 0|FIRSTNAME,Min words: 1|FIRSTNAME,Non-letter chars: 0%|" 
     106                                                + "FIRSTNAME,Uppercase chars: 19%|FIRSTNAME,Word count: 24|LASTNAME,Avg chars: 6,39|" 
     107                                                + "LASTNAME,Avg white spaces: 0|LASTNAME,Char count: 147|LASTNAME,Lowercase chars: 84%|" 
     108                                                + "LASTNAME,Max chars: 9|LASTNAME,Max white spaces: 0|LASTNAME,Max words: 1|" 
     109                                                + "LASTNAME,Min chars: 3|LASTNAME,Min white spaces: 0|LASTNAME,Min words: 1|" 
     110                                                + "LASTNAME,Non-letter chars: 0%|LASTNAME,Uppercase chars: 15%|LASTNAME,Word count: 23|" 
     111                                                + "domain,Avg chars: 20|domain,Avg white spaces: 0|domain,Char count: 460|" 
     112                                                + "domain,Lowercase chars: 95%|domain,Max chars: 20|domain,Max white spaces: 0|" 
     113                                                + "domain,Max words: 1|domain,Min chars: 20|domain,Min white spaces: 0|" 
     114                                                + "domain,Min words: 1|domain,Non-letter chars: 5%|domain,Uppercase chars: 0%|" 
     115                                                + "domain,Word count: 23|username,Avg chars: 7,48|username,Avg white spaces: 0|" 
     116                                                + "username,Char count: 172|username,Lowercase chars: 100%|username,Max chars: 10|" 
     117                                                + "username,Max white spaces: 0|username,Max words: 1|username,Min chars: 5|" 
     118                                                + "username,Min white spaces: 0|username,Min words: 1|username,Non-letter chars: 0%|" 
     119                                                + "username,Uppercase chars: 0%|username,Word count: 23", 
    131120                                crosstabResult.toString().replaceAll("\n", "|")); 
    132121        } 
Note: See TracChangeset for help on using the changeset viewer.