io.dylemma.xml

Transformer

trait Transformer[A] extends TransformerCommon[A]

Transforms a stream of XMLEvent into a stream of Result[A]. Transformers are generally created by combining a Splitter with a Parser. They can be further transformed (e.g. to a stream of Result[B] instead) by transformWith, or be turned into a parser via parseWith.

A

The type of results in the transformed stream

Self Type
Transformer[A]
Source
Transformer.scala
Linear Supertypes
TransformerCommon[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Transformer
  2. TransformerCommon
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type P[B] = Parser[B]

    Result type for parseWith combinators

    Result type for parseWith combinators

    Definition Classes
    TransformerTransformerCommon
  2. type T[B] = Transformer[B]

    Result type for transformWith combinators

    Result type for transformWith combinators

    Definition Classes
    TransformerTransformerCommon

Abstract Value Members

  1. abstract def toEnumeratee(implicit ec: ExecutionContext): Enumeratee[XMLEvent, Result[A]]

    Returns the Enumeratee representation of this transformer, given an implicit ExecutionContext.

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def foreach(thunk: (A) ⇒ Unit): P[Unit]

    Create a parser that runs the given thunk on the values of each successful result in the stream.

    Create a parser that runs the given thunk on the values of each successful result in the stream. The parser's result will always be a Unit.

    thunk

    A side-effecting function on the elements in the stream

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  12. def foreachResult(thunk: (Result[A]) ⇒ Unit): P[Unit]

    Create a parser that runs the given thunk on every result in the stream.

    Create a parser that runs the given thunk on every result in the stream. The parser's result will always be a Unit.

    thunk

    A side-effecting function on the results in the stream

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

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

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. def parseConcat[B, That]()(implicit t: (A) ⇒ TraversableOnce[B], bf: CanBuildFrom[A, B, That]): P[That]

    Create a parser that concatenates the results of this transformer according to some implicitly-available CanBuildFrom.

    Create a parser that concatenates the results of this transformer according to some implicitly-available CanBuildFrom. Empty results are ignored, while Error results will cause the entire result to be replaced with that error.

    B

    The element type in the traversable from t

    That

    The end result type

    t

    An implicit view of the results as a traversable

    bf

    A builder from the traversable in t to some other result type

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  20. def parseList: P[List[A]]

    Create a parser that consumes the results of this transformer as a List.

    Create a parser that consumes the results of this transformer as a List. Empty results are ignored, while Error results will cause the entire list to be replaced with that error.

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  21. def parseOptional: P[Option[A]]

    Create a parser that consumes and returns the first non-empty result of this transformer, as an option.

    Create a parser that consumes and returns the first non-empty result of this transformer, as an option. If no first result exists, or the stream is full of Empty results, the parser will return a None.

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  22. def parseSingle: P[A]

    Create a parser that consumes and returns the first non-empty result of this transformer, if one exists.

    Create a parser that consumes and returns the first non-empty result of this transformer, if one exists. If no first result exists, the parser will return an Empty instead.

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  23. def parseWith[B](getIteratee: (ExecutionContext) ⇒ Iteratee[Result[A], Result[B]]): Parser[B]

    Consume results passed through this transformer to yield a single, final result.

    Consume results passed through this transformer to yield a single, final result.

    B

    The final result's type

    getIteratee

    A function that passes in the same ExecutionContext being used by this transformer, and returns an Iteratee that consumes the results of this transformer.

    returns

    A Parser whose result will be the final result returned by the iteratee.

    Definition Classes
    TransformerTransformerCommon
  24. def parseWith[B](iteratee: Iteratee[Result[A], Result[B]]): P[B]

    Consume results passed through this transformer to yield a single, final result.

    Consume results passed through this transformer to yield a single, final result.

    B

    The final result's type

    iteratee

    The iteratee responsible for consuming the results

    returns

    A Parser whose result will be the final result returned by the iteratee.

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  25. def scanResultsWith[B](s: StreamScan[A, B]): T[B]

    Create a new transformer that folds over the results from this transformer using the given StreamScan object.

    Create a new transformer that folds over the results from this transformer using the given StreamScan object. Error results from this transformer will cause the StreamScan state to reset to its init state before being passed along. Result values from the scan's fold and finish methods will be passed through.

    B

    s's output type

    s

    A StreamScan that manages the internal logic of the fold.

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  26. def scanWith[B](s: StreamScan[A, B]): T[B]

    Create a new transformer that folds over the results from this transformer using the given StreamScan object.

    Create a new transformer that folds over the results from this transformer using the given StreamScan object. Empty and Error results will be ignored by s. Result values from the scan's fold and finish methods will be passed through.

    B

    s's output type

    s

    A StreamScan that manages the internal logic of the fold.

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def takeThroughFirstError: T[A]

    Create a new transformer that passes through the results from this transformer until just after the first Error result.

    Create a new transformer that passes through the results from this transformer until just after the first Error result. If the first error occurs, that result will be the final result in the stream. Shortcut for takeThroughNthError(1)

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  29. def takeThroughNthError(n: Int): T[A]

    Create a new transformer that passes through the results from this transformer until just after the nth Error result.

    Create a new transformer that passes through the results from this transformer until just after the nth Error result. If the nth error occurs, that result will be the final result in the stream.

    n

    The number of of errors required to end the stream (aside from a normal EOF)

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  30. def takeUntilFirstError: T[A]

    Create a new transformer that passes through the results from this transformer until the first error occurs.

    Create a new transformer that passes through the results from this transformer until the first error occurs. The first error will be treated as an EOF and will not be passed through. Shortcut for takeUntilNthError(1)

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  31. def takeUntilNthError(n: Int): T[A]

    Create a new transformer that passes through the results from this transformer until the nth error occurs.

    Create a new transformer that passes through the results from this transformer until the nth error occurs. The nth error will be treated as an EOF and will not be passed through.

    n

    The number of errors required to end the stream (aside from a normal EOF)

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. def transformWith[B](getEnumeratee: (ExecutionContext) ⇒ Enumeratee[Result[A], Result[B]]): Transformer[B]

    Transform the results passed through this transformer by applying an Enumeratee to its stream.

    Transform the results passed through this transformer by applying an Enumeratee to its stream.

    B

    The outgoing result type

    getEnumeratee

    A function that returns the Enumeratee given an ExecutionContext. The same ExecutionContext being used by this transformer will be passed to getEnumeratee.

    returns

    A new transformer that passes along the B results output by the enumeratee.

    Definition Classes
    TransformerTransformerCommon
  34. def transformWith[B](enumeratee: Enumeratee[Result[A], Result[B]]): T[B]

    Transform the results passed through this transformer by applying an Enumeratee to its stream.

    Transform the results passed through this transformer by applying an Enumeratee to its stream.

    B

    The outgoing result type

    enumeratee

    The Enumeratee responsible for transforming the stream

    returns

    A new transformer that passes along the B results output by the enumeratee

    Definition Classes
    TransformerCommon
    Annotations
    @inline()
  35. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from TransformerCommon[A]

Inherited from AnyRef

Inherited from Any

Ungrouped