Package com.gengoai.hermes
Class RelationEdge
- java.lang.Object
-
- com.gengoai.graph.Edge<Annotation>
-
- com.gengoai.hermes.RelationEdge
-
- All Implemented Interfaces:
Serializable
public class RelationEdge extends Edge<Annotation>
A specialized annotation graph edge that stores relation type and value.- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RelationEdge(@NonNull Annotation source, @NonNull Annotation target)
Instantiates a new Relation edge.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RelationEdge
from(@NonNull Annotation source, @NonNull Relation relation)
boolean
isDirected()
String
toString()
-
Methods inherited from class com.gengoai.graph.Edge
directedEdge, directedEdge, getFirstVertex, getOppositeVertex, getSecondVertex, getWeight, isWeighted, setWeight, undirectedEdge, undirectedEdge
-
-
-
-
Constructor Detail
-
RelationEdge
public RelationEdge(@NonNull @NonNull Annotation source, @NonNull @NonNull Annotation target)
Instantiates a new Relation edge.- Parameters:
source
- the source vertextarget
- the target vertex
-
-
Method Detail
-
from
public static RelationEdge from(@NonNull @NonNull Annotation source, @NonNull @NonNull Relation relation)
-
isDirected
public boolean isDirected()
- Specified by:
isDirected
in classEdge<Annotation>
-
-