| abstractRobotGenerator |
package Sight.Generators;
import Sight.Agents.*;
import java.util.Map;
import java.lang.ref.Reference;
/**
* Interface for the abstract robot generator. Custom robot generator can be added by
* implementing this interface.
*
* This interface is very general. The implementing class must provide its own GUI
* interface for displaying the provided content, performing different marking
* and initiating the generation process. There are no any restrictions on
* the code being generated. However if the generated agent is planned to use
* inside the Sight system, it must be descenent of Agents.sightGeneratedAgent .
*/
public interface abstractRobotGenerator {
/** Add the text example for this robot generator, providing
* also all returned http headers, encloses in the response
* object. The base url is used, when possible, to resolve
* relative links inside the document.
* The String field .data contains the text of the html
* document. In the current Sight version, it is recommended
* just to delegate the call to addSample(CharSequence html, String base):
* addSample(response.data, base).
*/
public abstract void addSample(ServerResponse response, String base);
/** Add the text example for this robot generator.
* The base url is used, when possible, to resolve
* relative links inside the document.
*/
public abstract void addSample(CharSequence html, String base);
/** Set information about the agent to be
* created. Immediatly before the generation
* (not earlier) the generator must obtain
* the data map by calling the getForm() method
* of the supplied form provider.
* The Form object provides information about the submission form
* and other agent parameters.
*/
void setFormProvider(formProvider f);
/** Get additional information about this generator.
* It is allowed for this method to return null.
* Then the header will be the name of the implementing
* class, and it will be supposed, that multiple
* samples are not supported.
* The currently defined required objects are:
* <ol>
* <li>String header. The header, defining this generator,
* will be display in the different dialogs from the
* main Sight environment.</li>
* <li>Boolean multiple_samples</i>. If set to
* true, this means that the generator accepts multiple sample submissions.</li>
* </ol>*/
Map getGeneratorDescrption();
}
| abstractRobotGenerator |