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

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

本文整理了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

  1. private void buildInputPorts() {
  2. List<Filter> filters = biomartQuery.getQuery().getFilters();
  3. // Create new input ports corresponding to filters
  4. for (Filter filter : filters) {
  5. String name = filter.getQualifiedName() + "_filter";
  6. if (filter.isList()) {
  7. addInput(name, 1, true,
  8. new ArrayList<Class<? extends ReferenceScheme<?>>>(),
  9. String.class);
  10. } else {
  11. addInput(name, 0, true,
  12. new ArrayList<Class<? extends ReferenceScheme<?>>>(),
  13. String.class);
  14. }
  15. }
  16. }

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

  1. private void buildInputPorts(List<Edit<?>> editList) {
  2. Map<String, ActivityInputPort> newInputMap = new HashMap<String, ActivityInputPort>();
  3. List<Filter> filters = biomartQuery.getQuery().getFilters();
  4. // Create new input ports corresponding to filters
  5. for (Filter filter : filters) {
  6. String name = filter.getQualifiedName() + "_filter";
  7. if (inputMap.containsKey(name)) {
  8. newInputMap.put(name, inputMap.remove(name));
  9. } else {
  10. ActivityInputPort inputPort = null;
  11. if (filter.isList()) {
  12. inputPort = edits.createActivityInputPort(name, 1, true,
  13. new ArrayList<Class<? extends ExternalReferenceSPI>>(),
  14. String.class);
  15. } else {
  16. inputPort = edits.createActivityInputPort(name, 0, true,
  17. new ArrayList<Class<? extends ExternalReferenceSPI>>(),
  18. String.class);
  19. }
  20. newInputMap.put(name, inputPort);
  21. editList.add(edits.getAddActivityInputPortEdit(this, inputPort));
  22. editList.add(createAddMimeTypeAnnotationEdit(inputPort, "text/plain"));
  23. }
  24. }
  25. //remove any ports still left in the map
  26. for (ActivityInputPort inputPort : inputMap.values()) {
  27. editList.add(edits.getRemoveActivityInputPortEdit(this, inputPort));
  28. }
  29. inputMap = newInputMap;
  30. }

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

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

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

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

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

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

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

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

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

  1. @Override
  2. protected String getRawTableRowsHtml() {
  3. MartQuery q = MartServiceXMLHandler.elementToMartQuery(getConfigBean(), null);
  4. String html="<tr><td>URL</td><td>"+q.getMartService().getLocation()+"</td></tr>";
  5. html+="<tr><td>Location</td><td>"+q.getMartDataset().getMartURLLocation().getDisplayName() + "</td></tr>";
  6. boolean firstFilter=true;
  7. for (Filter filter : q.getQuery().getFilters()) {
  8. html+=firstFilter ? "<tr><td>Filter</td><td>" : "<tr><td></td></td>";
  9. firstFilter=false;
  10. html+=filter.getName()+"</td></tr>";
  11. }
  12. boolean firstAttribute=true;
  13. for (Attribute attribute : q.getQuery().getAttributes()) {
  14. html+=firstAttribute ? "<tr><td>Attribute</td><td>" : "<tr><td></td><td>";
  15. firstAttribute=false;
  16. html+=attribute.getName()+"</td></tr>";
  17. }
  18. html+="<tr><td>Dataset</td><td>"+q.getMartDataset().getDisplayName()+"</td></tr>";
  19. return html;
  20. }

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

  1. @Override
  2. protected String getRawTableRowsHtml() {
  3. MartQuery q = MartServiceXMLHandler.elementToMartQuery(getConfigBean(), null);
  4. String html="<tr><td>URL</td><td>"+q.getMartService().getLocation()+"</td></tr>";
  5. html+="<tr><td>Location</td><td>"+q.getMartDataset().getMartURLLocation().getDisplayName() + "</td></tr>";
  6. boolean firstFilter=true;
  7. for (Filter filter : q.getQuery().getFilters()) {
  8. html+=firstFilter ? "<tr><td>Filter</td><td>" : "<tr><td></td></td>";
  9. firstFilter=false;
  10. html+=filter.getName()+"</td></tr>";
  11. }
  12. boolean firstAttribute=true;
  13. for (Attribute attribute : q.getQuery().getAttributes()) {
  14. html+=firstAttribute ? "<tr><td>Attribute</td><td>" : "<tr><td></td><td>";
  15. firstAttribute=false;
  16. html+=attribute.getName()+"</td></tr>";
  17. }
  18. html+="<tr><td>Dataset</td><td>"+q.getMartDataset().getDisplayName()+"</td></tr>";
  19. return html;
  20. }

相关文章