Class/Object

eu.cdevreeze.yaidom.core

AncestryPath

Related Docs: object AncestryPath | package core

Permalink

final case class AncestryPath(ancestorOrSelfEntries: List[Entry]) extends Immutable with Product with Serializable

The ancestry path of an element in an element tree. The first entry represents the "current" element, and the last one the "root" element. Each entry is like an element without its children, but with the element QName, Scope and attributes (mapping QNames to attribute values).

An AncestryPath is quite different from a Path. The former represents the ancestry-or-self of an element in an element tree, while the latter represents a series of steps to navigate through an element tree, to descendant-or-self elements. Ancestry paths have no knowledge of the siblings of "this" element or of its ancestors, while (navigation) paths can be used to navigate to any descendant-or-self element. Hence an ancestry path is a property of an element in a tree, whereas a (navigation) path is a navigation notion (through an element tree). The latter should really be called NavigationPath. Both concepts have in common that they only know about element nodes.

An AncestryPath can be thought of as a stack where the head is the "current" element and the tail is the ancestor elements.

Self Type
AncestryPath
Linear Supertypes
Serializable, Serializable, Product, Equals, Immutable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AncestryPath
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Immutable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AncestryPath(ancestorOrSelfEntries: List[Entry])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val ancestorOrSelfEntries: List[Entry]

    Permalink
  5. def ancestors: IndexedSeq[AncestryPath]

    Permalink

    Returns the ancestors, starting with the parent (if any), and ending with the root ancestry path

  6. def ancestorsOrSelf: IndexedSeq[AncestryPath]

    Permalink

    Returns the ancestors-or-self, starting with this ancestry path, then the parent (if any), and ending with a root path

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def asRoot: AncestryPath

    Permalink

    Returns AncestryPath.fromEntry(firstEntry).

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def enames: List[EName]

    Permalink

    Returns the ENames, from the last entry to the root entry.

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def findAncestor(p: (AncestryPath) ⇒ Boolean): Option[AncestryPath]

    Permalink

    Returns ancestors find { path => p(path) }

  14. def findAncestorsOrSelf(p: (AncestryPath) ⇒ Boolean): Option[AncestryPath]

    Permalink

    Returns ancestorsOrSelf find { path => p(path) }

  15. def firstEntry: Entry

    Permalink

    The ancestry path entry pointing to "this element", which is the first entry.

  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def isRoot: Boolean

    Permalink

    Returns true if this ancestry path has only one entry.

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def parent: AncestryPath

    Permalink

    Like parentOption, but unwrapping the result (or throwing an exception otherwise)

  23. def parentOption: Option[AncestryPath]

    Permalink

    Gets the parent ancestry path (if any, because a root ancestry path has no parent) wrapped in an Option.

  24. def prepend(entry: Entry): AncestryPath

    Permalink

    Prepends a new first entry to this ancestry path.

  25. def qnames: List[QName]

    Permalink

    Returns the QNames, from the last entry to the root entry.

  26. def root: AncestryPath

    Permalink

    Returns AncestryPath.fromEntry(rootEntry).

  27. def rootEntry: Entry

    Permalink

    The ancestry path entry pointing to the "root element", which is the last entry.

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Immutable

Inherited from AnyRef

Inherited from Any

Ungrouped