Class/Object

com.eharmony.aloha.factory

ModelFactory

Related Docs: object ModelFactory | package factory

Permalink

sealed abstract class ModelFactory[A, B] extends ReadableByString[Try[Model[A, B]]] with GZippedReadable[Try[Model[A, B]]] with LocationLoggingReadable[Try[Model[A, B]]] with MultipleAlohaReadable[Try[Model[A, B]]] with SequenceMultipleReadable[ReadableSource, Try, Model[A, B]] with Logging

A factory that produces models.

A

model input type

B

Model output type

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ModelFactory
  2. Logging
  3. SequenceMultipleReadable
  4. MultipleAlohaReadable
  5. MultipleReadable
  6. LocationLoggingReadable
  7. GZippedReadable
  8. ReadableByString
  9. FileReadableByInputStream
  10. AlohaReadable
  11. NonFileReadable
  12. FileReadable
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def fromString(s: String): Try[Model[A, B]]

    Permalink

    Read from a String.

    Read from a String.

    s

    a String to read.

    returns

    the result

    Definition Classes
    NonFileReadable

Concrete 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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def debug(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Permalink

    Issue a debug logging message, with an exception.

    Issue a debug logging message, with an exception.

    msg

    the message object. toString() is called to convert it to a loggable string.

    t

    the exception to include with the logged message.

    Attributes
    protected[this]
    Definition Classes
    Logging
  7. final def debug(msg: ⇒ Any): Unit

    Permalink

    Issue a debug logging message.

    Issue a debug logging message.

    msg

    the message object. toString() is called to convert it to a loggable string.

    Attributes
    protected[this]
    Definition Classes
    Logging
  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. final def error(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Permalink

    Issue a error logging message, with an exception.

    Issue a error logging message, with an exception.

    msg

    the message object. toString() is called to convert it to a loggable string.

    t

    the exception to include with the logged message.

    Attributes
    protected[this]
    Definition Classes
    Logging
  11. final def error(msg: ⇒ Any): Unit

    Permalink

    Issue a error logging message.

    Issue a error logging message.

    msg

    the message object. toString() is called to convert it to a loggable string.

    Attributes
    protected[this]
    Definition Classes
    Logging
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def fromClasspathResource(r: String): Try[Model[A, B]]

    Permalink

    Read from a classpath resource.

    Read from a classpath resource. This uses fromVfs2 under the hood.

    r

    a classpath resource path.

    Definition Classes
    FileReadableByInputStreamFileReadable
  14. def fromFile(f: File): Try[Model[A, B]]

    Permalink

    Read from a file.

    Read from a file. Logs the file.

    f

    a file to read. The file's InputStream is automatically closed.

    returns

    the result

    Definition Classes
    LocationLoggingReadableFileReadableByInputStreamFileReadable
  15. final def fromInputStream(is: InputStream): Try[Model[A, B]]

    Permalink

    Read from an InputStream.

    Read from an InputStream.

    is

    an InputStream to read. The InputStream is automatically closed.

    returns

    the result

    Definition Classes
    ReadableByStringFileReadableByInputStreamNonFileReadable
  16. def fromMultipleSources[F[_]](readableTypes: F[ReadableSource])(implicit f: Functor[F]): F[Try[Model[A, B]]]

    Permalink

    Parse a bunch of readable sources given a Functor (see Functors, Monads, Applicatives – can be so simple).

    Parse a bunch of readable sources given a Functor (see Functors, Monads, Applicatives – can be so simple).

    F

    the functor type

    readableTypes

    a container of instances to convert into type the output type

    f

    a function instance

    returns

    a container F of the output type B

    Definition Classes
    MultipleReadable
  17. def fromMultipleSources(readableTypes: Collection[ReadableSource]): Collection[Try[Model[A, B]]]

    Permalink

    Parse a bunch of readable sources from a java collection and return the results.

    Parse a bunch of readable sources from a java collection and return the results.

    readableTypes

    a collection of sources from which

    Definition Classes
    MultipleReadable
  18. def fromMultipleSources(readableTypes: List[ReadableSource]): List[Try[Model[A, B]]]

    Permalink

    Parse a list of readable sources and return the results.

    Parse a list of readable sources and return the results.

    readableTypes

    a list of readable sources containing the necessary information to parse the resource and produce the proper outputs.

    returns

    a list of objects produced by parsing the resources in the readable types.

    Definition Classes
    MultipleReadable
  19. final def fromReader(r: Reader): Try[Model[A, B]]

    Permalink

    Read from a Reader.

    Read from a Reader. Whoever extends this trait is responsible for closing the Reader.

    r

    a Reader containing data to be read.

    returns

    the result

    Definition Classes
    ReadableByStringNonFileReadable
  20. def fromResource(r: String): Try[Model[A, B]]

    Permalink

    Read from a resource.

    Read from a resource. This uses fromVfs2 under the hood.

    r

    a resource path.

    Definition Classes
    FileReadableByInputStreamFileReadable
  21. def fromSequencedMultipleSources[T[_]](readableTypes: T[ReadableSource])(implicit t: Traverse[T], ap: Applicative[Try]): Try[T[Model[A, B]]]

    Permalink

    Produce multiple outputs from multiple inputs and sequence the data so that we commute that container types.

    Produce multiple outputs from multiple inputs and sequence the data so that we commute that container types. For an example, see that trait documentation.

    T

    the Traverse container type

    readableTypes

    A container of readable sources to convert to outputs.

    t

    a Traverse type class instance

    ap

    an applicative function type class instance

    Definition Classes
    SequenceMultipleReadable
  22. def fromUrl(u: URL): Try[Model[A, B]]

    Permalink

    Read from a URL.

    Read from a URL. Logs the URL.

    u

    a URL to read. The URL's InputStream is automatically closed.

    returns

    the result

    Definition Classes
    LocationLoggingReadableFileReadableByInputStreamFileReadable
  23. def fromVfs1(foVfs1: FileObject): Try[Model[A, B]]

    Permalink

    Read from an Apache VFS v1 FileObject.

    Read from an Apache VFS v1 FileObject. Logs the file object location.

    foVfs1

    an Apache VFS v1 FileObject to read. The FileObject's InputStream is automatically closed.

    returns

    the result

    Definition Classes
    LocationLoggingReadableFileReadableByInputStreamFileReadable
  24. def fromVfs2(foVfs2: FileObject): Try[Model[A, B]]

    Permalink

    Read from an Apache VFS v1 FileObject.

    Read from an Apache VFS v1 FileObject. Logs the file object location.

    foVfs2

    an Apache VFS v1 FileObject to read. The FileObject's InputStream is automatically closed.

    returns

    the result

    Definition Classes
    LocationLoggingReadableFileReadableByInputStreamFileReadable
  25. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  26. def gz: FileReadableByInputStream[Try[Model[A, B]]] with MultipleFileReadable[Try[Model[A, B]]]

    Permalink
    Definition Classes
    GZippedReadable
  27. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def info(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Permalink

    Issue a info logging message, with an exception.

    Issue a info logging message, with an exception.

    msg

    the message object. toString() is called to convert it to a loggable string.

    t

    the exception to include with the logged message.

    Attributes
    protected[this]
    Definition Classes
    Logging
  29. final def info(msg: ⇒ Any): Unit

    Permalink

    Issue a info logging message.

    Issue a info logging message.

    msg

    the message object. toString() is called to convert it to a loggable string.

    Attributes
    protected[this]
    Definition Classes
    Logging
  30. val inputCharset: String

    Permalink

    The character set that is used to decode the input streams in fromInputStream in the derived classes.

    The character set that is used to decode the input streams in fromInputStream in the derived classes.

    Attributes
    protected
    Definition Classes
    ReadableByString
  31. final def isDebugEnabled: Boolean

    Permalink

    Determine whether debug logging is enabled.

    Determine whether debug logging is enabled.

    Attributes
    protected[this]
    Definition Classes
    Logging
  32. final def isErrorEnabled: Boolean

    Permalink

    Determine whether error logging is enabled.

    Determine whether error logging is enabled.

    Attributes
    protected[this]
    Definition Classes
    Logging
  33. final def isInfoEnabled: Boolean

    Permalink

    Determine whether info logging is enabled.

    Determine whether info logging is enabled.

    Attributes
    protected[this]
    Definition Classes
    Logging
  34. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  35. final def isTraceEnabled: Boolean

    Permalink

    Determine whether trace logging is enabled.

    Determine whether trace logging is enabled.

    Attributes
    protected[this]
    Definition Classes
    Logging
  36. final def isWarnEnabled: Boolean

    Permalink

    Determine whether warn logging is enabled.

    Determine whether warn logging is enabled.

    Attributes
    protected[this]
    Definition Classes
    Logging
  37. final lazy val logger: Logger

    Permalink

    The logger is a @transient lazy val to enable proper working with Spark.

    The logger is a @transient lazy val to enable proper working with Spark. The logger will not be serialized with the rest of the class with which this trait is mixed-in.

    Attributes
    protected[this]
    Definition Classes
    Logging
  38. def loggerInitName(): String

    Permalink

    The name with which the logger is initialized.

    The name with which the logger is initialized. This can be overridden in a derived class.

    Attributes
    protected
    Definition Classes
    Logging
  39. final def loggerName: String

    Permalink

    Get the name associated with this logger.

    Get the name associated with this logger.

    returns

    the name.

    Attributes
    protected[this]
    Definition Classes
    Logging
  40. val mapper: (ReadableSource) ⇒ Try[Model[A, B]]

    Permalink

    A function that maps from the Readable type to the output type.

    A function that maps from the Readable type to the output type.

    returns

    a function.

    Definition Classes
    MultipleAlohaReadableMultipleReadable
  41. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  44. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  45. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  46. final def trace(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Permalink

    Issue a trace logging message, with an exception.

    Issue a trace logging message, with an exception.

    msg

    the message object. toString() is called to convert it to a loggable string.

    t

    the exception to include with the logged message.

    Attributes
    protected[this]
    Definition Classes
    Logging
  47. final def trace(msg: ⇒ Any): Unit

    Permalink

    Issue a trace logging message.

    Issue a trace logging message.

    msg

    the message object. toString() is called to convert it to a loggable string.

    Attributes
    protected[this]
    Definition Classes
    Logging
  48. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def warn(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Permalink

    Issue a warn logging message, with an exception.

    Issue a warn logging message, with an exception.

    msg

    the message object. toString() is called to convert it to a loggable string.

    t

    the exception to include with the logged message.

    Attributes
    protected[this]
    Definition Classes
    Logging
  52. final def warn(msg: ⇒ Any): Unit

    Permalink

    Issue a warn logging message.

    Issue a warn logging message.

    msg

    the message object. toString() is called to convert it to a loggable string.

    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from Logging

Inherited from SequenceMultipleReadable[ReadableSource, Try, Model[A, B]]

Inherited from MultipleAlohaReadable[Try[Model[A, B]]]

Inherited from MultipleReadable[ReadableSource, Try[Model[A, B]]]

Inherited from LocationLoggingReadable[Try[Model[A, B]]]

Inherited from GZippedReadable[Try[Model[A, B]]]

Inherited from ReadableByString[Try[Model[A, B]]]

Inherited from FileReadableByInputStream[Try[Model[A, B]]]

Inherited from AlohaReadable[Try[Model[A, B]]]

Inherited from NonFileReadable[Try[Model[A, B]]]

Inherited from FileReadable[Try[Model[A, B]]]

Inherited from AnyRef

Inherited from Any

Ungrouped