Changeset 983
- Timestamp:
- 08/28/10 23:54:43 (18 months ago)
- Location:
- AnalyzerBeans/trunk
- Files:
-
- 3 added
- 39 edited
-
examples/employees.csv (modified) (previous)
-
examples/employees_conf.xml (modified) (1 diff)
-
examples/employees_job.xml (modified) (4 diffs)
-
src/main/java/org/eobjects/analyzer/beans/valuedist/ValueDistributionResult.java (modified) (2 diffs)
-
src/main/java/org/eobjects/analyzer/cli/Main.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationFactory.java (modified) (3 diffs)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/ClasspathScannerType.java (added)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/CompositeDatastoreType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/Configuration.java (modified) (5 diffs)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/ConfigurationMetadataType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/CsvDatastoreType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/CustomTaskrunnerType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/DatastoreCatalogType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/JdbcDatastoreType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/MultithreadedTaskrunnerType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/ObjectFactory.java (modified) (6 diffs)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/SinglethreadedTaskrunnerType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/configuration/jaxb/package-info.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/JaxbJobFactory.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/AnalysisType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/AnalyzerDescriptorType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/AnalyzerType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/ColumnType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/ColumnsType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/ConfiguredPropertiesType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/DataContextType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/InputType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/Job.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/JobMetadataType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/ObjectFactory.java (modified) (6 diffs)
-
src/main/java/org/eobjects/analyzer/job/jaxb/OutputType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/ProvidedPropertyTypeEnum.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/SourceType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/TransformationType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/TransformerDescriptorType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/TransformerType.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/job/jaxb/package-info.java (modified) (1 diff)
-
src/main/java/org/eobjects/analyzer/result/Crosstab.java (modified) (2 diffs)
-
src/main/resources/configuration.xsd (modified) (2 diffs)
-
src/test/java/org/eobjects/analyzer/job/JaxbJobFactoryTest.java (modified) (1 diff)
-
src/test/java/org/eobjects/analyzer/util/SchemaNavigatorTest.java (added)
-
src/test/resources/employees.csv (added)
Legend:
- Unmodified
- Added
- Removed
-
AnalyzerBeans/trunk/examples/employees_conf.xml
r982 r983 17 17 <multithreaded-taskrunner max-threads="20" /> 18 18 19 <classpath-scanner> 20 <package recursive="true">org.eobjects.analyzer.beans</package> 21 <package>org.eobjects.analyzer.result.renderer</package> 22 </classpath-scanner> 23 19 24 </configuration> -
AnalyzerBeans/trunk/examples/employees_job.xml
r982 r983 3 3 4 4 <job-metadata> 5 5 6 6 </job-metadata> 7 7 … … 10 10 <columns> 11 11 <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" /> 13 13 </columns> 14 14 </source> … … 18 18 <descriptor ref="Email standardizer" /> 19 19 <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" /> 22 22 </transformer> 23 23 24 24 <transformer> 25 25 <descriptor ref="Name standardizer" /> 26 26 <input ref="col_name" /> 27 <output id="col_firstname" />27 <output id="col_firstname" name="First name" /> 28 28 <output id="col_lastname" /> 29 29 <output id="col_middlename" /> … … 41 41 <input ref="col_titulation" /> 42 42 </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> 43 63 </analysis> 44 64 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/beans/valuedist/ValueDistributionResult.java
r956 r983 3 3 import java.util.Collection; 4 4 import java.util.Collections; 5 import java.util.List; 5 6 6 7 import org.eobjects.analyzer.data.InputColumn; … … 70 71 return _columnName; 71 72 } 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 } 72 117 } -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/cli/Main.java
r982 r983 38 38 AnalyzerBeansConfiguration configuration = new JaxbConfigurationFactory() 39 39 .create(configurationFile); 40 AnalysisJobBuilder analysisJobBuilder = new JaxbJobFactory( 41 configuration).create(jobFile); 40 try { 41 AnalysisJobBuilder analysisJobBuilder = new JaxbJobFactory( 42 configuration).create(jobFile); 42 43 43 List<AnalyzerResult> results = new AnalysisRunnerImpl(configuration)44 .run(analysisJobBuilder.toAnalysisJob()).getResults();44 List<AnalyzerResult> results = new AnalysisRunnerImpl(configuration) 45 .run(analysisJobBuilder.toAnalysisJob()).getResults(); 45 46 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(); 48 54 } 49 50 TaskRunner taskRunner = configuration.getTaskRunner();51 taskRunner.shutdown();52 55 } 53 56 } -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationFactory.java
r982 r983 14 14 import javax.xml.bind.Unmarshaller; 15 15 16 import org.eobjects.analyzer.configuration.jaxb.ClasspathScannerType; 17 import org.eobjects.analyzer.configuration.jaxb.ClasspathScannerType.Package; 16 18 import org.eobjects.analyzer.configuration.jaxb.CompositeDatastoreType; 17 19 import org.eobjects.analyzer.configuration.jaxb.Configuration; … … 31 33 import org.eobjects.analyzer.connection.JdbcDatastore; 32 34 import org.eobjects.analyzer.descriptors.ClasspathScanDescriptorProvider; 33 import org.eobjects.analyzer.descriptors.DescriptorProvider;34 35 import org.eobjects.analyzer.job.JaxbJobFactory; 35 36 import org.eobjects.analyzer.job.concurrent.MultiThreadedTaskRunner; … … 102 103 .getDatastoreCatalog()); 103 104 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 104 123 // TODO: Make these components configurable as well 105 124 ReferenceDataCatalog referenceDataCatalog = new ReferenceDataCatalogImpl(); 106 DescriptorProvider descriptorProvider = new ClasspathScanDescriptorProvider()107 .scanPackage("org.eobjects.analyzer.beans", true).scanPackage(108 "org.eobjects.analyzer.result.renderer", true);109 125 CollectionProvider collectionProvider = new BerkeleyDbCollectionProvider(); 110 126 return new AnalyzerBeansConfigurationImpl(datastoreCatalog, -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/CompositeDatastoreType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/Configuration.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 … … 33 33 * <element name="custom-taskrunner" type="{http://eobjects.org/analyzerbeans/configuration/1.0}customTaskrunnerType"/> 34 34 * </choice> 35 * <element name="classpath-scanner" type="{http://eobjects.org/analyzerbeans/configuration/1.0}classpathScannerType" minOccurs="0"/> 35 36 * </sequence> 36 37 * </restriction> … … 47 48 "multithreadedTaskrunner", 48 49 "singlethreadedTaskrunner", 49 "customTaskrunner" 50 "customTaskrunner", 51 "classpathScanner" 50 52 }) 51 53 @XmlRootElement(name = "configuration") … … 62 64 @XmlElement(name = "custom-taskrunner") 63 65 protected CustomTaskrunnerType customTaskrunner; 66 @XmlElement(name = "classpath-scanner") 67 protected ClasspathScannerType classpathScanner; 64 68 65 69 /** … … 183 187 } 184 188 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 185 213 } -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/ConfigurationMetadataType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/CsvDatastoreType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/CustomTaskrunnerType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/DatastoreCatalogType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/JdbcDatastoreType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/MultithreadedTaskrunnerType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/ObjectFactory.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 … … 38 38 39 39 /** 40 * Create an instance of {@link Configuration MetadataType}40 * Create an instance of {@link Configuration } 41 41 * 42 42 */ 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(); 45 61 } 46 62 … … 54 70 55 71 /** 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 /** 56 88 * Create an instance of {@link CompositeDatastoreType } 57 89 * … … 62 94 63 95 /** 64 * Create an instance of {@link DatastoreCatalogType }96 * Create an instance of {@link JdbcDatastoreType } 65 97 * 66 98 */ 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(); 77 101 } 78 102 … … 86 110 87 111 /** 88 * Create an instance of {@link CustomTaskrunnerType }89 *90 */91 public CustomTaskrunnerType createCustomTaskrunnerType() {92 return new CustomTaskrunnerType();93 }94 95 /**96 112 * Create an instance of {@link MultithreadedTaskrunnerType } 97 113 * … … 102 118 103 119 /** 104 * Create an instance of {@link JdbcDatastoreType }120 * Create an instance of {@link DatastoreCatalogType } 105 121 * 106 122 */ 107 public JdbcDatastoreType createJdbcDatastoreType() {108 return new JdbcDatastoreType();123 public DatastoreCatalogType createDatastoreCatalogType() { 124 return new DatastoreCatalogType(); 109 125 } 110 126 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/SinglethreadedTaskrunnerType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/configuration/jaxb/package-info.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:24PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/JaxbJobFactory.java
r982 r983 268 268 269 269 InputColumn<?> inputColumn = inputColumns.get(ref); 270 if (inputColumn == null) { 271 throw new IllegalStateException( 272 "No such input column: " + ref); 273 } 270 274 analyzerJobBuilder.addInputColumn(inputColumn); 271 275 } -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/AnalysisType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/AnalyzerDescriptorType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/AnalyzerType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/ColumnType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/ColumnsType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/ConfiguredPropertiesType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/DataContextType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/InputType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/Job.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/JobMetadataType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/ObjectFactory.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 … … 38 38 39 39 /** 40 * Create an instance of {@link ColumnType }40 * Create an instance of {@link DataContextType } 41 41 * 42 42 */ 43 public ColumnType createColumnType() {44 return new ColumnType();43 public DataContextType createDataContextType() { 44 return new DataContextType(); 45 45 } 46 46 … … 54 54 55 55 /** 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 /**88 56 * Create an instance of {@link AnalyzerDescriptorType } 89 57 * … … 94 62 95 63 /** 96 * Create an instance of {@link SourceType }64 * Create an instance of {@link InputType } 97 65 * 98 66 */ 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(); 133 69 } 134 70 … … 150 86 151 87 /** 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 /** 152 120 * Create an instance of {@link ConfiguredPropertiesType } 153 121 * … … 158 126 159 127 /** 160 * Create an instance of {@link InputType }128 * Create an instance of {@link TransformationType } 161 129 * 162 130 */ 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(); 165 165 } 166 166 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/OutputType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/ProvidedPropertyTypeEnum.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/SourceType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/TransformationType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/TransformerDescriptorType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/TransformerType.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/job/jaxb/package-info.java
r982 r983 3 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 4 4 // Any modifications to this file will be lost upon recompilation of the source schema. 5 // Generated on: 2010.08.28 at 05:39:23PM CEST5 // Generated on: 2010.08.28 at 11:24:27 PM CEST 6 6 // 7 7 -
AnalyzerBeans/trunk/src/main/java/org/eobjects/analyzer/result/Crosstab.java
r980 r983 9 9 import java.util.List; 10 10 import java.util.Map; 11 import java.util.Map.Entry;12 11 import java.util.Set; 12 import java.util.TreeSet; 13 13 14 14 import org.apache.commons.lang.ArrayUtils; … … 202 202 public String toString() { 203 203 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) { 207 207 sb.append('\n'); 208 sb.append( entry.getKey().replaceAll("\\^", ","));208 sb.append(key.replaceAll("\\^", ",")); 209 209 sb.append(": "); 210 sb.append( entry.getValue());211 } 212 210 sb.append(values.get(key)); 211 } 212 213 213 return sb.toString(); 214 214 } -
AnalyzerBeans/trunk/src/main/resources/configuration.xsd
r982 r983 20 20 minOccurs="1" maxOccurs="1" /> 21 21 </choice> 22 <element name="classpath-scanner" minOccurs="0" maxOccurs="1" 23 type="ab:classpathScannerType" /> 22 24 </sequence> 23 25 </complexType> … … 38 40 <element name="updated-date" type="date" minOccurs="0" 39 41 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> 40 56 </sequence> 41 57 </complexType> -
AnalyzerBeans/trunk/src/test/java/org/eobjects/analyzer/job/JaxbJobFactoryTest.java
r982 r983 99 99 assertEquals(1, results.size()); 100 100 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", 131 120 crosstabResult.toString().replaceAll("\n", "|")); 132 121 }
Note: See TracChangeset
for help on using the changeset viewer.
