Tabnine Logo
LocalManager$ModuleManager
Code IndexAdd Tabnine to your IDE (free)

How to use
LocalManager$ModuleManager
in
org.terrier.querying

Best Java code snippets using org.terrier.querying.LocalManager$ModuleManager (Showing top 16 results out of 315)

origin: terrier-org/terrier-core

/** parses the controls hashtable, looking for references to controls, and returns the appropriate
 * postfilters to be run. */
Iterator<K> getActiveIterator(Map<String,String> controls) {
  //TODO this implementation should check if controls have been updated since the iterator was created.
  return getActive(controls).iterator();
}

origin: org.terrier/terrier-core

((LocalManager)manager).processModuleManager.getModule(q.getControl("previousprocess")).process(manager, q);
origin: terrier-org/terrier-core

/** load in the allowed post filter controls, and the order to run post processes in */
protected void load_module_controls()
{
  if (ApplicationSetup.getProperty("querying."+typeName, "").length() == 0 
      && ApplicationSetup.getProperty("querying."+typeName+".order", "").length() > 0)
  {
    load_module_controls_old();
    return;
  }
  String[] control_pf;
  List<String> _Class_Order = new ArrayList<>();
  List<String[]> _controls = new ArrayList<>();
  String tmp = ApplicationSetup.getProperty("querying."+typeName, "").trim();
  if (tmp.length() > 0)
    control_pf = tmp.split("\\s*,\\s*");
  else
    control_pf = new String[0];
  for(String pair : control_pf)
  {
    String[] tuple = pair.split(":", 2);
    _Class_Order.add(tuple[1]);
    _controls.add(new String[]{tuple[0]});
  }
  Class_Order = _Class_Order.toArray(new String[0]);
  Class_Controls = _controls.toArray(new String[0][]);
  
}

origin: org.terrier/terrier-core

