thinkmap.datasource.flatfile2
Class FFEdgeEntityModel

java.lang.Object
  extended by thinkmap.datasource.relational.EntityModel
      extended by thinkmap.datasource.relational.EdgeEntityModel
          extended by thinkmap.datasource.flatfile2.FFEdgeEntityModel
All Implemented Interfaces:
Serializable

public class FFEdgeEntityModel
extends EdgeEntityModel

A flat file edge.

See Also:
Serialized Form

Field Summary
protected  char delim
           
protected  boolean delimSet
           
protected  FlatFileDataSource ds
           
protected  String encoding
           
protected  char escape
           
protected  char quotechar
           
protected static long serialVersionUID
           
protected  int skipRows
           
protected  String[] typeChain
           
 
Fields inherited from class thinkmap.datasource.relational.EntityModel
cacheFlag, models
 
Constructor Summary
FFEdgeEntityModel(FlatFileDataSource ds)
           
 
Method Summary
<T> ColumnModel<T>
createColumn()
           
 boolean equals(Object model)
           
 char getDelimiter()
          Returns the delimiter for this entity model.
 String getEncoding()
          Returns the encoding of this entity model
 char getEscapeChar()
          Returns the character used to escape character
 char getQuoteChar()
          Returns the character that denotes a quote
 int getSkipRows()
          Returns the number of rows to be skipped in this entity model
 boolean parseEntityId(String searchString, IEntityHandler callback)
           
 void setDelimiter(char c)
          Set the delimiter character for this file.
 void setEncoding(String s)
          Sets the encoding to use when reading the file.
 void setEscapeChar(char escape)
          Set's the character used for escaping special characters like quotes.
 void setQuoteChar(char quotechar)
          Set's the quote character.
 void setSkipRows(int i)
          Set to the number of rows to skip at the top of the file.
 
Methods inherited from class thinkmap.datasource.relational.EdgeEntityModel
getFrom, getTo, isBidirectional, setBidirectional, setFrom, setTo
 
Methods inherited from class thinkmap.datasource.relational.EntityModel
addColumn, getColumnModel, getColumnModels, getColumns, getMaxResults, getName, getParent, getTable, indexOf, outputMetadata, setMaxResults, setName, setParent, setTable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeChain

protected String[] typeChain

encoding

protected String encoding

delim

protected char delim

delimSet

protected boolean delimSet

skipRows

protected int skipRows

quotechar

protected char quotechar

escape

protected char escape

ds

protected transient FlatFileDataSource ds

serialVersionUID

protected static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

FFEdgeEntityModel

public FFEdgeEntityModel(FlatFileDataSource ds)
Method Detail

setEncoding

public void setEncoding(String s)
Sets the encoding to use when reading the file. (e.g. UTF8) The default is the platform's default character encoding.

Parameters:
the - encoding to use when reading the file.

setSkipRows

public void setSkipRows(int i)
Set to the number of rows to skip at the top of the file.

Parameters:
b - first row column name flag

setDelimiter

public void setDelimiter(char c)
Set the delimiter character for this file. The default is a tab except when the file ends in csv, where a comma is used as a delimiter.

Parameters:
c - the delimiter character

setQuoteChar

public void setQuoteChar(char quotechar)
Set's the quote character. The default is the standard quote.

Parameters:
quotechar -

setEscapeChar

public void setEscapeChar(char escape)
Set's the character used for escaping special characters like quotes. The default is backslash \

Parameters:
escape -

getSkipRows

public int getSkipRows()
Returns the number of rows to be skipped in this entity model

Returns:

getDelimiter

public char getDelimiter()
Returns the delimiter for this entity model.

Returns:

createColumn

public <T> ColumnModel<T> createColumn()
Overrides:
createColumn in class EdgeEntityModel

getEncoding

public String getEncoding()
Returns the encoding of this entity model

Returns:

getEscapeChar

public char getEscapeChar()
Returns the character used to escape character

Returns:

getQuoteChar

public char getQuoteChar()
Returns the character that denotes a quote

Returns:

parseEntityId

public boolean parseEntityId(String searchString,
                             IEntityHandler callback)
Overrides:
parseEntityId in class EntityModel

equals

public boolean equals(Object model)
Overrides:
equals in class Object


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.