org.eclipse.rdf4j.query.algebra

## Class AbstractQueryModelNode

- java.lang.Object
- - org.eclipse.rdf4j.query.algebra.AbstractQueryModelNode

- All Implemented Interfaces:
    Serializable, Cloneable, GraphPatternGroupable, QueryModelNode
  Direct Known Subclasses:
    AbstractNaryOperator, Add, ArbitraryLengthPath, BinaryTupleOperator, BinaryValueOperator, BindingSetAssignment, BNodeGenerator, Bound, Clear, Copy, Create, DeleteData, EmptySet, ExtensionElem, ExternalSet, FunctionCall, GroupElem, If, InsertData, Load, Modify, Move, NAryValueOperator, OrderElem, ProjectionElem, ProjectionElemList, QueryModelNodeBase, SingletonSet, StatementPattern, SubQueryValueOperator, UnaryTupleOperator, UnaryValueOperator, ValueConstant, Var, ZeroLengthPath

      public abstract class AbstractQueryModelNode
      extends Object
      implements QueryModelNode, GraphPatternGroupable

  Base implementation of `QueryModelNode`.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractQueryModelNode()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AbstractQueryModelNode` | `clone()` Returns a (deep) clone of this query model node.
    `QueryModelNode` | `getParentNode()` Gets the node's parent.
    `String` | `getSignature()` Default implementation of `QueryModelNode.getSignature()` that prints the name of the node's class.
    `boolean` | `isGraphPatternGroup()` indicates if the node represents the root of a graph pattern group.
    `protected boolean` | `nullEquals(Object o1, Object o2)`
    `void` | `replaceChildNode(QueryModelNode current, QueryModelNode replacement)` Default implementation of `QueryModelNode.replaceChildNode(QueryModelNode, QueryModelNode)` that throws an `IllegalArgumentException` indicating that `current` is not a child node of this node.
    `protected <T extends QueryModelNode> boolean` | `replaceNodeInList(List<T> list, QueryModelNode current, QueryModelNode replacement)`
    `void` | `replaceWith(QueryModelNode replacement)` Default implementation of `QueryModelNode.replaceWith(QueryModelNode)` that throws an `IllegalArgumentException` indicating that `current` is not a child node of this node.
    `void` | `setGraphPatternGroup(boolean isGraphPatternGroup)` Set the value of `GraphPatternGroupable.isGraphPatternGroup()` to true or false.
    `void` | `setParentNode(QueryModelNode parent)` Sets the node's parent.
    `String` | `toString()` Returns an indented print of the node tree, starting from this node.
    `<X extends Exception> void` | `visitChildren(QueryModelVisitor<X> visitor)` Dummy implementation of `QueryModelNode.visitChildren(org.eclipse.rdf4j.query.algebra.QueryModelVisitor<X>)` that does nothing.

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.rdf4j.query.algebra.QueryModelNode

      `equals, visit`

- - ### Constructor Detail

    - #### AbstractQueryModelNode

          public AbstractQueryModelNode()

  - ### Method Detail

    - #### getParentNode

          public QueryModelNode getParentNode()

      Description copied from interface: `QueryModelNode`
      Gets the node's parent.
      Specified by:
        `getParentNode` in interface `QueryModelNode`
      Returns:
        The parent node, if any.

    - #### setParentNode

          public void setParentNode(QueryModelNode parent)

      Description copied from interface: `QueryModelNode`
      Sets the node's parent.
      Specified by:
        `setParentNode` in interface `QueryModelNode`
      Parameters:
        `parent` - The parent node for this node.

    - #### isGraphPatternGroup

          public boolean isGraphPatternGroup()

      Description copied from interface: `GraphPatternGroupable`
      indicates if the node represents the root of a graph pattern group.
      Specified by:
        `isGraphPatternGroup` in interface `GraphPatternGroupable`
      Returns:
        true iff the node represents the node of a graph pattern group.

    - #### setGraphPatternGroup

          public void setGraphPatternGroup(boolean isGraphPatternGroup)

      Description copied from interface: `GraphPatternGroupable`
      Set the value of `GraphPatternGroupable.isGraphPatternGroup()` to true or false.
      Specified by:
        `setGraphPatternGroup` in interface `GraphPatternGroupable`

    - #### visitChildren

          public <X extends Exception> void visitChildren(QueryModelVisitor<X> visitor)
                                                   throws X extends Exception

      Dummy implementation of `QueryModelNode.visitChildren(org.eclipse.rdf4j.query.algebra.QueryModelVisitor<X>)` that does nothing. Subclasses should override this method when they have child nodes.
      Specified by:
        `visitChildren` in interface `QueryModelNode`
      Throws:
        `X extends Exception`

    - #### replaceChildNode

          public void replaceChildNode(QueryModelNode current,
                                       QueryModelNode replacement)

      Default implementation of `QueryModelNode.replaceChildNode(QueryModelNode, QueryModelNode)` that throws an `IllegalArgumentException` indicating that `current` is not a child node of this node.
      Specified by:
        `replaceChildNode` in interface `QueryModelNode`
      Parameters:
        `current` - The current child node.
        `replacement` - The new child node.

    - #### replaceWith

          public void replaceWith(QueryModelNode replacement)

      Default implementation of `QueryModelNode.replaceWith(QueryModelNode)` that throws an `IllegalArgumentException` indicating that `current` is not a child node of this node.
      Specified by:
        `replaceWith` in interface `QueryModelNode`
      Parameters:
        `replacement` - The new node.

    - #### getSignature

          public String getSignature()

      Default implementation of `QueryModelNode.getSignature()` that prints the name of the node's class.
      Specified by:
        `getSignature` in interface `QueryModelNode`
      Returns:
        The node's signature, e.g. `SLICE (offset=10, limit=10)`.

    - #### toString

          public String toString()

      Description copied from interface: `QueryModelNode`
      Returns an indented print of the node tree, starting from this node.
      Specified by:
        `toString` in interface `QueryModelNode`
      Overrides:
        `toString` in class `Object`

    - #### clone

          public AbstractQueryModelNode clone()

      Description copied from interface: `QueryModelNode`
      Returns a (deep) clone of this query model node. This method recursively clones the entire node tree, starting from this nodes.
      Specified by:
        `clone` in interface `QueryModelNode`
      Overrides:
        `clone` in class `Object`
      Returns:
        A deep clone of this query model node.

    - #### replaceNodeInList

          protected <T extends QueryModelNode> boolean replaceNodeInList(List<T> list,
                                                                         QueryModelNode current,
                                                                         QueryModelNode replacement)

    - #### nullEquals

          protected boolean nullEquals(Object o1,
                                       Object o2)

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.