@Override
public void process(Manager manager, Request rq) {
  PostFilter[] filters = postfilterModuleManager.getActive(rq.getControls()).toArray(new PostFilter[0]);
  final int filters_length = filters.length;
origin: terrier-org/terrier-core

@Override
public void process(Manager manager, Request rq) {
  PostFilter[] filters = postfilterModuleManager.getActive(rq.getControls()).toArray(new PostFilter[0]);
  final int filters_length = filters.length;
origin: terrier-org/terrier-core

((LocalManager)manager).processModuleManager.getModule(q.getControl("previousprocess")).process(manager, q);
origin: terrier-org/terrier-core

logger.debug(rq.getControls().toString());
if (processModuleManager.getSize() == 0)
Iterator<Process> iter = processModuleManager.getActiveIterator(rq.getControls());
List<String> processesDone = new ArrayList<String>();
int ran = 0;
origin: org.terrier/terrier-core

logger.debug(rq.getControls().toString());
if (processModuleManager.getSize() == 0)
Iterator<Process> iter = processModuleManager.getActiveIterator(rq.getControls());
List<String> processesDone = new ArrayList<String>();
int ran = 0;
origin: org.terrier/terrier-core

List<K> getActive(Map<String,String> controls) {
  List<K> classes = new ArrayList<>();
  for(int i=0; i<Class_Order.length; i++)
  {
    String PostFilter_Name = Class_Order[i];
    for(int j=0; j<Class_Controls[i].length; j++)
    {
      String ControlName = Class_Controls[i][j];
      String value = (String)controls.get(ControlName);
      if (logger.isDebugEnabled()){
        logger.debug(ControlName+ "("+PostFilter_Name+") => "+value);
      }
      if (value == null)
        continue;
      value = value.toLowerCase();
      if(! (value.equals("off") || value.equals("false")))
      {
        classes.add(getModule(PostFilter_Name));
        //we've now run this post process module, no need to check the rest of the controls for it.
        break;
      }
    }
  }
  return classes;
}

origin: org.terrier/terrier-core

/** load in the allowed post filter controls, and the order to run post processes in */
protected void load_module_controls()
{
  if (ApplicationSetup.getProperty("querying."+typeName, "").length() == 0 
      && ApplicationSetup.getProperty("querying."+typeName+".order", "").length() > 0)
  {
    load_module_controls_old();
    return;
  }
  String[] control_pf;
  List<String> _Class_Order = new ArrayList<>();
  List<String[]> _controls = new ArrayList<>();
  String tmp = ApplicationSetup.getProperty("querying."+typeName, "").trim();
  if (tmp.length() > 0)
    control_pf = tmp.split("\\s*,\\s*");
  else
    control_pf = new String[0];
  for(String pair : control_pf)
  {
    String[] tuple = pair.split(":", 2);
    _Class_Order.add(tuple[1]);
    _controls.add(new String[]{tuple[0]});
  }
  Class_Order = _Class_Order.toArray(new String[0]);
  Class_Controls = _controls.toArray(new String[0][]);
  
}

origin: terrier-org/terrier-core

List<K> getActive(Map<String,String> controls) {
  List<K> classes = new ArrayList<>();
  for(int i=0; i<Class_Order.length; i++)
  {
    String PostFilter_Name = Class_Order[i];
    for(int j=0; j<Class_Controls[i].length; j++)
    {
      String ControlName = Class_Controls[i][j];
      String value = (String)controls.get(ControlName);
      if (logger.isDebugEnabled()){
        logger.debug(ControlName+ "("+PostFilter_Name+") => "+value);
      }
      if (value == null)
        continue;
      value = value.toLowerCase();
      if(! (value.equals("off") || value.equals("false")))
      {
        classes.add(getModule(PostFilter_Name));
        //we've now run this post process module, no need to check the rest of the controls for it.
        break;
      }
    }
  }
  return classes;
}

origin: org.terrier/terrier-concurrent

@SuppressWarnings("unchecked")
@Override
List<K> getActive(Map<String, String> controls) {
  List<K> rtr = super.getActive(controls);
  rtr.replaceAll(clz -> 
  {    
    if ((clz instanceof ApplyLocalMatching) && !( clz instanceof TSApplyLocalMatching) )
      return (K) tslm;
    if ((clz instanceof PostFilterProcess) && !( clz instanceof TSPostFilterProcess) )
      return (K) tspfp;
    return clz;
  });
  return rtr;
}

origin: terrier-org/terrier-core

@SuppressWarnings("unchecked")
@Override
List<K> getActive(Map<String, String> controls) {
  List<K> rtr = super.getActive(controls);
  rtr.replaceAll(clz -> 
  {    
    if ((clz instanceof ApplyLocalMatching) && !( clz instanceof TSApplyLocalMatching) )
      return (K) tslm;
    if ((clz instanceof PostFilterProcess) && !( clz instanceof TSPostFilterProcess) )
      return (K) tspfp;
    return clz;
  });
  return rtr;
}

origin: terrier-org/terrier-core

ModuleManager(String _typeName, String namespace, boolean _caching){
  super(namespace, _caching);
  this.typeName = _typeName;
  this.load_module_controls();
  //System.err.println(Arrays.deepToString(Class_Controls));
}

origin: org.terrier/terrier-core

ModuleManager(String _typeName, String namespace, boolean _caching){
  super(namespace, _caching);
  this.typeName = _typeName;
  this.load_module_controls();
  //System.err.println(Arrays.deepToString(Class_Controls));
}

origin: org.terrier/terrier-core

/** parses the controls hashtable, looking for references to controls, and returns the appropriate
 * postfilters to be run. */
Iterator<K> getActiveIterator(Map<String,String> controls) {
  //TODO this implementation should check if controls have been updated since the iterator was created.
  return getActive(controls).iterator();
}

org.terrier.queryingLocalManager$ModuleManager

Javadoc

Class that keeps a cache of queries, and helps parse controls to identify them

Most used methods

  • getActive
  • getActiveIterator
    parses the controls hashtable, looking for references to controls, and returns the appropriate postf
  • getModule
  • getSize
  • load_module_controls
    load in the allowed post filter controls, and the order to run post processes in
  • load_module_controls_old
    load in the allowed post filter controls, and the order to run post processes in

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now