|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derbyDemo.vtis.core.VTITemplate
org.apache.derbyDemo.vtis.core.StringColumnVTI
org.apache.derbyDemo.vtis.core.FlatFileVTI
org.apache.derbyDemo.vtis.example.SubversionLogVTI
public class SubversionLogVTI
This VTI makes a table out of the output of the subversion log ("svn log") command.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.derbyDemo.vtis.core.StringColumnVTI |
|---|
StringColumnVTI.SimpleBlob, StringColumnVTI.SimpleClob |
| Field Summary | |
|---|---|
private java.text.SimpleDateFormat |
_dateFormatter
|
private static java.lang.String[] |
COLUMN_NAMES
|
private static int |
COMMIT_TIME
|
private static int |
COMMITTER
|
private static int |
DESCRIPTION
|
private static int |
LINE_COUNT
|
private static java.lang.String |
RECORD_HEADER
|
private static int |
XID
|
| Fields inherited from interface java.sql.ResultSet |
|---|
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE |
| Constructor Summary | |
|---|---|
SubversionLogVTI(java.lang.String logFileName)
Build a SubversionLogVTI given the name of the output file created by the "svn log" command. |
|
| Method Summary | |
|---|---|
private java.text.SimpleDateFormat |
getDateFormatter()
Subversion formats timestamps thusly: "2007-09-16 11:17:37 -0700 (Sun, 16 Sep 2007)" |
java.sql.Timestamp |
getTimestamp(int columnIndex)
Subversion formats timestamps thusly: "2007-09-16 11:17:37 -0700 (Sun, 16 Sep 2007)" |
private boolean |
isRecordHeader(java.lang.String line)
Returns true if a line is a record header. |
protected java.lang.String[] |
parseRow()
Parse the next chunk of text, using readLine(), and return the next row. |
private java.lang.String |
readField(java.lang.String mainline,
int[] oldIdx)
Read the next field in the main line of the record. |
private java.lang.String |
readNextLine()
Read a line, possibly just using the last line that was pushed back. |
static java.sql.ResultSet |
subversionLogVTI(java.lang.String logFileName)
This is the method which is registered as a table function. |
| Methods inherited from class org.apache.derbyDemo.vtis.core.FlatFileVTI |
|---|
close, getLineNumber, getMetaData, getRawColumn, getTextFileName, next, readLine, wrap, wrap |
| Methods inherited from class org.apache.derbyDemo.vtis.core.StringColumnVTI |
|---|
findColumn, getAsciiStream, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getClob, getColumnNames, getDate, getDouble, getFloat, getInt, getLong, getShort, getString, getTime, setWasNull, wasNull |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.ResultSet |
|---|
getHoldability, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getRowId, getRowId, getSQLXML, getSQLXML, isClosed, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateRowId, updateRowId, updateSQLXML, updateSQLXML |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Field Detail |
|---|
private static final java.lang.String[] COLUMN_NAMES
private static final int XID
private static final int COMMITTER
private static final int COMMIT_TIME
private static final int LINE_COUNT
private static final int DESCRIPTION
private static final java.lang.String RECORD_HEADER
private java.text.SimpleDateFormat _dateFormatter
| Constructor Detail |
|---|
public SubversionLogVTI(java.lang.String logFileName)
Build a SubversionLogVTI given the name of the output file created by the "svn log" command.
| Method Detail |
|---|
public static java.sql.ResultSet subversionLogVTI(java.lang.String logFileName)
throws java.sql.SQLException
This is the method which is registered as a table function.
java.sql.SQLException
protected java.lang.String[] parseRow()
throws java.sql.SQLException
Parse the next chunk of text, using readLine(), and return the next row. Returns null if the file is exhausted.
parseRow in class FlatFileVTIjava.sql.SQLException
public java.sql.Timestamp getTimestamp(int columnIndex)
throws java.sql.SQLException
Subversion formats timestamps thusly: "2007-09-16 11:17:37 -0700 (Sun, 16 Sep 2007)"
getTimestamp in interface java.sql.ResultSetgetTimestamp in class StringColumnVTIjava.sql.SQLException - on unexpected JDBC errorResultSet
private java.lang.String readField(java.lang.String mainline,
int[] oldIdx)
throws java.sql.SQLException
Read the next field in the main line of the record. Fields are delimited by | or line-end.
java.sql.SQLExceptionprivate boolean isRecordHeader(java.lang.String line)
Returns true if a line is a record header.
private java.lang.String readNextLine()
throws java.sql.SQLException
Read a line, possibly just using the last line that was pushed back.
java.sql.SQLExceptionprivate java.text.SimpleDateFormat getDateFormatter()
Subversion formats timestamps thusly: "2007-09-16 11:17:37 -0700 (Sun, 16 Sep 2007)"
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||