infovis.column
Class BasicEdgeColumn

java.lang.Object
  extended by infovis.utils.ChangeManager
      extended by infovis.column.AbstractColumn
          extended by infovis.column.ColumnProxy
              extended by infovis.column.BasicEdgeColumn
All Implemented Interfaces:
IntComparator, Column, Metadata, Constants, RowComparator, Serializable, EventListener, ChangeListener

public class BasicEdgeColumn
extends ColumnProxy

Column for graph edge table to access vertex attributes.

Version:
$Revision: 1.8 $
Author:
Jean-Daniel Fekete
See Also:
Serialized Form

Field Summary
 
Fields inherited from class infovis.column.AbstractColumn
MODIFIED_ALL, MODIFIED_NONE
 
Fields inherited from interface infovis.metadata.Constants
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE
 
Constructor Summary
BasicEdgeColumn(Graph graph, Column vertexColumn, boolean usingFirstVertex)
          Create an edge column that returns the value of its related vertex column, either from its firstVertex or secondVertex.
 
Method Summary
 int firstValidRow()
          Returns the first valid row (not undefined) of this column.
 String getValueAt(int index)
          Returns the String representation of the element at the specified position in this column or null if the element is undefined. The representation is generated by the current format.
 int getVertex(int edge)
          Returns the considered vertex.
 boolean isUsingFirstVertex()
          Returns true if the first vertex is considere, false if the second vertex is considered.
 boolean isValueUndefined(int row)
          Returns true if the ith value is undefined.
 RowIterator iterator()
          Returns a RowIterator over all the valid rows of this column.
 int lastValidRow()
          Returns the last valid row (not undefined) of this column.
 void setUsingFirstVertex(boolean usingFirstVertex)
          Sets the vertex considered.
 void setValueAt(int index, String element)
          Replaces the element at the specified position in this column with the element specified in its String representation or sets if undefined if the element is null It will be read and translated using the Format. A null value sets the value to undefined. The column is extended if needed.
 int size()
          Returns the number of elements in this column.
 
Methods inherited from class infovis.column.ColumnProxy
addValue, addValueOrNull, capacity, clear, compare, dispose, ensureCapacity, getClientProperty, getFormat, getMaxIndex, getMetadata, getMinIndex, getName, getValueClass, hasUndefinedValue, isEmpty, isInternal, setFormat, setName, setSize, setValueOrNullAt, setValueUndefined, stateChanged
 
Methods inherited from class infovis.column.AbstractColumn
addChangeListener, compareValues, computeValueMap, computeValueMap, equalObj, equals, getLastModifiedRow, toString
 
Methods inherited from class infovis.utils.ChangeManager
disableNotify, enableNotify, getModCount, removeChangeListener
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface infovis.Column
disableNotify, enableNotify, removeChangeListener
 

Constructor Detail

BasicEdgeColumn

public BasicEdgeColumn(Graph graph,
                       Column vertexColumn,
                       boolean usingFirstVertex)
Create an edge column that returns the value of its related vertex column, either from its firstVertex or secondVertex.

Parameters:
graph - the graph
vertexColumn - the associated vertex column
usingFirstVertex - true if the firstVertex is used, false if the secondVertex is used.
See Also:
infovis.graph, infovis.graph
Method Detail

getVertex

public int getVertex(int edge)
Returns the considered vertex.

Parameters:
edge - the edge
Returns:
the considered vertex.

size

public int size()
Returns the number of elements in this column.

Specified by:
size in interface Column
Overrides:
size in class ColumnProxy
Returns:
the number of elements in this column.

isValueUndefined

public boolean isValueUndefined(int row)
Returns true if the ith value is undefined.

Specified by:
isValueUndefined in interface Column
Specified by:
isValueUndefined in interface RowComparator
Overrides:
isValueUndefined in class ColumnProxy
Parameters:
row - the index
Returns:
true if the ith value is undefined.

getValueAt

public String getValueAt(int index)
Returns the String representation of the element at the specified position in this column or null if the element is undefined. The representation is generated by the current format.

Specified by:
getValueAt in interface Column
Overrides:
getValueAt in class ColumnProxy
Parameters:
index - index of element representation to return.
Returns:
the String representation of element at the specified position in this column or null if the element is undefined.

setValueAt

public void setValueAt(int index,
                       String element)
                throws ParseException
Replaces the element at the specified position in this column with the element specified in its String representation or sets if undefined if the element is null It will be read and translated using the Format. A null value sets the value to undefined. The column is extended if needed.

Specified by:
setValueAt in interface Column
Overrides:
setValueAt in class ColumnProxy
Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Throws:
ParseException - if the specified string cannot be parsed.

firstValidRow

public int firstValidRow()
Returns the first valid row (not undefined) of this column.

Returns:
the first valid row of this column.

lastValidRow

public int lastValidRow()
Returns the last valid row (not undefined) of this column.

Returns:
the last valid row of this column.

iterator

public RowIterator iterator()
Returns a RowIterator over all the valid rows of this column.

Specified by:
iterator in interface Column
Overrides:
iterator in class ColumnProxy
Returns:
a RowIterator over all the valid rows of this column.

isUsingFirstVertex

public boolean isUsingFirstVertex()
Returns true if the first vertex is considere, false if the second vertex is considered.

Returns:
true if the first vertex is considere, false if the second vertex is considered.

setUsingFirstVertex

public void setUsingFirstVertex(boolean usingFirstVertex)
Sets the vertex considered.

Parameters:
usingFirstVertex - true is should use first vertex


Copyright 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.