Skip to content

Commit

Permalink
Fixed bad commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdDuarte committed Jun 23, 2016
1 parent 7054b41 commit 0634468
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import com.edduarte.vokter.parser.Parser;
import com.edduarte.vokter.parser.ParserPool;
import com.edduarte.vokter.util.PluginLoader;
import com.edduarte.vokter.util.OSGiManager;
import com.google.common.base.Stopwatch;
import com.mongodb.DB;
import com.optimaize.langdetect.LanguageDetector;
Expand Down Expand Up @@ -175,7 +175,7 @@ public Document build(DB occurrencesDB, ParserPool parserPool) {


// step 2) Checks if the input document is supported by the server
boolean isSupported = PluginLoader.getCompatibleReader(input.getContentType()) != null;
boolean isSupported = OSGiManager.getCompatibleReader(input.getContentType()) != null;
if (!isSupported) {
logger.info("Ignored processing document '{}': No compatible readers available for content-type '{}'.",
input.getUrl(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.edduarte.vokter.stemmer.Stemmer;
import com.edduarte.vokter.stopper.FileStopper;
import com.edduarte.vokter.stopper.Stopper;
import com.edduarte.vokter.util.PluginLoader;
import com.edduarte.vokter.util.OSGiManager;
import com.google.common.base.Optional;
import com.mongodb.DB;
import com.optimaize.langdetect.LanguageDetector;
Expand Down Expand Up @@ -95,7 +95,7 @@ public Document call() throws Exception {
String url = documentInput.getUrl();

// reads and parses contents from input content stream
Class<? extends Reader> readerClass = PluginLoader
Class<? extends Reader> readerClass = OSGiManager
.getCompatibleReader(documentInput.getContentType());
Reader reader = readerClass.newInstance();
MutableString content = reader.readDocumentContents(documentStream);
Expand Down Expand Up @@ -155,12 +155,12 @@ public Document call() throws Exception {
Stemmer stemmer = null;
if (isStemmingEnabled) {
Class<? extends Stemmer> stemmerClass =
PluginLoader.getCompatibleStemmer(languageCode);
OSGiManager.getCompatibleStemmer(languageCode);
if (stemmerClass != null) {
stemmer = stemmerClass.newInstance();
} else {
// if no compatible stemmers were found, use the english stemmer
stemmerClass = PluginLoader.getCompatibleStemmer("en");
stemmerClass = OSGiManager.getCompatibleStemmer("en");
if (stemmerClass != null) {
stemmer = stemmerClass.newInstance();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.edduarte.vokter.stemmer.Stemmer;
import com.edduarte.vokter.stopper.FileStopper;
import com.edduarte.vokter.stopper.Stopper;
import com.edduarte.vokter.util.PluginLoader;
import com.edduarte.vokter.util.OSGiManager;
import com.google.common.base.Optional;
import com.optimaize.langdetect.LanguageDetector;
import com.optimaize.langdetect.i18n.LdLocale;
Expand Down Expand Up @@ -118,12 +118,12 @@ public Keyword call() throws Exception {
// if the detected language is not supported, stemming is ignored
Stemmer stemmer = null;
if (isStemmingEnabled) {
Class<? extends Stemmer> stemmerClass = PluginLoader.getCompatibleStemmer(languageCode);
Class<? extends Stemmer> stemmerClass = OSGiManager.getCompatibleStemmer(languageCode);
if (stemmerClass != null) {
stemmer = stemmerClass.newInstance();
} else {
// if no compatible stemmers were found, use the english stemmer
stemmerClass = PluginLoader.getCompatibleStemmer("en");
stemmerClass = OSGiManager.getCompatibleStemmer("en");
if (stemmerClass != null) {
stemmer = stemmerClass.newInstance();
}
Expand Down

0 comments on commit 0634468

Please sign in to comment.