org.hfbk.vis.source.SourceYoutube Class Reference

Inheritance diagram for org.hfbk.vis.source.SourceYoutube:

Inheritance graph
[legend]
Collaboration diagram for org.hfbk.vis.source.SourceYoutube:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SourceYoutube (URL url)

Package Functions

String matcher ()
String url () throws UnsupportedEncodingException
void parse (final String[] matches) throws IOException
void buildGraph () throws IOException

Package Attributes

Pattern endOfInterestingPart = Pattern.compile(matcher())
HashSet< String > parsed = new HashSet<String>()
int subfetches = 0

Detailed Description

a utub search.

utub makes the search quite difficult, as an individual token, the movies unique url, is needed to stream the clip. those are not included in the search result page itself, and can only be obtained by parsing the single movie player pages.

so after parsing the search result, we use multithreaded subfetching to parse utub's movie pages, to obtain a token for every movie there.

Returns:
an imagefield of movies
Author:
paul

Definition at line 30 of file SourceYoutube.java.


Constructor & Destructor Documentation

org.hfbk.vis.source.SourceYoutube.SourceYoutube ( URL  url  ) 

Definition at line 42 of file SourceYoutube.java.

References org.hfbk.vis.source.Source.add(), org.hfbk.vis.source.Source.getParam(), org.hfbk.vis.source.Source.keyword, and org.hfbk.vis.source.SourceRegExp.root.

Here is the call graph for this function:


Member Function Documentation

String org.hfbk.vis.source.SourceYoutube.matcher (  )  [package, virtual]

override this to regular expression to extract data

Implements org.hfbk.vis.source.SourceRegExp.

Definition at line 51 of file SourceYoutube.java.

String org.hfbk.vis.source.SourceYoutube.url (  )  throws UnsupportedEncodingException [package, virtual]

override this to set URL of web page to parse

Implements org.hfbk.vis.source.SourceRegExp.

Definition at line 55 of file SourceYoutube.java.

References org.hfbk.vis.source.Source.getParam(), and org.hfbk.vis.source.Source.keyword.

Here is the call graph for this function:

void org.hfbk.vis.source.SourceYoutube.parse ( final String[]  matches  )  throws IOException [package]

parse search result and launch a subfetcher to aquire token needed for streaming the movie.

only aquire first 8 results.

Definition at line 69 of file SourceYoutube.java.

References org.hfbk.vis.source.Source.add(), org.hfbk.vis.source.SourceYoutube.endOfInterestingPart, org.hfbk.vis.source.Source.graph, org.hfbk.vis.source.SourceYoutube.parsed, org.hfbk.vis.source.SourceRegExp.root, org.hfbk.vis.source.Source.run(), org.hfbk.vis.source.Source.silent, and org.hfbk.vis.source.SourceYoutube.subfetches.

Here is the call graph for this function:

void org.hfbk.vis.source.SourceYoutube.buildGraph (  )  throws IOException [package, virtual]

builder needs to wait until subfetches finished.

Reimplemented from org.hfbk.vis.source.SourceRegExp.

Definition at line 98 of file SourceYoutube.java.

References org.hfbk.vis.source.SourceYoutube.subfetches.


Member Data Documentation

Pattern org.hfbk.vis.source.SourceYoutube.endOfInterestingPart = Pattern.compile(matcher()) [package]

Definition at line 32 of file SourceYoutube.java.

Referenced by org.hfbk.vis.source.SourceYoutube.parse().

HashSet<String> org.hfbk.vis.source.SourceYoutube.parsed = new HashSet<String>() [package]

set of parsed urls to filter duplicate results

Definition at line 36 of file SourceYoutube.java.

Referenced by org.hfbk.vis.source.SourceYoutube.parse().

int org.hfbk.vis.source.SourceYoutube.subfetches = 0 [package]

amount of currently running subfetches

Definition at line 39 of file SourceYoutube.java.

Referenced by org.hfbk.vis.source.SourceYoutube.buildGraph(), and org.hfbk.vis.source.SourceYoutube.parse().


The documentation for this class was generated from the following file:
Generated on Tue Apr 7 17:58:49 2009 for visclient by  doxygen 1.5.1