gander.images

DefaultImageExtractor

class DefaultImageExtractor extends ImageExtractor

This image extractor will attempt to find the best image nearest the article. Unfortunately this is a slow process since we're actually downloading the image itself to inspect it's actual height/width and area metrics since most of the time these aren't in the image tags themselves or can be falsified. We'll weight the images in descending order depending on how high up they are compared to the top node content

//todo this is a straight java to scala conversion, need to add the nicities of scala, all these null checks make me dizzy

Linear Supertypes
ImageExtractor, CanLog, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DefaultImageExtractor
  2. ImageExtractor
  3. CanLog
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DefaultImageExtractor(targetUrl: String, doc: Document, config: Configuration)

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 checkForKnownElements: Option[Image]

    in here we check for known image contains from sites we've checked out like yahoo, techcrunch, etc.

    in here we check for known image contains from sites we've checked out like yahoo, techcrunch, etc... that have known places to look for good images. //todo enable this to use a series of settings files so people can define what the image ids/classes are on specific sites

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def critical(t: Throwable, msg: String, refs: Any*): Unit

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog
  10. def critical(msg: String, refs: Any*): Unit

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog
  11. def debug(t: Throwable, msg: String, refs: Any*): Unit

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog
  12. def debug(msg: String, refs: Any*): Unit

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog
  13. val doc: Document

    Attributes
    protected
    Definition Classes
    DefaultImageExtractorImageExtractor
  14. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def getAllImages: ArrayList[Element]

  18. def getBestImage(): Option[Image]

    Definition Classes
    DefaultImageExtractorImageExtractor
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def getDepthLevel(node: Element, parentDepth: Int, siblingDepth: Int): Option[DepthTraversal]

  21. def getImageCandidates(node: Element): Option[ArrayList[Element]]

  22. def getImagesFromNode(node: Element): Option[Elements]

  23. def getNode(node: Element): Option[Element]

  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. def info(t: Throwable, msg: String, refs: Any*): Unit

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog
  26. def info(msg: String, refs: Any*): Unit

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog
  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def logPrefix: String

    Attributes
    protected
    Definition Classes
    ImageExtractor
  29. def logger: Logger

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog
  30. final def ne(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AnyRef
  34. def toString(): String

    Definition Classes
    AnyRef → Any
  35. def trace(t: Throwable, msg: String, refs: Any*): Unit

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog
  36. def trace(msg: String, refs: Any*): Unit

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog
  37. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. def warn(t: Throwable, msg: String, refs: Any*): Unit

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog
  41. def warn(msg: String, refs: Any*): Unit

    Attributes
    protected
    Definition Classes
    ImageExtractorCanLog

Inherited from ImageExtractor

Inherited from CanLog

Inherited from AnyRef

Inherited from Any

Ungrouped