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 boolean
addInterval(Interval interval)
Adds an interval.boolean
addTimestamp(double timestamp)
Adds a timestamp.void
clearAttributes()
Clears all attribute values.Object
getAttribute(String key)
Gets the attribute for the given key.Object
getAttribute(String key, double timestamp)
Gets the attribute for the given key and timestamp.Object
getAttribute(String key, GraphView view)
Gets the attribute for the given key and graph view.Object
getAttribute(String key, Interval interval)
Gets the attribute for the given key and interval.Object
getAttribute(Column column)
Gets the attribute for the given column.Object
getAttribute(Column column, double timestamp)
Gets the attribute for the given column and timestamp.Object
getAttribute(Column column, GraphView view)
Gets the attribute for the given column and graph view.Object
getAttribute(Column column, Interval interval)
Gets the attribute for the given column and interval.ColumnIterable
getAttributeColumns()
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.Object
getId()
Returns the identifier.Interval[]
getIntervals()
Returns all the intervals this element belong to.String
getLabel()
Returns the label.int
getStoreId()
Returns the location of this element in the store.Table
getTable()
Returns the table the element is associated with.Interval
getTimeBounds()
Gets the time bounds.double[]
getTimestamps()
Returns all the timestamps this element belong to.boolean
hasInterval(Interval interval)
Returns true if this element has the given interval.boolean
hasTimestamp(double timestamp)
Returns true if this element has the given timestamp.Object
removeAttribute(String key)
Removes the attribute at the given key.Object
removeAttribute(String key, double timestamp)
Removes the attribute at the given key and timestamp.Object
removeAttribute(String key, Interval interval)
Removes the attribute at the given key and interval.Object
removeAttribute(Column column)
Removes the attribute at the given column.Object
removeAttribute(Column column, double timestamp)
Removes the attribute at the given column and timestamp.Object
removeAttribute(Column column, Interval interval)
Removes the attribute at the given column and interval.boolean
removeInterval(Interval interval)
Removes a interval.boolean
removeTimestamp(double timestamp)
Removes a timestamp.void
setAttribute(String key, Object value)
Sets the attribute with the given key and value.void
setAttribute(String key, Object value, double timestamp)
Sets the attribute at the given key and timestamp.void
setAttribute(String key, Object value, Interval interval)
Sets the attribute at the given key and interval.void
setAttribute(Column column, Object value)
Sets the attribute with the given column and value.void
setAttribute(Column column, Object value, double timestamp)
Sets the attribute at the given column and timestamp.void
setAttribute(Column column, Object value, Interval interval)
Sets the attribute at the given column and interval.void
setLabel(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
-
-