Package org.gephi.io.importer.api
Interface EdgeDraft
-
- All Superinterfaces:
ElementDraft
public interface EdgeDraft extends ElementDraft
Draft edge, hosted by import containers to represent edges found when importing.Processors
decide if this edge will finally be appended to the graph or not.- Author:
- Mathieu Bastian
- See Also:
ContainerLoader
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gephi.io.importer.api.ElementDraft
ElementDraft.Factory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EdgeDirection
getDirection()
Returns this edge's direction setting.NodeDraft
getSource()
Get edge's source.NodeDraft
getTarget()
Get edge's target.Object
getType()
Gets this edge's type.double
getWeight()
Returns this edge's weight.boolean
isSelfLoop()
Returns true if this edge is a self-loop.void
setDirection(EdgeDirection direction)
Sets this edge's direction setting.void
setSource(NodeDraft nodeSource)
Sets this edge's source.void
setTarget(NodeDraft nodeTarget)
Sets this edge's target.void
setType(Object type)
Sets this edge's type.void
setWeight(double weight)
Sets this edge's weight.-
Methods inherited from interface org.gephi.io.importer.api.ElementDraft
addInterval, addInterval, addIntervals, addTimestamp, addTimestamp, addTimestamps, getColor, getColumns, getGraphInterval, getGraphTimestamp, getId, getLabel, getLabelColor, getLabelSize, getTimeSet, getValue, isLabelVisible, parseAndSetValue, parseAndSetValue, parseAndSetValue, parseAndSetValue, parseAndSetValue, setColor, setColor, setColor, setColor, setColor, setLabel, setLabelColor, setLabelColor, setLabelColor, setLabelColor, setLabelColor, setLabelSize, setLabelVisible, setValue, setValue, setValue, setValue, setValue
-
-
-
-
Method Detail
-
getWeight
double getWeight()
Returns this edge's weight.- Returns:
- edge's weight
-
setWeight
void setWeight(double weight)
Sets this edge's weight.Default is 1.0.
- Parameters:
weight
- edge's weight
-
getType
Object getType()
Gets this edge's type.Edges can have different types but by default all edges have a default, null type. In other words, setting a type is optional.
- Returns:
- edge's type or null if unset
-
setType
void setType(Object type)
Sets this edge's type.Edges can have different types but by default all edges have a default, null type. In other words, setting a type is optional.
- Parameters:
type
- edge type
-
getDirection
EdgeDirection getDirection()
Returns this edge's direction setting.- Returns:
- edge's direction or null if unset
-
setDirection
void setDirection(EdgeDirection direction)
Sets this edge's direction setting.- Parameters:
direction
- edge's direction
-
getSource
NodeDraft getSource()
Get edge's source.- Returns:
- edge's source or null if unset
-
setSource
void setSource(NodeDraft nodeSource)
Sets this edge's source.- Parameters:
nodeSource
- node source
-
getTarget
NodeDraft getTarget()
Get edge's target.- Returns:
- edge's target or null if unset
-
setTarget
void setTarget(NodeDraft nodeTarget)
Sets this edge's target.Self-loops should simply set both source and target with the same node.
- Parameters:
nodeTarget
- node target
-
isSelfLoop
boolean isSelfLoop()
Returns true if this edge is a self-loop.It returns false if the source or target is null.
- Returns:
- true if self-loop, false otherwise
-
-