Package

io.dylemma

spac

Permalink

package spac

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. spac
  2. FunctorSyntax
  3. ContextMatcherSyntax
  4. ConsumerSyntax
  5. TransformerSyntax
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractHandlerFactory[-In, +Out, R[+_], Mapped[-_, +_]] extends HandlerFactory[In, R[Out]]

    Permalink

    Mixin for HandlerFactory that adds mapping operations

    Mixin for HandlerFactory that adds mapping operations

    In

    The generated handler's input type

    Out

    The generated handler's output type

    R

    A container type for output values, e.g. Try or types.Id

    Mapped

    Type constructor for mapped versions of this factory

  2. trait ConsumableLike[-S, +E] extends AnyRef

    Permalink
  3. trait Consumer[-In, +Out] extends AbstractHandlerFactory[In, Out, Id, Consumer]

    Permalink

    An immutable object that can be used to create Handlers.

  4. implicit class ConsumerFollowedByOps[In, T1] extends AnyRef

    Permalink

    Implicitly adds followedBy and followedByStream to Consumers with Stackable input types.

    Implicitly adds followedBy and followedByStream to Consumers with Stackable input types. (Due to type variance conflicts between Consumer's In type and Stackable's type, these methods can't be defined directly on Consumer.)

    In

    The consumer's input type, which must be a member of the Stackable typeclass

    T1

    The consumer's output type

    Definition Classes
    ConsumerSyntax
  5. trait ContextMatcher[+A] extends AnyRef

    Permalink

    An object responsible for inspecting a stack of StartElement events and determining if they correspond to some "context" value of type A.

    An object responsible for inspecting a stack of StartElement events and determining if they correspond to some "context" value of type A.

    ContextMatchers play a primary role in splitting an XML event stream into "substreams", i.e. each substream is defined as the series of consecutive events during which the XML tag stack matches a context.

    ContextMatchers are intended to be transformed and combined with each other in order to build up more complex matching functionality. See also: SingleElementContextMatcher, which contains additional combination methods and some specialized transformation methods.

    A

    The type of the matched context.

  6. trait FollowedBy[M[+_], +T1] extends AnyRef

    Permalink

    An intermediate object for creating sequence-based combination methods for a Parser or Consumer.

    An intermediate object for creating sequence-based combination methods for a Parser or Consumer.

    M

    Type constructor for the parser/consumer of a given output type

    T1

    Output type for the "first" parser/consumer; using the combination methods in this trait will result in an instance of T1 being used to create a "second" parser/consumer/transformer to be run sequentially after the first.

  7. trait Handler[-In, +Out] extends AnyRef

    Permalink

    The base processing unit for dealing with streams of data.

    The base processing unit for dealing with streams of data.

    A handler accepts inputs of type In, eventually yielding a value of type Out. If the handleInput or handleError methods for a handler ever return a Some, it implies that the handler has reached a result, and should no longer be called. Similarly, if the isFinished method returns true, the handleX methods should no longer be called.

    Handlers are mutable by nature. Handler instances should not be shared across threads. Several traits in this library act as "blueprints" which create handler instances. These blueprint classes are immutable, and may be safely shared across threads.

    In

    The input type

    Out

    The output type

  8. trait HandlerFactory[-In, +Out] extends (Any) ⇒ HandlerFactory[In, Out]

    Permalink

    Base trait for Consumers and Parsers.

    Base trait for Consumers and Parsers.

    HandlerFactories must be able to create new Handler instances with no input provided.

    For convenience, every HandlerFactory is also a function that returns itself. This is because Splitter's through method expects a Context => HandlerFactory, but sometimes the actual context value does not matter. This allows you to call someSplitter.through(parser) instead of someSplitter.through(_ => parser)

    In

    The generated handler's input type

    Out

    The generated handler's output type

  9. implicit class NestedFunctorOps[F[_], G[_], A] extends AnyRef

    Permalink

    Adds convenience mapping functions to "containers of containers"; notably, Parser[Option[A]]

    Adds convenience mapping functions to "containers of containers"; notably, Parser[Option[A]]

    F

    The outer container type

    G

    The inner container type

    A

    The item type

    Definition Classes
    FunctorSyntax
  10. trait Parser[+Out] extends AbstractHandlerFactory[XMLEvent, Out, Try, [-in, +out]Parser[out]]

    Permalink

    A HandlerFactory specialized for XMLEvents, which produces results wrapped in a Try.

    A HandlerFactory specialized for XMLEvents, which produces results wrapped in a Try. Parsers can be combined and run to process complex XML structures.

    Out

    Result type

  11. trait SingleElementContextMatcher[+A] extends ContextMatcher[A]

    Permalink

    Specialization of ContextMatcher which only checks the first element in the stack for matching operations.

    Specialization of ContextMatcher which only checks the first element in the stack for matching operations. Transformation operations on single-element matchers will yield other single-element matchers (rather than the base ContextMatcher type). Combination operations involving other single-element matchers will also yield single-element matchers. SingleElementContextMatchers form the building blocks of more complex matchers.

    A

    The type of the matched context.

  12. trait Splitter[In, +Context] extends AnyRef

    Permalink
  13. trait Transformer[-In, +B] extends AnyRef

    Permalink

    An immutable object that can be used to create a handler which wraps an existing handler, possibly transforming inputs before passing them along to the downstream handler.

  14. implicit class TransformerParsingOps[A] extends AnyRef

    Permalink
    Definition Classes
    TransformerSyntax
  15. class XMLEvents extends AnyRef

    Permalink
  16. trait XMLResource[T] extends AnyRef

    Permalink
  17. trait XmlSplitter[+Context] extends Splitter[XMLEvent, Context]

    Permalink

Value Members

  1. val *: SingleElementContextMatcher[Unit]

    Permalink

    Context matcher that matches any single element at the head of the tag stack.

    Context matcher that matches any single element at the head of the tag stack.

    Definition Classes
    ContextMatcherSyntax
  2. val **: ContextMatcher[Unit]

    Permalink
    Definition Classes
    ContextMatcherSyntax
  3. object ConsumableLike

    Permalink
  4. object Consumer

    Permalink
  5. object ConsumerSyntax extends ConsumerSyntax

    Permalink
  6. object ContextMatcher

    Permalink
  7. object ContextMatcherSyntax extends ContextMatcherSyntax

    Permalink
  8. object FunctorSyntax extends FunctorSyntax

    Permalink
  9. object HandlerFactory

    Permalink
  10. object Parser

    Permalink
  11. object ParserCombination

    Permalink
  12. val Root: ContextMatcher[Unit]

    Permalink

    Context matcher that always matches without consuming any of the tag stack.

    Context matcher that always matches without consuming any of the tag stack.

    Definition Classes
    ContextMatcherSyntax
  13. object SingleElementContextMatcher

    Permalink
  14. object Splitter

    Permalink
  15. object Transformer

    Permalink
  16. object TransformerSyntax extends TransformerSyntax

    Permalink
  17. object XMLEvents

    Permalink
  18. object XMLResource

    Permalink
  19. def attr(name: String): SingleElementContextMatcher[String]

    Permalink

    Context matcher that extracts the given attribute from the element at the head of the stack.

    Context matcher that extracts the given attribute from the element at the head of the stack.

    name

    The local name of the attribute to extract

    Definition Classes
    ContextMatcherSyntax
  20. def attr(qname: QName): SingleElementContextMatcher[String]

    Permalink

    Context matcher that extracts the given attribute from the element at the head of the stack.

    Context matcher that extracts the given attribute from the element at the head of the stack.

    qname

    The qualified name of the attribute to extract

    Definition Classes
    ContextMatcherSyntax
  21. def elem(name: String): SingleElementContextMatcher[Unit]

    Permalink

    Context matcher that matches the element at the head of the stack as long as its name (local part only) is equal to the given name

    Context matcher that matches the element at the head of the stack as long as its name (local part only) is equal to the given name

    name

    The required (local) name for the element at the head of the stack

    Definition Classes
    ContextMatcherSyntax
  22. def elem(qname: QName): SingleElementContextMatcher[Unit]

    Permalink

    Context matcher that matches the element at the head of the stack as long as its name is equal to the given qname.

    Context matcher that matches the element at the head of the stack as long as its name is equal to the given qname.

    qname

    The required name (QName) for the element at the head of the stack

    Definition Classes
    ContextMatcherSyntax
  23. val extractElemName: SingleElementContextMatcher[String]

    Permalink

    Context matcher that extracts the (local) name of the element at the head of the stack.

    Context matcher that extracts the (local) name of the element at the head of the stack.

    Definition Classes
    ContextMatcherSyntax
  24. val extractElemQName: SingleElementContextMatcher[QName]

    Permalink

    Context matcher that extracts the (qualified) name of the element at the head of the stack.

    Context matcher that extracts the (qualified) name of the element at the head of the stack.

    Definition Classes
    ContextMatcherSyntax
  25. package handlers

    Permalink
  26. implicit def qnameToElemMatcher(qname: QName): SingleElementContextMatcher[Unit]

    Permalink

    Implicitly convert a QName to an elem matcher

    Implicitly convert a QName to an elem matcher

    Definition Classes
    ContextMatcherSyntax
  27. implicit def stringToElemMatcher(name: String): SingleElementContextMatcher[Unit]

    Permalink

    Implicitly convert a String to an elem matcher

    Implicitly convert a String to an elem matcher

    Definition Classes
    ContextMatcherSyntax
  28. package syntax

    Permalink
  29. package types

    Permalink

Inherited from FunctorSyntax

Inherited from ContextMatcherSyntax

Inherited from ConsumerSyntax

Inherited from TransformerSyntax

Inherited from AnyRef

Inherited from Any

Ungrouped