Package

com.eharmony.aloha

io

Permalink

package io

Visibility
  1. Public
  2. All

Type Members

  1. trait AlohaReadable[A] extends FileReadable[A] with NonFileReadable[A]

    Permalink
  2. trait ContainerReadable[C[_]] extends AnyRef

    Permalink
  3. trait ContainerReadableByString[C[_]] extends ContainerReadableCommon[C]

    Permalink

    Support for various ways of reading data by converting the input type to a String and calling fromString.

  4. trait ContainerReadableCommon[C[_]] extends ContainerReadable[C]

    Permalink
  5. trait FileReadable[A] extends AnyRef

    Permalink
  6. trait FileReadableByInputStream[A] extends FileReadable[A]

    Permalink
  7. trait GZippedReadable[A] extends AnyRef

    Permalink

    When mixed in with a com.eharmony.aloha.io.NonFileReadable[A], this will provide a method gz that will read gzipped versions of files.

    When mixed in with a com.eharmony.aloha.io.NonFileReadable[A], this will provide a method gz that will read gzipped versions of files. This works by creating a private object that implements com.eharmony.aloha.io.FileReadableByInputStream with a fromInputStream method that wraps the incoming InputStream in a java.util.zip.GZIPInputStream and then forwards the wrapped InputStream to the fromInputStream of the object into which GZippedReadable was mixed.

    This gives all the different ways to unpack gzipped data from a File, URL, FileObject, etc. For instance:

    class X[Seq[String]] extends ReadableByString[Seq[String]] with GZippedReadable[Seq[String]] {
      def fromString(s: String) = s.split("\t", -1)
      def doSomething() {
        val zippedResourcePath = "..."
    
        // Get the Seq[String] from resource and do stuff to it...
        gz.fromResource(zippedResourcePath).filter(_.size > 1).size
      }
    }
  8. trait LocationLoggingContainerReadable[C[_]] extends ContainerReadable[C]

    Permalink

    Logs the locations of identifiable resources from which the objects are read.

    Logs the locations of identifiable resources from which the objects are read.

    C

    the container type

  9. trait LocationLoggingReadable[A] extends FileReadableByInputStream[A]

    Permalink

    Logs the locations of identifiable resources from which the objects are read.

    Logs the locations of identifiable resources from which the objects are read.

    A

    type of the values returned by the reading functions.

  10. trait NonFileReadable[A] extends AnyRef

    Permalink
  11. trait ReadableByReader[A] extends AlohaReadable[A] with FileReadableByInputStream[A]

    Permalink
  12. trait ReadableByString[A] extends AlohaReadable[A] with FileReadableByInputStream[A]

    Permalink

    Support for various ways of reading data by converting the input type to a String and calling fromString.

    Support for various ways of reading data by converting the input type to a String and calling fromString.

    A

    the result type produced by reading from one of the readable formats.

Value Members

  1. object StringReadable extends ReadableByString[String] with GZippedReadable[String] with LocationLoggingReadable[String] with Logging

    Permalink

    Provides a very easy way to read data input a string.

  2. package fs

    Permalink

    This provides a standard way to deal with different file systems.

    This provides a standard way to deal with different file systems. Specifically, this is package should help dealing with using Apache VFS 1 and Apache VFS 2. The need for this stems from the fact that the different versions are not binary compatible and they offer different plugins. Therefore, we want build an abstraction layer on top that allows us to use whichever one we want.

  3. package multiple

    Permalink

    Provides a way of parsing multiple resources in bulk so that the factory object can be thrown away once all resources are parsed and converted to objects.

    Provides a way of parsing multiple resources in bulk so that the factory object can be thrown away once all resources are parsed and converted to objects.

    This concept is especially useful to Spring because factories can be [http://docs.spring.io/spring/docs/3.1.x/spring-framework-reference/html/beans.html#beans-factory-scopes-prototype prototype scoped]. Model factories with prototype scoping can be constructed once per usage and then thrown away, so limiting the number of calls to the factory is desirable. Therefore, bulk calls are desirable. Once the factory is no longer needed, it will be garbage collected which may free up large amounts of memory.

  4. package sources

    Permalink
  5. package vfs

    Permalink

Ungrouped