Package org.gephi.graph.api
Interface Element
-
- All Superinterfaces:
ElementProperties
public interface Element extends ElementProperties
An element is a node or an edge.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddInterval(Interval interval)Adds an interval.booleanaddTimestamp(double timestamp)Adds a timestamp.voidclearAttributes()Clears all attribute values.ObjectgetAttribute(String key)Gets the attribute for the given key.ObjectgetAttribute(String key, double timestamp)Gets the attribute for the given key and timestamp.ObjectgetAttribute(String key, GraphView view)Gets the attribute for the given key and graph view.ObjectgetAttribute(String key, Interval interval)Gets the attribute for the given key and interval.ObjectgetAttribute(Column column)Gets the attribute for the given column.ObjectgetAttribute(Column column, double timestamp)Gets the attribute for the given column and timestamp.ObjectgetAttribute(Column column, GraphView view)Gets the attribute for the given column and graph view.ObjectgetAttribute(Column column, Interval interval)Gets the attribute for the given column and interval.ColumnIterablegetAttributeColumns()Returns the columns.Set<String>getAttributeKeys()Returns the column identifier keys.Object[]getAttributes()Returns all the attribute values in an array.Iterable<Map.Entry>getAttributes(Column column)Returns an iterable over all the keys and values over time for the given (dynamic) column.ObjectgetId()Returns the identifier.Interval[]getIntervals()Returns all the intervals this element belong to.StringgetLabel()Returns the label.intgetStoreId()Returns the location of this element in the store.TablegetTable()Returns the table the element is associated with.IntervalgetTimeBounds()Gets the time bounds.double[]getTimestamps()Returns all the timestamps this element belong to.booleanhasInterval(Interval interval)Returns true if this element has the given interval.booleanhasTimestamp(double timestamp)Returns true if this element has the given timestamp.ObjectremoveAttribute(String key)Removes the attribute at the given key.ObjectremoveAttribute(String key, double timestamp)Removes the attribute at the given key and timestamp.ObjectremoveAttribute(String key, Interval interval)Removes the attribute at the given key and interval.ObjectremoveAttribute(Column column)Removes the attribute at the given column.ObjectremoveAttribute(Column column, double timestamp)Removes the attribute at the given column and timestamp.ObjectremoveAttribute(Column column, Interval interval)Removes the attribute at the given column and interval.booleanremoveInterval(Interval interval)Removes a interval.booleanremoveTimestamp(double timestamp)Removes a timestamp.voidsetAttribute(String key, Object value)Sets the attribute with the given key and value.voidsetAttribute(String key, Object value, double timestamp)Sets the attribute at the given key and timestamp.voidsetAttribute(String key, Object value, Interval interval)Sets the attribute at the given key and interval.voidsetAttribute(Column column, Object value)Sets the attribute with the given column and value.voidsetAttribute(Column column, Object value, double timestamp)Sets the attribute at the given column and timestamp.voidsetAttribute(Column column, Object value, Interval interval)Sets the attribute at the given column and interval.voidsetLabel(String label)Sets the label.
-
-
-
Method Detail
-
getId
Object getId()
Returns the identifier.- Returns:
- identifier
-
getLabel
String getLabel()
Returns the label.- Returns:
- label
-
getAttribute
Object getAttribute(String key)
Gets the attribute for the given key.- Parameters:
key- column's key- Returns:
- attribute value, or null
-
getAttribute
Object getAttribute(Column column)
Gets the attribute for the given column.- Parameters:
column- column- Returns:
- attribute value, or null
-
getAttribute
Object getAttribute(String key, double timestamp)
Gets the attribute for the given key and timestamp.- Parameters:
key- column's keytimestamp- timestamp- Returns:
- attribute value, or null
-
getAttribute
Object getAttribute(Column column, double timestamp)
Gets the attribute for the given column and timestamp.- Parameters:
column- columntimestamp- timestamp- Returns:
- attribute value, or null
-
getAttribute
Object getAttribute(String key, Interval interval)
Gets the attribute for the given key and interval.- Parameters:
key- column's keyinterval- interval- Returns:
- attribute value, or null
-
getAttribute
Object getAttribute(Column column, Interval interval)
Gets the attribute for the given column and interval.- Parameters:
column- columninterval- interval- Returns:
- attribute value, or null
-
getAttribute
Object getAttribute(String key, GraphView view)
Gets the attribute for the given key and graph view.- Parameters:
key- column's keyview- graph view- Returns:
- attribute value, or null
-
getAttribute
Object getAttribute(Column column, GraphView view)
Gets the attribute for the given column and graph view.- Parameters:
column- columnview- graph view- Returns:
- attribute value, or null
-
getAttributes
Iterable<Map.Entry> getAttributes(Column column)
Returns an iterable over all the keys and values over time for the given (dynamic) column.- Parameters:
column- column- Returns:
- time attribute iterable
-
getAttributes
Object[] getAttributes()
Returns all the attribute values in an array.Some attribute values may be null.
- Returns:
- attribute values array
-
getAttributeKeys
Set<String> getAttributeKeys()
Returns the column identifier keys.- Returns:
- attribute keys
-
getAttributeColumns
ColumnIterable getAttributeColumns()
Returns the columns.- Returns:
- attribute columns
-
getStoreId
int getStoreId()
Returns the location of this element in the store.- Returns:
- store id
-
removeAttribute
Object removeAttribute(String key)
Removes the attribute at the given key.- Parameters:
key- key- Returns:
- value being removed, or null
-
removeAttribute
Object removeAttribute(Column column)
Removes the attribute at the given column.- Parameters:
column- column- Returns:
- value being removed, or null
-
removeAttribute
Object removeAttribute(String key, double timestamp)
Removes the attribute at the given key and timestamp.- Parameters:
key- keytimestamp- double timestamp- Returns:
- value being removed, or null
-
removeAttribute
Object removeAttribute(Column column, double timestamp)
Removes the attribute at the given column and timestamp.- Parameters:
column- columntimestamp- timestamp- Returns:
- value being removed, or null
-
removeAttribute
Object removeAttribute(String key, Interval interval)
Removes the attribute at the given key and interval.- Parameters:
key- keyinterval- interval- Returns:
- value being removed, or null
-
removeAttribute
Object removeAttribute(Column column, Interval interval)
Removes the attribute at the given column and interval.- Parameters:
column- columninterval- interval- Returns:
- value being removed, or null
-
setLabel
void setLabel(String label)
Sets the label.- Parameters:
label- label
-
setAttribute
void setAttribute(String key, Object value)
Sets the attribute with the given key and value.- Parameters:
key- column's keyvalue- value to set
-
setAttribute
void setAttribute(Column column, Object value)
Sets the attribute with the given column and value.- Parameters:
column- columnvalue- value to set
-
setAttribute
void setAttribute(String key, Object value, double timestamp)
Sets the attribute at the given key and timestamp.- Parameters:
key- column's keyvalue- value to settimestamp- timestamp
-
setAttribute
void setAttribute(Column column, Object value, double timestamp)
Sets the attribute at the given column and timestamp.- Parameters:
column- columnvalue- value to settimestamp- timestamp
-
setAttribute
void setAttribute(String key, Object value, Interval interval)
Sets the attribute at the given key and interval.- Parameters:
key- column's keyvalue- value to setinterval- interval
-
setAttribute
void setAttribute(Column column, Object value, Interval interval)
Sets the attribute at the given column and interval.- Parameters:
column- columnvalue- value to setinterval- interval
-
addTimestamp
boolean addTimestamp(double timestamp)
Adds a timestamp.- Parameters:
timestamp- timestamp to add- Returns:
- true if the timestamp has been added, false if it existed already
-
removeTimestamp
boolean removeTimestamp(double timestamp)
Removes a timestamp.- Parameters:
timestamp- timestamp to remove- Returns:
- true if the timestamp has been removed, false if it didn't exist
-
hasTimestamp
boolean hasTimestamp(double timestamp)
Returns true if this element has the given timestamp.- Parameters:
timestamp- timestamp- Returns:
- true if this element has the timestamp, false otherwise
-
getTimestamps
double[] getTimestamps()
Returns all the timestamps this element belong to.- Returns:
- timestamp array
-
addInterval
boolean addInterval(Interval interval)
Adds an interval.- Parameters:
interval- interval to add- Returns:
- true if the interval has been added, false if it existed already
-
removeInterval
boolean removeInterval(Interval interval)
Removes a interval.- Parameters:
interval- interval to remove- Returns:
- true if the interval has been removed, false if it didn't exist
-
hasInterval
boolean hasInterval(Interval interval)
Returns true if this element has the given interval.- Parameters:
interval- interval- Returns:
- true if this element has the interval, false otherwise
-
getIntervals
Interval[] getIntervals()
Returns all the intervals this element belong to.- Returns:
- interval array
-
getTimeBounds
Interval getTimeBounds()
Gets the time bounds.The time bounds is an interval made of the minimum and maximum time observed in this element.
- Returns:
- time bounds
-
clearAttributes
void clearAttributes()
Clears all attribute values.
-
getTable
Table getTable()
Returns the table the element is associated with.- Returns:
- table
-
-