Packages

trait Paths extends AnyRef

Utility functions for Paths, sorting, moving between Paths, getting to the root etc.

Linear Supertypes
AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Paths
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type FoldR[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]] = Either[Path[Item, Section, CC], FoldError]
  2. type PathFoldR[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]] = (Path[Item, Section, CC]) ⇒ FoldR[Item, Section, CC]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val NotSameRoot: Int
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def comparePathPositions[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](path1: Position[Item, Section, CC], path2: Position[Item, Section, CC]): Int

    When paths are not in the same root, they are compared based on the identity hash of the given roots.

    When paths are not in the same root, they are compared based on the identity hash of the given roots. Of course this relies on that function having a decent vm implementation.

    returns

    1 if path1 is before path2, -1 if path2 is before path1, 0 if they are the same and NotSameRoot+-1 if they are not in the same root

  8. def comparePaths[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](path1: Path[Item, Section, CC], path2: Path[Item, Section, CC]): (Int, Position[Item, Section, CC], Position[Item, Section, CC])

    When paths are not in the same root, they are compared based on the identity hash of the given roots.

    When paths are not in the same root, they are compared based on the identity hash of the given roots. Of course this relies on that function having a decent vm implementation. See http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-document-order, tree order must remain constant. Its also a pretty sensible approach for non xml trees.

    returns

    1 if path1 is before path2, -1 if path2 is before path1, 0 if they are the same and NotSameRoot+-1 if they are not in the same root

  9. def comparePathsDirect[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](path1: Path[Item, Section, CC], path2: Path[Item, Section, CC]): Boolean

    Helper for comparePaths, will not evaluate position if the paths are equal

  10. def comparePathsP[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](path1: (Position[Item, Section, CC], Path[Item, Section, CC]), path2: (Position[Item, Section, CC], Path[Item, Section, CC])): (Int, Position[Item, Section, CC], Position[Item, Section, CC])
  11. def comparePathsT[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_], T](path1: (Position[Item, Section, CC], (T, Path[Item, Section, CC])), path2: (Position[Item, Section, CC], (T, Path[Item, Section, CC]))): (Int, Position[Item, Section, CC], Position[Item, Section, CC])
  12. def deepestLast[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](path: Path[Item, Section, CC]): Path[Item, Section, CC]

    Deepest last child

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def foldPositions[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](locations: Iterable[Path[Item, Section, CC]])(folder: (Path[Item, Section, CC]) ⇒ FoldOperation[Item, Section, CC])(implicit iseqLikeThing: SeqLikeThing[CC[_], utils.ItemOrTree[Item, Section, CC], CC], cm: ClassManifest[(Position[Item, Section, CC], Path[Item, Section, CC])]): FoldR[Item, Section, CC]

    Folds over positions within a single path, for example all given children.

    Folds over positions within a single path, for example all given children. As such positions must be calculated.

    Takes the first root, returning Right(NoSingleRoot) if any of the subsequent roots don't match.

    folder retrieves the current path

    Each iteration folds the resulting tree back into the path. As this function must maintain the Path it does not expose the new path root until the result.

  17. def foldPositions[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_], ACC](locations: Iterable[Path[Item, Section, CC]], accumulator: ACC)(folder: (ACC, Path[Item, Section, CC]) ⇒ (ACC, FoldOperation[Item, Section, CC]))(implicit iseqLikeThing: SeqLikeThing[CC[_], utils.ItemOrTree[Item, Section, CC], CC], cm: ClassManifest[(Position[Item, Section, CC], Path[Item, Section, CC])]): Either[(ACC, Path[Item, Section, CC]), FoldError]

    As per the non accumalating version, folds over positions within a given tree but allows for an additional accumalation.

    As per the non accumalating version, folds over positions within a given tree but allows for an additional accumalation.

    The progress through the document is in reverse document order. This ensures that transformations can always be safely composed, e.g. a delete of a path won't stop changes below it. This, however, implies the developer must also handle any accumulation in "reverse".

  18. def following[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](path: Path[Item, Section, CC]): Option[Path[Item, Section, CC]]

    gets the next following:: sibling in document order

  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. def moveTo[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](path: Path[Item, Section, CC], newPos: Position[Item, Section, CC])(implicit seqLikeThing: SeqLikeThing[CC[_], utils.ItemOrTree[Item, Section, CC], CC]): Path[Item, Section, CC]

    Navigates the path until the new position is reached, throws if either its a new root or the position is not reachable

  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def noPath[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](implicit seqLikeThing: SeqLikeThing[CC[_], utils.ItemOrTree[Item, Section, CC], CC]): Path[Item, Section, CC]
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. def positions[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](paths: Iterable[Path[Item, Section, CC]]): Iterable[(Position[Item, Section, CC], Path[Item, Section, CC])]

    Obtain the positions for the paths

  28. def positionsT[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_], T](paths: Iterable[(T, Path[Item, Section, CC])]): Iterable[(Position[Item, Section, CC], (T, Path[Item, Section, CC]))]

    positions with tuples (T, Path)

  29. def preceding[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](path: Path[Item, Section, CC]): Option[Path[Item, Section, CC]]

    gets the next preceding:: sibling equivalent in document order, unlike XPath preceding:: it does not exclude parents

  30. def rootPath[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](path: Path[Item, Section, CC]): Path[Item, Section, CC]

    Returns the root path for its input, uses zipUp to ensure changes are kept

  31. def sort[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](paths: Iterable[Path[Item, Section, CC]], isDescending: Boolean = true)(implicit cm: ClassManifest[(Position[Item, Section, CC], Path[Item, Section, CC])]): Iterable[Path[Item, Section, CC]]

    Sorts according to position of each path item, descending or descending based on a depth first then rightwise order.

  32. def sortPositions[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](paths: Iterable[Path[Item, Section, CC]], isDescending: Boolean = true)(implicit cm: ClassManifest[(Position[Item, Section, CC], Path[Item, Section, CC])]): Iterable[(Position[Item, Section, CC], Path[Item, Section, CC])]

    Sorts according to position of each path item, descending or descending based on a depth first then rightwise order.

  33. def sortPositionsT[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[X], T](paths: Iterable[(T, Path[Item, Section, CC])], isDescending: Boolean = true)(implicit cm: ClassManifest[(Position[Item, Section, CC], (T, Path[Item, Section, CC]))]): Iterable[(Position[Item, Section, CC], (T, Path[Item, Section, CC]))]

    sortPositions with a tuple T, Path

  34. def sortT[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_], T](paths: Iterable[(T, Path[Item, Section, CC])], isDescending: Boolean = true)(implicit cm: ClassManifest[(Position[Item, Section, CC], (T, Path[Item, Section, CC]))]): Iterable[(T, Path[Item, Section, CC])]

    sort with a tuple T, Path

  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. def toPositionalEqual[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]]: Equal[Path[Item, Section, CC]]

    Provides an instance of the Equal type class for positional Equality

  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. def top[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](tree: Tree[Item, Section, CC])(implicit seqLikeThing: SeqLikeThing[CC[_], utils.ItemOrTree[Item, Section, CC], CC]): Path[Item, Section, CC]
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped