WebLab Source Connector

From WebLab Wiki
Revision as of 13:35, 23 May 2012 by Gdupont (talk | contribs)
Jump to navigationJump to search

In order to start processing content, one should obviously get content from a source. Whatever the source is and whatever the content is, the WebLab platform hides it behind the Queue Manager generic interface. It stands simply for what it is and acts as a simple queue that produce resources to be processed one by one. The only method accessible is nextResource() which either return the next Resource or throw an exception when the queue is finished.

TODO: This part has to be completed.

See Category:TODO for more information about using this template.


Basic implementation

In order to explain the basic implementation, we will take the example of a simple connector to an existing file system. Thus the objective for the connector is to produce one by one the files contained. Thus on each call to the nextResource() method, the service will:

  1. build an XML description of the file with at least:
  • a unique identifier which will be the resource URI;
  • an annotation to link the weblab resource to its original source.
  1. upload the content of the file to the content repository of the application;
  2. add in the XML description the link (ie URL) to the content uploaded;
  3. send back the resource XML as answer to the call.

Thus the final returned XML will look like:

Advanced implementation

Special cases

Existing search service


JAVA sample