|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.importer.base.converter.rules.AbstractDirectedGraphConversionRule
public abstract class AbstractDirectedGraphConversionRule
Source and target nodes' conversion for two String
columns and one Direction
column.
Field Summary | |
---|---|
protected static int |
COLUMN_INDEX_UNDEFINED
Value which marks that column index is undefined. |
protected int |
columnAIndex
The index of the column holding the node A. |
protected int |
columnBIndex
The index of the column holding the node B. |
protected int |
directionColumnIndex
The index of the column holding the direction. |
Constructor Summary | |
---|---|
AbstractDirectedGraphConversionRule()
The default constructor. |
Method Summary | |
---|---|
protected void |
checkRowNullEmpty(DataRow row,
String nodeName)
|
void |
clear()
Clears the conversion rule's configuration. |
void |
clearDirectionColumnIndex()
Clears the direction column index. |
void |
clearNodeAColumnIndex()
Clears the node A column index. |
void |
clearNodeBColumnIndex()
Clears the node B column index. |
protected void |
copyFields(AbstractDirectedGraphConversionRule copy)
Copies all required fields of AbstractDirectedGraphConversionRule to the given instance of conversion
rule. |
int |
getColumnAIndex()
|
int |
getColumnBIndex()
|
int |
getDirectionColumnIndex()
|
protected DirectionDataType |
getDirectionValue(DataRow row)
|
String |
getFormat()
Retrieves the domain field format. |
String |
getSourceNode(DataRow row)
Returns source node. |
protected String |
getStringColumnValue(DataRow row,
int columnIdx)
|
String |
getTargetNode(DataRow row)
Returns target node. |
boolean |
isComplete()
Checks whether current conversion rule is fully configured - all necessary parameters are present and the the conversion process can be performed. |
void |
setColumnAIndex(int columnAIndex)
|
void |
setColumnBIndex(int columnBIndex)
|
void |
setDirectionColumnIndex(int directionColumnIndex)
|
void |
setFormat(String format)
Sets the domain field format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface pl.edu.agh.cast.importer.base.converter.rules.IConversionRule |
---|
createCopy |
Field Detail |
---|
protected static final int COLUMN_INDEX_UNDEFINED
protected int columnAIndex
protected int columnBIndex
protected int directionColumnIndex
Constructor Detail |
---|
public AbstractDirectedGraphConversionRule()
Method Detail |
---|
public void clear()
clear
in interface IConversionRule
IConversionRule.clear()
public boolean isComplete()
isComplete
in interface IConversionRule
IConversionRule.isComplete()
public String getSourceNode(DataRow row) throws ConversionRuleException, IllegalArgumentException
row
- input row
ConversionRuleException
IllegalArgumentException
public String getTargetNode(DataRow row) throws ConversionRuleException, IllegalArgumentException
row
- input row
ConversionRuleException
IllegalArgumentException
protected void copyFields(AbstractDirectedGraphConversionRule copy)
AbstractDirectedGraphConversionRule
to the given instance of conversion
rule.
copy
- a conversion rule instance which is to be copy of this rulepublic void clearNodeAColumnIndex()
public void clearNodeBColumnIndex()
public void clearDirectionColumnIndex()
protected DirectionDataType getDirectionValue(DataRow row) throws EmptyValueConversionRuleException, WrongValueConversionRuleException
EmptyValueConversionRuleException
WrongValueConversionRuleException
protected String getStringColumnValue(DataRow row, int columnIdx) throws EmptyValueConversionRuleException, WrongValueConversionRuleException
EmptyValueConversionRuleException
WrongValueConversionRuleException
protected void checkRowNullEmpty(DataRow row, String nodeName)
public void setFormat(String format)
setFormat
in interface IConversionRule
format
- the field formatIConversionRule.setFormat(java.lang.String)
public String getFormat()
getFormat
in interface IConversionRule
pl.edu.agh.cast.importer.base.converter.rules.IConversionRule#getFormats()
public int getColumnAIndex()
public void setColumnAIndex(int columnAIndex)
public int getColumnBIndex()
public void setColumnBIndex(int columnBIndex)
public int getDirectionColumnIndex()
public void setDirectionColumnIndex(int directionColumnIndex)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |