ElemApi

trait ElemApi[E <: ElemApi[E]]

Common purely abstract query API trait for querying abstract syntax trees (or other object trees).

It has been heavily inspired by the yaidom project for XML querying.

Companion
object
class Object
trait Matchable
class Any
trait ElemLike[E]
trait XPathElem
object Plus
object Minus
trait Argument
trait Comp
object Eq
object Ne
object Lt
object Le
object Gt
object Ge
trait NodeComp
object Is
object Precedes
object Follows
trait ValueComp
object Eq
object Ne
object Lt
object Le
object Gt
object Ge
object Child
object Descendant
object Attribute
object Self
object Following
object Namespace
object Intersect
object Except
trait ItemType
trait ArrayTest
trait MapTest
object AnyMapTest
trait LeafElem
object Times
object Div
object IDiv
object Mod
object Parent
object Ancestor
object Preceding
trait StepOp
object TextTest
trait UnaryOp
object Plus
object Minus
class VarRef
trait NodeTest
trait KindTest
trait PITest
trait NameTest
trait Wildcard
class Param
class ParamList
trait Postfix
class Predicate
class ForExpr
class LetExpr
trait XPathExpr
trait Expr
class IfExpr
trait OrExpr
trait AndExpr
trait RangeExpr
trait UnionExpr
trait TreatExpr
trait CastExpr
trait ArrowExpr
trait UnaryExpr
trait ValueExpr
trait PathExpr
trait StepExpr
trait AxisStep
trait Literal

Value members

Abstract methods

def children: IndexedSeq[E]

Finds all child elements.

Finds all child elements.

def filterElems(p: E => Boolean): IndexedSeq[E]

Finds all descendant elements obeying the given predicate.

Finds all descendant elements obeying the given predicate.

def filterElemsOfType[A <: E](cls: ClassTag[A])(p: A => Boolean): IndexedSeq[A]

Finds all descendant elements of the given element type obeying the given predicate.

Finds all descendant elements of the given element type obeying the given predicate.

def filterElemsOrSelf(p: E => Boolean): IndexedSeq[E]

Finds all descendant-or-self elements obeying the given predicate. This is a core method in that several methods are implemented directly or indirectly in terms of this one.

Finds all descendant-or-self elements obeying the given predicate. This is a core method in that several methods are implemented directly or indirectly in terms of this one.

def filterElemsOrSelfOfType[A <: E](cls: ClassTag[A])(p: A => Boolean): IndexedSeq[A]

Finds all descendant-or-self elements of the given element type obeying the given predicate.

Finds all descendant-or-self elements of the given element type obeying the given predicate.

def findAllElems: IndexedSeq[E]

Finds all descendant elements.

Finds all descendant elements.

def findAllElemsOfType[A <: E](cls: ClassTag[A]): IndexedSeq[A]

Finds all descendant elements of the given element type.

Finds all descendant elements of the given element type.

def findAllElemsOrSelf: IndexedSeq[E]

Finds all descendant-or-self elements.

Finds all descendant-or-self elements.

def findAllElemsOrSelfOfType[A <: E](cls: ClassTag[A]): IndexedSeq[A]

Finds all descendant-or-self elements of the given element type.

Finds all descendant-or-self elements of the given element type.

def findAllTopmostElemsOfType[A <: E](cls: ClassTag[A]): IndexedSeq[A]

Finds all topmost descendant elements of the given element type.

Finds all topmost descendant elements of the given element type.

def findAllTopmostElemsOrSelfOfType[A <: E](cls: ClassTag[A]): IndexedSeq[A]

Finds all topmost descendant-or-self elements of the given element type.

Finds all topmost descendant-or-self elements of the given element type.

def findElem(p: E => Boolean): Option[E]

Finds the first descendant element obeying the given predicate, if any, returning an optional result.

Finds the first descendant element obeying the given predicate, if any, returning an optional result.

def findElemOfType[A <: E](cls: ClassTag[A])(p: A => Boolean): Option[A]

Finds the first descendant element of the given element type obeying the given predicate, if any, returning an optional result.

Finds the first descendant element of the given element type obeying the given predicate, if any, returning an optional result.

def findElemOrSelf(p: E => Boolean): Option[E]

Finds the first descendant-or-self element obeying the given predicate, if any, returning an optional result.

Finds the first descendant-or-self element obeying the given predicate, if any, returning an optional result.

def findElemOrSelfOfType[A <: E](cls: ClassTag[A])(p: A => Boolean): Option[A]

Finds the first descendant-or-self element of the given element type obeying the given predicate, if any, returning an optional result.

Finds the first descendant-or-self element of the given element type obeying the given predicate, if any, returning an optional result.

def findFirstElemOfType[A <: E](cls: ClassTag[A]): Option[A]

Finds the first descendant element of the given element type, if any, returning an optional result.

Finds the first descendant element of the given element type, if any, returning an optional result.

def findFirstElemOrSelfOfType[A <: E](cls: ClassTag[A]): Option[A]

Finds the first descendant-or-self element of the given element type, if any, returning an optional result.

Finds the first descendant-or-self element of the given element type, if any, returning an optional result.

def findTopmostElems(p: E => Boolean): IndexedSeq[E]

Finds all topmost descendant elements obeying the given predicate.

Finds all topmost descendant elements obeying the given predicate.

def findTopmostElemsOfType[A <: E](cls: ClassTag[A])(p: A => Boolean): IndexedSeq[A]

Finds all topmost descendant elements of the given element type obeying the given predicate.

Finds all topmost descendant elements of the given element type obeying the given predicate.

def findTopmostElemsOrSelf(p: E => Boolean): IndexedSeq[E]

Finds all topmost elements-or-self obeying the given predicate. This is a core method in that several methods are implemented directly or indirectly in terms of this one.

Finds all topmost elements-or-self obeying the given predicate. This is a core method in that several methods are implemented directly or indirectly in terms of this one.

def findTopmostElemsOrSelfOfType[A <: E](cls: ClassTag[A])(p: A => Boolean): IndexedSeq[A]

Finds all topmost descendant-or-self elements of the given element type obeying the given predicate.

Finds all topmost descendant-or-self elements of the given element type obeying the given predicate.