Package dev.roanh.gmark.lang.generic
Class GenericEdge
java.lang.Object
dev.roanh.gmark.lang.generic.GenericEdge
- All Implemented Interfaces:
QueryFragment
,OutputFormal
,OutputSQL
,OutputXML
public abstract class GenericEdge
extends Object
implements OutputSQL, OutputFormal, OutputXML, QueryFragment
Simple query action of traversing an edge with
a single label from either source to target or
in inverse direction from target to source.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
GenericEdge
(Predicate symbol) Constructs a new generic edge with the given label to traverse. -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()
Gets the label (symbol) for this edge.The top level operation represented by this query fragment.Converts this query fragment to an equivalent abstract syntax tree.Converts this object to its formal logic form.toString()
void
writeSQL
(IndentWriter writer) Writes the SQL representation of this object to the given writer.void
writeXML
(IndentWriter writer) Writes this object as XML to the given writer.
-
Field Details
-
symbol
The label traversed by this query.
-
-
Constructor Details
-
GenericEdge
Constructs a new generic edge with the given label to traverse.- Parameters:
symbol
- The label to traverse.
-
-
Method Details
-
getLabel
Gets the label (symbol) for this edge.- Returns:
- The label for this edge.
-
toFormalSyntax
Description copied from interface:OutputFormal
Converts this object to its formal logic form.- Specified by:
toFormalSyntax
in interfaceOutputFormal
- Returns:
- The formal representation of this object.
-
toString
-
writeSQL
Description copied from interface:OutputSQL
Writes the SQL representation of this object to the given writer. -
writeXML
Description copied from interface:OutputXML
Writes this object as XML to the given writer. -
getOperationType
Description copied from interface:QueryFragment
The top level operation represented by this query fragment.- Specified by:
getOperationType
in interfaceQueryFragment
- Returns:
- The top level operation for this query fragment.
-
toAbstractSyntaxTree
Description copied from interface:QueryFragment
Converts this query fragment to an equivalent abstract syntax tree.- Specified by:
toAbstractSyntaxTree
in interfaceQueryFragment
- Returns:
- The constructed Abstract Syntax Tree (AST).
-