Loading histream-import/README.txt +12 −0 Original line number Diff line number Diff line README ====== Schema/XSD for import descriptions ---------------------------------- If you want an XSD file for the import description XML, you can run `target/classes/schemagen.bat` or `target/classes/schemagen.sh` after a successful build. The resulting schema will be stored in `target/generated-sources/schemagen/`. Parsing of columns ------------------ Columns are parsed as follows: Loading @@ -6,3 +17,4 @@ Columns are parsed as follows: 3. Regular expression substitution is performed if present via @regex-replace (may change the value) 4. Map rules are executed if present via map/case and map/otherwise elements. These rules may change the value (and concept code) 5. If the @na attribute is present and equals the calculated value, the value is removed completely histream-import/pom.xml +12 −7 Original line number Diff line number Diff line Loading @@ -17,12 +17,17 @@ </properties> <build> <plugins> <!-- TODO: Fix schemagen invokation (some annotations wrong?) <resources> <resource> <directory>src/main/scripts</directory> <filtering>true</filtering> </resource> </resources> <plugins><!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <version>2.1</version> <version>2.2</version> <executions> <execution> <id>schemagen</id> Loading @@ -32,12 +37,12 @@ </execution> </executions> <configuration> <sources> <source>src/main/java/de/sekmi/histream/etl/config</source> <source>src/main/java/de/sekmi/histream/etl/config/DataSource.java</source> </sources> </configuration> </plugin> --> </plugin> --> </plugins> </build> Loading histream-import/src/main/java/de/sekmi/histream/etl/config/DataSource.java +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlSeeAlso; * @author Raphael * */ @XmlRootElement @XmlRootElement(name="datasource") @XmlAccessorType(XmlAccessType.FIELD) @XmlSeeAlso({Column.class, StringColumn.class}) public class DataSource { Loading histream-import/src/main/java/de/sekmi/histream/etl/config/SQLSource.java +4 −3 Original line number Diff line number Diff line package de.sekmi.histream.etl.config; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import de.sekmi.histream.etl.RowSupplier; @XmlType(name="sql-query") public class SQLSource extends TableSource { @XmlElement String jdbcDriver; @XmlElement String connectString; @XmlElement String sql; String sqlSelect; private SQLSource() { } Loading @@ -21,7 +23,6 @@ public class SQLSource extends TableSource { } @Override public RowSupplier rows(Meta meta) { // TODO Auto-generated method stub return null; throw new UnsupportedOperationException("Not implemented yet"); } } histream-import/src/main/scripts/schemagen.bat 0 → 100644 +3 −0 Original line number Diff line number Diff line @ECHO OFF mkdir target/generated-sources/schemagen "%JAVA_HOME%/bin/schemagen.exe" -d "target/generated-sources/schemagen" -cp "target/histream-import-${project.version}.jar;../histream-core/target/histream-core-${project.version}.jar" de.sekmi.histream.etl.config.DataSource Loading
histream-import/README.txt +12 −0 Original line number Diff line number Diff line README ====== Schema/XSD for import descriptions ---------------------------------- If you want an XSD file for the import description XML, you can run `target/classes/schemagen.bat` or `target/classes/schemagen.sh` after a successful build. The resulting schema will be stored in `target/generated-sources/schemagen/`. Parsing of columns ------------------ Columns are parsed as follows: Loading @@ -6,3 +17,4 @@ Columns are parsed as follows: 3. Regular expression substitution is performed if present via @regex-replace (may change the value) 4. Map rules are executed if present via map/case and map/otherwise elements. These rules may change the value (and concept code) 5. If the @na attribute is present and equals the calculated value, the value is removed completely
histream-import/pom.xml +12 −7 Original line number Diff line number Diff line Loading @@ -17,12 +17,17 @@ </properties> <build> <plugins> <!-- TODO: Fix schemagen invokation (some annotations wrong?) <resources> <resource> <directory>src/main/scripts</directory> <filtering>true</filtering> </resource> </resources> <plugins><!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <version>2.1</version> <version>2.2</version> <executions> <execution> <id>schemagen</id> Loading @@ -32,12 +37,12 @@ </execution> </executions> <configuration> <sources> <source>src/main/java/de/sekmi/histream/etl/config</source> <source>src/main/java/de/sekmi/histream/etl/config/DataSource.java</source> </sources> </configuration> </plugin> --> </plugin> --> </plugins> </build> Loading
histream-import/src/main/java/de/sekmi/histream/etl/config/DataSource.java +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlSeeAlso; * @author Raphael * */ @XmlRootElement @XmlRootElement(name="datasource") @XmlAccessorType(XmlAccessType.FIELD) @XmlSeeAlso({Column.class, StringColumn.class}) public class DataSource { Loading
histream-import/src/main/java/de/sekmi/histream/etl/config/SQLSource.java +4 −3 Original line number Diff line number Diff line package de.sekmi.histream.etl.config; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import de.sekmi.histream.etl.RowSupplier; @XmlType(name="sql-query") public class SQLSource extends TableSource { @XmlElement String jdbcDriver; @XmlElement String connectString; @XmlElement String sql; String sqlSelect; private SQLSource() { } Loading @@ -21,7 +23,6 @@ public class SQLSource extends TableSource { } @Override public RowSupplier rows(Meta meta) { // TODO Auto-generated method stub return null; throw new UnsupportedOperationException("Not implemented yet"); } }
histream-import/src/main/scripts/schemagen.bat 0 → 100644 +3 −0 Original line number Diff line number Diff line @ECHO OFF mkdir target/generated-sources/schemagen "%JAVA_HOME%/bin/schemagen.exe" -d "target/generated-sources/schemagen" -cp "target/histream-import-${project.version}.jar;../histream-core/target/histream-core-${project.version}.jar" de.sekmi.histream.etl.config.DataSource