Class NodeExprNormalizer
- java.lang.Object
-
- fr.mines_stetienne.ci.sparql_generate.normalizer.xexpr.NodeExprNormalizer
-
- All Implemented Interfaces:
SPARQLExtNodeVisitor
,NodeVisitor
public class NodeExprNormalizer extends Object implements SPARQLExtNodeVisitor
Class used to normalize nodes, i.e., take as input a node (potentially an expression node), and output a normalized node and potentially a binding clause.- Author:
- Maxime Lefrançois
-
-
Constructor Summary
Constructors Constructor Description NodeExprNormalizer()
Constructor, with empty initial bindings.NodeExprNormalizer(List<Element> bindings)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<? extends Element>
getBindings()
ElementGroup
getBindingsAsGroup()
Node
getResult()
boolean
hasBindings()
Object
visit(Node_Expr node)
{@inheritDocObject
visit(Node_ExtendedLiteral node)
{@inheritDocObject
visit(Node_ExtendedURI node)
{@inheritDocObject
visit(Node_List node)
{@inheritDocObject
visit(Node_Template node)
Object
visitAny(Node_ANY it)
{@inheritDocObject
visitBlank(Node_Blank it, BlankNodeId id)
{@inheritDocObject
visitGraph(Node_Graph it, Graph graph)
Object
visitLiteral(Node_Literal it, LiteralLabel lit)
{@inheritDocObject
visitTriple(Node_Triple it, Triple triple)
Object
visitURI(Node_URI it, String uri)
{@inheritDocObject
visitVariable(Node_Variable it, String name)
{@inheritDoc
-
-
-
Method Detail
-
hasBindings
public boolean hasBindings()
- Returns:
- true if the list of bindings is not empty.
-
getBindingsAsGroup
public ElementGroup getBindingsAsGroup()
- Returns:
- an ElementGroup with the list of binding elements.
-
getResult
public Node getResult()
- Returns:
- the latest normalized node
-
visit
public Object visit(Node_List node)
{@inheritDoc- Specified by:
visit
in interfaceSPARQLExtNodeVisitor
-
visit
public Object visit(Node_Expr node)
{@inheritDoc- Specified by:
visit
in interfaceSPARQLExtNodeVisitor
-
visit
public Object visit(Node_ExtendedLiteral node)
{@inheritDoc- Specified by:
visit
in interfaceSPARQLExtNodeVisitor
-
visit
public Object visit(Node_ExtendedURI node)
{@inheritDoc- Specified by:
visit
in interfaceSPARQLExtNodeVisitor
-
visit
public Object visit(Node_Template node)
- Specified by:
visit
in interfaceSPARQLExtNodeVisitor
-
visitAny
public Object visitAny(Node_ANY it)
{@inheritDoc- Specified by:
visitAny
in interfaceNodeVisitor
-
visitBlank
public Object visitBlank(Node_Blank it, BlankNodeId id)
{@inheritDoc- Specified by:
visitBlank
in interfaceNodeVisitor
-
visitLiteral
public Object visitLiteral(Node_Literal it, LiteralLabel lit)
{@inheritDoc- Specified by:
visitLiteral
in interfaceNodeVisitor
-
visitURI
public Object visitURI(Node_URI it, String uri)
{@inheritDoc- Specified by:
visitURI
in interfaceNodeVisitor
-
visitVariable
public Object visitVariable(Node_Variable it, String name)
{@inheritDoc- Specified by:
visitVariable
in interfaceNodeVisitor
-
visitTriple
public Object visitTriple(Node_Triple it, Triple triple)
- Specified by:
visitTriple
in interfaceNodeVisitor
-
visitGraph
public Object visitGraph(Node_Graph it, Graph graph)
- Specified by:
visitGraph
in interfaceNodeVisitor
-
-