The following document contains the results of Rat (Release Audit Tool).
*****************************************************
Summary
-------
Generated at: 2017-03-12T00:16:11-05:00
Notes: 0
Binaries: 0
Archives: 0
Standards: 2
Apache Licensed: 0
Generated Documents: 0
JavaDocs are generated, thus a license header is optional.
Generated files do not require license headers.
2 Unknown Licenses
*****************************************************
Files with unapproved licenses:
C:/projects/fgsms/fgsms-samples/fgsms.ExportDataFromDatabase/pom.xml
C:/projects/fgsms/fgsms-samples/fgsms.ExportDataFromDatabase/src/main/java/org/miloss/fgsms/examples/export/ExportDataFromDatabase.java
*****************************************************
*****************************************************
Files with Apache License headers will be marked AL
Binary files (which do not require any license headers) will be marked B
Compressed archives will be marked A
Notices, licenses etc. will be marked N
!????? C:/projects/fgsms/fgsms-samples/fgsms.ExportDataFromDatabase/pom.xml
!????? C:/projects/fgsms/fgsms-samples/fgsms.ExportDataFromDatabase/src/main/java/org/miloss/fgsms/examples/export/ExportDataFromDatabase.java
*****************************************************
Printing headers for text files without a valid license header...
=====================================================
== File: C:/projects/fgsms/fgsms-samples/fgsms.ExportDataFromDatabase/pom.xml
=====================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
U.S. Government, Department of the Army
Army Materiel Command
Research Development Engineering Command
Communications Electronics Research Development and Engineering Center
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mil-oss</groupId>
<artifactId>fgsms-samples</artifactId>
<version>7.0.0</version>
</parent>
<artifactId>fgsms.ExportDataFromDatabase</artifactId>
<packaging>jar</packaging>
<name>fgsms Sample - Export data from database direct</name>
<description>Exports from the database via direct access</description>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.mil-oss</groupId>
<artifactId>fgsms-common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
=====================================================
== File: C:/projects/fgsms/fgsms-samples/fgsms.ExportDataFromDatabase/src/main/java/org/miloss/fgsms/examples/export/ExportDataFromDatabase.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.examples.export;
import java.io.FileOutputStream;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import org.miloss.fgsms.common.Constants;
import org.miloss.fgsms.common.Utility;
public class ExportDataFromDatabase {
public static void main(String[] args) throws Exception {
if (args.length == 0) {
PrintUsage();
return;
}
long maxrecords = Long.parseLong(args[1]);
FileOutputStream fos = new FileOutputStream(args[2]);
String username = getString("Username", "fgsms");
String password = getStringPw();
String url = getString("URL", "jdbc:postgresql://localhost:5432/fgsms_performance");
Connection con = getConnection(url, username, password);
if (args[0].equalsIgnoreCase("transactions")) {
PreparedStatement cmd = con.prepareStatement("select * from rawdata limit ?");
cmd.setLong(1, maxrecords);
ResultSet rs = cmd.executeQuery();
while (rs.next()) {