@Override public Description getDescription() { return new Description(description); }
@Override public void setDescription(Description description) { this.description = new Description(description); }
/** * Get a default description * * @param clazz The class of the agent * @return default description */ public static Description getUninitializedDescription(Class<?> clazz) { String name = clazz.getCanonicalName(); return new Description(name, "Summary is not set.", "Example is not set."); } }
/** * Create a date-time agent */ public DateTimeAgent() { this.setDescription(new Description("date-time", SUMMARY, EXAMPLES)); }
/** * Create a Flickr agent * * @param client An http client object * @param apikey Flickr API key */ public FlickrAgent(HttpClient client, String apikey) { this.apikey = apikey; this.client = client; this.setDescription(new Description("images", SUMMARY, EXAMPLE)); this.pattern = Pattern.compile(REGEX, Pattern.CASE_INSENSITIVE); }
/** * Create a duckduckgo agent * * @param client http client */ public DuckDuckGoAgent(HttpClient client) { this.client = client; this.setDescription(new Description("general answers", SUMMARY, EXAMPLE)); }
/** * Create an echo agent */ public EchoAgent() { setDescription(new Description("echo", SUMMARY, EXAMPLE)); }
/** * Create a Rotten Tomatoes agent * * @param client An http client object * @param apikey A Rotten Tomatoes API key */ public RottenTomatoesAgent(HttpClient client, String apikey) { this.apikey = apikey; this.client = client; this.setDescription(new Description("movies", SUMMARY, EXAMPLE)); }
public CalculatorAgent() { this.setDescription(new Description("calculator", SUMMARY, EXAMPLE)); }
/** * Stock agent * * The Quandl API provides stock information for various companies world * wide. The StockAgent uses said API to scrape historical closing prices of * NASDAQ and NYSE companies. * * @param client An http client object * @param apiKey A Quandl API key */ public StockAgent(HttpClient client, String apiKey) { this.client = client; this.apiKey = apiKey; this.stockSymbolMap = new TreeMap<String, CompanyInfo>(String.CASE_INSENSITIVE_ORDER); readCsvFile("stockagent/NASDAQ_Companies.csv"); readCsvFile("stockagent/NYSE_Companies.csv"); this.setDescription(new Description("stock ticker", SUMMARY, EXAMPLE)); }