org.biomart.martservice.query.Query.getFilters()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中org.biomart.martservice.query.Query.getFilters方法的一些代码示例,展示了Query.getFilters的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getFilters方法的具体详情如下:
包路径:org.biomart.martservice.query.Query
类名称:Query
方法名:getFilters

Query.getFilters介绍

暂无

代码示例

代码示例来源:origin: net.sf.taverna.t2/biomart-activity

private void buildInputPorts() {
  List<Filter> filters = biomartQuery.getQuery().getFilters();
  // Create new input ports corresponding to filters
  for (Filter filter : filters) {
    String name = filter.getQualifiedName() + "_filter";
    if (filter.isList()) {
      addInput(name, 1, true,
          new ArrayList<Class<? extends ReferenceScheme<?>>>(),
          String.class);
    } else {
      addInput(name, 0, true,
          new ArrayList<Class<? extends ReferenceScheme<?>>>(),
          String.class);
    }
  }
}

代码示例来源:origin: net.sf.taverna.t2.activities/biomart-activity

private void buildInputPorts(List<Edit<?>> editList) {
  Map<String, ActivityInputPort> newInputMap = new HashMap<String, ActivityInputPort>();
  List<Filter> filters = biomartQuery.getQuery().getFilters();
  // Create new input ports corresponding to filters
  for (Filter filter : filters) {
    String name = filter.getQualifiedName() + "_filter";
    if (inputMap.containsKey(name)) {
      newInputMap.put(name, inputMap.remove(name));
    } else {
      ActivityInputPort inputPort = null;
      if (filter.isList()) {
        inputPort = edits.createActivityInputPort(name, 1, true,
            new ArrayList<Class<? extends ExternalReferenceSPI>>(),
            String.class);
      } else {
        inputPort = edits.createActivityInputPort(name, 0, true,
            new ArrayList<Class<? extends ExternalReferenceSPI>>(),
            String.class);
      }
      newInputMap.put(name, inputPort);
      editList.add(edits.getAddActivityInputPortEdit(this, inputPort));
      editList.add(createAddMimeTypeAnnotationEdit(inputPort, "text/plain"));
    }
  }
  //remove any ports still left in the map
  for (ActivityInputPort inputPort : inputMap.values()) {
    editList.add(edits.getRemoveActivityInputPortEdit(this, inputPort));
  }
  inputMap = newInputMap;
}

代码示例来源:origin: uk.org.mygrid.taverna.processors/taverna-biomart-processor

private void buildInputPortsFromQuery() throws PortCreationException,
    DuplicatePortNameException {
  List filters = query.getQuery().getFilters();
  Set<String> filterNames = new HashSet<String>();

代码示例来源:origin: uk.org.mygrid.taverna.processors/taverna-biomart-processor

List<Filter> filters = query.getFilters();
for (Filter filter : filters) {
  String name = filter.getQualifiedName();

代码示例来源:origin: net.sf.taverna.t2/biomart-activity

List<Filter> filters = query.getFilters();
for (Filter filter : filters) {
  String name = filter.getQualifiedName();

代码示例来源:origin: net.sf.taverna.t2.activities/biomart-activity

List<Filter> filters = query.getFilters();
for (Filter filter : filters) {
  String name = filter.getQualifiedName();

代码示例来源:origin: net.sf.taverna.t2.ui-activities/biomart-activity-ui

@Override
protected String getRawTableRowsHtml() {
  MartQuery q = MartServiceXMLHandler.elementToMartQuery(getConfigBean(), null);
  String html="<tr><td>URL</td><td>"+q.getMartService().getLocation()+"</td></tr>";
  html+="<tr><td>Location</td><td>"+q.getMartDataset().getMartURLLocation().getDisplayName() + "</td></tr>";
  boolean firstFilter=true;
  for (Filter filter : q.getQuery().getFilters()) {
    html+=firstFilter ? "<tr><td>Filter</td><td>" : "<tr><td></td></td>";
    firstFilter=false;
    html+=filter.getName()+"</td></tr>";
  }
  boolean firstAttribute=true;
  for (Attribute attribute : q.getQuery().getAttributes()) {
    html+=firstAttribute ? "<tr><td>Attribute</td><td>" : "<tr><td></td><td>";
    firstAttribute=false;
    html+=attribute.getName()+"</td></tr>";
  }
  html+="<tr><td>Dataset</td><td>"+q.getMartDataset().getDisplayName()+"</td></tr>";
  return html;
}

代码示例来源:origin: net.sf.taverna.t2.activities/biomart-activity-ui

@Override
protected String getRawTableRowsHtml() {
  MartQuery q = MartServiceXMLHandler.elementToMartQuery(getConfigBean(), null);
  String html="<tr><td>URL</td><td>"+q.getMartService().getLocation()+"</td></tr>";
  html+="<tr><td>Location</td><td>"+q.getMartDataset().getMartURLLocation().getDisplayName() + "</td></tr>";
  boolean firstFilter=true;
  for (Filter filter : q.getQuery().getFilters()) {
    html+=firstFilter ? "<tr><td>Filter</td><td>" : "<tr><td></td></td>";
    firstFilter=false;
    html+=filter.getName()+"</td></tr>";
  }
  boolean firstAttribute=true;
  for (Attribute attribute : q.getQuery().getAttributes()) {
    html+=firstAttribute ? "<tr><td>Attribute</td><td>" : "<tr><td></td><td>";
    firstAttribute=false;
    html+=attribute.getName()+"</td></tr>";
  }
  html+="<tr><td>Dataset</td><td>"+q.getMartDataset().getDisplayName()+"</td></tr>";
  return html;
}

相关文章