All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.antidot.api.search.BasicTextFormatter Maven / Gradle / Ivy

The newest version!
package net.antidot.api.search;


/** Basic string formatter.
 * 

* Simple formatter which add <strong> tags around highlighted words. *

* For example, if specific word 'foo' is looked for through Antidot search engine, * this word will be highlighted in title and abstract of the results. *

* It is highly recommended to implement your own formatter for better word highlighting. */ public class BasicTextFormatter implements TextFormatter { /* (non-Javadoc) * @see net.antidot.api.search.TextFormatter#text(java.lang.String) */ public String text(String input) { return input; } /* (non-Javadoc) * @see net.antidot.api.search.TextFormatter#match(java.lang.String) */ public String match(String input) { return "" + input + ""; } /* (non-Javadoc) * @see net.antidot.api.search.TextFormatter#trunc() */ public String trunc() { return "…"; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy