developers > how to integrate
You can integrate combinFormation (cF) into any website and any application. You can do this by defining/designing a set of starting points that combinFormation's agents will use to develop a recombinant informationscape of relevant content. This can be done by specifying particular web addresses or searches or a composition that you've previously created. The starting points are called seeds. You use the seeding language to specify them. The seeding language enables you to affect how the agents work.
You will pass a set of seeds to combinFormation through
ecologylab.services
.
We have created an AJAX-like framework for communicating between the web browser
and combinFormation. This method is used to pass expressions in the
seeding language from the web browser to combinFormation.
The browser act as a client, while combinFormation acts as a services server.
To deal with
The same socket-based mechanism can
be used to control combinFormation from from other applications.
In order to access this functionality, you will need to use the combinFormation developer SDKs. To integrate into a web application you need to integrate our JavaScript SDK into your HTML file. An example is provided, which puts this all together.
To integrate combinFormation into a Java program, you will need our Java SDK. For other languages, you can pass XML directly through a socket. Contact us for more information.
cF seeding language
The cF Seedding language is an XML-based language for specifying seeds, which are used to initiate a mixed-initiative composition. The seeds tell the information collecting agent in combinFormation what to collect, and how. Each seed could be a search with one the various supported search engines, a plain web address (URL), an RSS feed, or a local file directory path. Or it could contain special directives to the agent. The purpose of the cF Seeding Language is to help you control the operations of the agent, including the web crawler, and the model of interest. Any number of seeds can be specified to start a session.Crawling the web, the agent may encounter noisy content, which would lead to noisy informatin displays. For this reason, when the user specifices the "stay close" option at startup, the web crawler information collecting agent will only traverse links to pages that are down within a web site. In this case, it will ignore cross-links to other sites.
Thus, in the "stay close" mode of operations, some web addresses are considered traversable. The directory containing any page specified in a site seed, or that is returned directly by a search is automatically registered as a traversable seed. Traversablity can also be specified with directives to the crawler.
The seeding language is a dialect of XML.
A set of seeds is wrapped with a <seed_set>
XML element. It constitutes the specification for a mix to be
performed by the combinFormation agents.
web site or rss feed
Example:search
Example:traversable
Example:web_address_prefix
, in this case,
http://ecologylab.cs.tamu.edu/research/
that it is allowed to crawl to them.
Unlike an unmodified web_address, the crawler will not download from here
to start with.
untraversable
The opposite of traversable. Tells the web crawler that when it finds links that begin with thisweb_address_prefix
, that it is NOT allowed to crawl to
them (when the user selects the stay close option).
reject
Example:justcrawl
Download fromweb_address
and add it to
traversable, like a plain seed.
But dont actually use any media from the inital document. only get links to crawl
to from it.
Example:
justmedia
The opposite ofjustfollow
. Download the page and add it to
traversable, like a plain seed. Get media from the page, but dont
crawl any of the <a href hyperlinks found in the page.
Example:
composition
This is for accessing a saved and published combinFormation composition byweb_address
published on a web server.
Published compositions can be mixed with other seeds.
cF Java SDK
The Java SDK is included in the ecologylab.xml release . We provide the example code (ecologylab.tutorials.CFServicesClientExample.java) to send seeds to combinFormation using
ecologylab.services
.
Launch combinFormation by opening the JNLP file, and then send seeds
using the Ecologylab Services Client.
cF JavaScript SDK
To use the cF JavaScript SDK:
- Ask us for the cF javacript sdk through feedback.
- Create your HTML page based on the following example.
Here is a simple example of how to launch cF with the JavaScript SDK. Note that you must set-up the SDK javascript files, and fix the paths below to match where you put them, relative to your launch page. You must also set-up the IFRAME structure as shown, at the bottom.
Note well: Only one instance of cF may run on a client machine at one time. The SDK functions will check to see whether cF is already running or not using customized ping request. If you try to launch when already running, the library will send more seeds to mix into the existing combinFormation composition space.
<script language="JavaScript" src="http://ecologylab.cs.tamu.edu/code/javascript/common/BrowserSense.js"> </script>
<script language="JavaScript" src="http://ecologylab.cs.tamu.edu/code/javascript/common/GeneralPurpose.js"> </script>
<script language="JavaScript" src="http://ecologylab.cs.tamu.edu/code/javascript/common/xml.js"> </script>
<script language="JavaScript" src="http://ecologylab.cs.tamu.edu/code/javascript/common/cookie.js"> </script>
<script language="JavaScript" src="http://ecologylab.cs.tamu.edu/code/javascript/common/launch.js"> </script>
<script language="JavaScript" src="http://ecologylab.cs.tamu.edu/code/javascript/combinformation/prefs.js"> </script>
<script language="JavaScript" src="http://ecologylab.cs.tamu.edu/code/javascript/combinformation/seeding.js"> </script>
<script language="JavaScript" src="http://ecologylab.cs.tamu.edu/code/javascript/combinformation/cfLaunch.js"> </script>
<script language="JavaScript" src="http://ecologylab.cs.tamu.edu/code/javascript/combinformation/combinformation.js"> </script>
<script language="JavaScript">
/*
* Create a seed for a search query for "apple" with the "google" engine.
* Launch combinFormaiton using this seed.
* This function is defined in seeding.js, which is included above.
* Look there for other convenience functions for creating seeds.
*/
function emitSeeding()
{
var seedSet = xmlDoc.createElement("seed_set");
var thatTypeName = "google";
var searchSeed = createSearchSeed("apple", "google");
seedSet.appendChild(searchSeed);
var docSeed = createDocumentSeed("http://rss.cnn.com/rss/cnn_topstories.rss");
seedSet.appendChild(docSeed);
launchCF(seedSet);
}
</script>
<body>
<div class="buttons_area">
<div id="launch_controls">
<input class="launch_button" type="button" value=" Launch combinFormation "onClick="emitSeeding();" name="launch_button">
</div>
</div>
<div class="tight_line"> </div>
<div onclick="clearStatus()" id="progress_console"> </div>
<div class="iframe_holder">
<iframe name="ping" src="white.html" frameborder="0" scrolling="no"> </iframe>
<iframe name="seeding" src="white.html" frameborder="0" scrolling="no"> </iframe>
<iframe name="cf_jnlp" class="jnlp" src="nearBlack.html" frameborder="0" scrolling="no"> </iframe>
</div>