@Override public EnhancementEngine getEngine(String name){ ServiceReference ref = getReference(name); return ref == null ? null : (EnhancementEngine)nameTracker.getService(ref); } /*
@Override public Chain getChain(String name){ ServiceReference ref = getReference(name); return ref == null ? null : (Chain)nameTracker.getService(ref); } /*
@Override public Chain getDefault() { Chain chain = getChain(DEFAULT_CHAIN_NAME); if(chain == null){ chain = (Chain)nameTracker.getService(); } return chain; } /**
/** * The deactivate method. * * @param ce the {@link ComponentContext} */ protected void deactivate(ComponentContext ce) { super.deactivate(ce); this.htmlParser = null; this.htmlExtractorRegistry = null; }
@Override protected void deactivate(ComponentContext ctx) { tracker.close(); tracker = null; chainScopedEnhProps = null; chain = null; super.deactivate(ctx); } @Override
/** * Internally used to create {@link ContentSource} instanced for the * MimeType parsing tests */ private static ContentSource createContentSource(String mimeType){ return new ByteArraySource(content, mimeType); }
/** * Getter for the map with the names and the {@link ServiceReference} of the * engine with the highest priority for that name. * @return the map with the names and {@link ServiceReference}s of all * currently active and tracked engines */ public Map<String,ServiceReference> getActiveEngineReferences(){ return nameTracker.getActive(); } /*
/** * Closes this tracker */ public void close(){ nameTracker.close(); nameTracker = null; } /**
@Override public Set<String> getActiveEngineNames(){ return nameTracker.getNames(); } /**
/** * Starts tracking based on the configuration parsed in the constructor */ public void open(){ nameTracker.open(); } /**
protected void deactivate(ComponentContext ce) { super.deactivate(ce); this.languageIdentifier = null; this.maxSuggestedLanguages = -1; this.probeLength = -1; }
@Override public EnhancementEngine getEngine(String name){ ServiceReference ref = getReference(name); return ref == null ? null : (EnhancementEngine)nameTracker.getService(ref); } /*
@Override public Chain getChain(String name){ ServiceReference ref = getReference(name); return ref == null ? null : (Chain)nameTracker.getService(ref); } /*
@Override public Chain getDefault() { Chain chain = getChain(DEFAULT_CHAIN_NAME); if(chain == null){ chain = (Chain)nameTracker.getService(); } return chain; } /**
/** * Getter for the map with the names and the {@link ServiceReference} of the * engine with the highest priority for that name. * @return the map with the names and {@link ServiceReference}s of all * currently active and tracked engines */ public Map<String,ServiceReference> getActiveEngineReferences(){ return nameTracker.getActive(); } /*
/** * Closes this tracker */ public void close(){ nameTracker.close(); nameTracker = null; } /**
@Override public Set<String> getActiveChainNames(){ return nameTracker.getNames(); } /**
@Override protected void deactivate(ComponentContext ctx) throws RuntimeException { this.config = null; this.parser = null; this.detector = null; this.skipLinebreaks = DEFAULT_SKIP_LINEBREAKS; this.ontologyMappings = null; super.deactivate(ctx); } private static boolean getBoolean(Dictionary<?,?> properties, String key, boolean defaultState){
/** * Getter for the map with the names and the {@link ServiceReference} of the * chain with the highest priority for that name. * @return the map with the names and {@link ServiceReference}s of all * currently active and tracked chains */ public Map<String,ServiceReference> getActiveChainReferences(){ return nameTracker.getActive(); } /*
/** * Closes this tracker */ public void close(){ nameTracker.close(); nameTracker = null; } /**