Creates a new search result explorer.
@name orion.SearchResultExplorer
492619
function SearchResultExplorer(registry, commandService) {
        this.registry = registry;
        this._commandService = commandService;
        this.fileClient = new mFileClient.FileClient(this.registry);
        this.defaulRows = 40;
		this._contentTypeService = new mContentTypes.ContentTypeRegistry(this.registry);
        this.declareCommands();
    }
734076
private Map<String, EdgeIteratorState> createVirtualEdgesMap(
            List<Collection<QueryResult>> queriesPerEntry, EdgeExplorer explorer) {
        // TODO For map key, use the traversal key instead of string!
        Map<String, EdgeIteratorState> virtualEdgesMap = new HashMap<>();
        for (Collection<QueryResult> queryResults : queriesPerEntry) {
            for (QueryResult qr : queryResults) {
                if (isVirtualNode(qr.getClosestNode())) {
                    EdgeIterator iter = explorer.setBaseNode(qr.getClosestNode());
                    while (iter.next()) {
                        int node = traverseToClosestRealAdj(explorer, iter);
                        if (node == qr.getClosestEdge().getAdjNode()) {
                            virtualEdgesMap.put(virtualEdgesMapKey(iter),
                                    qr.getClosestEdge().detach(false));
                            virtualEdgesMap.put(reverseVirtualEdgesMapKey(iter),
                                    qr.getClosestEdge().detach(true));
                        } else if (node == qr.getClosestEdge().getBaseNode()) {
                            virtualEdgesMap.put(virtualEdgesMapKey(iter),
                                    qr.getClosestEdge().detach(true));
                            virtualEdgesMap.put(reverseVirtualEdgesMapKey(iter),
                                    qr.getClosestEdge().detach(false));
                        } else {
                            throw new RuntimeException();
                        }
                    }
                }
            }
        }
        return virtualEdgesMap;
    }
58851
function startSearch() {
  iface.question('Enter search: ', function (query) {
    // Get the results of our query
    var matches = fileFinder.query(query),
        len = matches.length;

    // If no results were found
    if (len === 0) {
      console.log('No results found for: ' + query);
      startSearch();
    } else if (len === 1) {
      var item = matches[0];
    // If there is one, skip to go
      console.log('Opening: ' + item);
      fileFinder.open(item);

      // Begin the search again
      startSearch();
    } else {
    // Otherwise, list options
      console.log('');
      console.log('----------------');
      console.log('Search Results');
      console.log('----------------');
      for (i = 0; i < len; i++) {
        console.log(i + ': ' + matches[i]);
      }

      // Ask for a number
      iface.question('Which item would you like to open? ', function (numStr) {
        var num = +numStr,
            item;

        // If the number is not NaN and we were not given an empty string
        if (num === num && numStr !== '') {
          // and if it is in our result set
          if (num >= 0 && num < len) {
            // Open it
            item = matches[num];
            console.log('Opening: ' + item);
            fileFinder.open(item);
          }
        } else {
        // Otherwise, if there was a word in there so we are assuming it was 'rescan'
          // Rescan
          console.log('Rescanning...');
          fileFinder.scan();
        }

        // Begin the search again
        startSearch();
      });
    }
  });
}
590610
@Override
    public HandlerRegistration addSearchNoResultHandler(final SearchNoResultEvent.SearchNoResultHandler handler) {
        return addHandler(handler, SearchNoResultEvent.TYPE);
    }
462404
private void beginSearch() throws RemoteException {
        org.fcrepo.server.types.gen.FieldSearchQuery genFieldSearchQuery =
                TypeUtility.convertFieldSearchQueryToGenFieldSearchQuery(query);
        org.fcrepo.server.types.gen.FieldSearchResult searchResult =
                apia.findObjects(org.fcrepo.server.utilities.TypeUtility.convertStringtoAOS(OBJECT_RESULT_FIELDS),
                                 MAX_FIND_RESULTS,
                                 genFieldSearchQuery);
        FieldSearchResult fsr =
                TypeUtility
                        .convertGenFieldSearchResultToFieldSearchResult(searchResult);
        for (ObjectFields fields : fsr.objectFieldsList()) {
            stash.add(fields.getPid());
        }
        token = fsr.getToken();
    }
773347
public  void showBooleanActionResultInTextInfo(String title, BooleanOWLResultSet result) throws OWLException {

		AskQueryInfoSetter alter_result_panel = new AskQueryInfoSetter(title, result);
		SwingUtilities.invokeLater(alter_result_panel);
	}
147146
def create_vfs_explorer(self, uri):
        
        if not isinstance(uri, basestring):
            raise TypeError("uri can only be an instance of type basestring")
        explorer = self._call("createVFSExplorer",
                     in_p=[uri])
        explorer = IVFSExplorer(explorer)
        return explorer
535112
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users
    public static Searcher create(@NonNull final Searchable searchable) {
        final String key = searchable.toString();
        Searcher instance = instances.get(key);
        if (instance == null) {
            instance = new Searcher(searchable, key);
            instances.put(key, instance);
        } else {
            throw new IllegalStateException("There is already a Searcher for index " + key + ", you must specify a variant.");
        }
        return instance;
    }
37922
void search() {

        CmsSearchReplaceSettings settings = new CmsSearchReplaceSettings();
        settings.setSiteRoot((String)m_siteSelect.getValue());
        settings.setType((SearchType)m_searchType.getValue());
        settings.setPaths(Collections.singletonList(m_searchRoot.getValue()));
        settings.setIgnoreSubSites(m_ignoreSubSites.getValue().booleanValue());
        I_CmsResourceType type = (I_CmsResourceType)m_resourceType.getValue();
        if (type != null) {
            settings.setTypes(type.getTypeName());
        }
        if (SearchType.resourcetype.equals(m_searchType.getValue())
            | SearchType.renameContainer.equals(m_searchType.getValue())) {
            settings.setTypes(
                CmsResourceTypeXmlContainerPage.getStaticTypeName()
                    + ","
                    + CmsResourceTypeXmlContainerPage.MODEL_GROUP_TYPE_NAME);
        }

        if (SearchType.renameContainer.equals(m_searchType.getValue())) {
            try {
                CmsObject cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
                cms.getRequestContext().setSiteRoot("");
                CmsResource element = cms.readResource(m_resourceSearch.getValue());
                settings.setElementResource(element);
            } catch (CmsException e) {
                LOG.error("Can not read resource", e);
            }
        }

        if (m_replace.getValue().booleanValue()) {
            try {
                CmsProject workProject = A_CmsUI.getCmsObject().readProject((CmsUUID)m_workProject.getValue());
                settings.setProject(workProject.getName());
            } catch (CmsException e) {
                // ignore
            }
            if (SearchType.resourcetype.equals(m_searchType.getValue())) {
                try {
                    CmsObject cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
                    cms.getRequestContext().setSiteRoot("");
                    CmsResource resource = cms.readResource(m_replaceResource.getValue());
                    settings.setReplacepattern(CmsSearchReplaceSettings.replaceElementInPagePattern(resource));
                } catch (CmsException e) {
                    LOG.error("Unable to read resource.", e);
                }
            } else if (SearchType.renameContainer.equals(m_searchType.getValue())) {
                settings.setReplacepattern(m_oldName.getValue() + ";" + m_newName.getValue());
            } else {

                settings.setReplacepattern(m_replacePattern.getValue());
            }

        }

        if (SearchType.resourcetype.equals(m_searchType.getValue())
            | SearchType.renameContainer.equals(m_searchType.getValue())) {
            try {
                CmsObject cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
                cms.getRequestContext().setSiteRoot("");
                CmsResource resource = cms.readResource(m_resourceSearch.getValue());
                settings.setSearchpattern(CmsSearchReplaceSettings.searchElementInPagePattern(resource));
            } catch (CmsException e) {
                LOG.error("Unable to read resource.", e);
            }
        } else {

            settings.setSearchpattern(m_searchPattern.getValue());
        }
        if (settings.getType().isContentValuesOnly()) {
            if (m_locale.getValue() != null) {
                settings.setLocale(m_locale.getValue().toString());
            }
            settings.setXpath(m_xPath.getValue());
        }
        if (settings.getType().isSolrSearch()) {
            settings.setQuery(m_solrQuery.getValue());
            settings.setSource((String)m_searchIndex.getValue());
        }

        if (settings.getType().isPropertySearch()) {
            settings.setProperty((CmsPropertyDefinition)m_property.getValue());
            settings.setForceReplace(m_replace.getValue().booleanValue());
        }

        m_app.search(settings, true);
    }
588599
@SuppressWarnings("unchecked")
    public Document createSchemaDefinition(Map<String, Object> introspectionResult) {
        assertTrue(introspectionResult.get("__schema") != null, "__schema expected");
        Map<String, Object> schema = (Map<String, Object>) introspectionResult.get("__schema");


        Map<String, Object> queryType = (Map<String, Object>) schema.get("queryType");
        assertNotNull(queryType, "queryType expected");
        TypeName query = TypeName.newTypeName().name((String) queryType.get("name")).build();
        boolean nonDefaultQueryName = !"Query".equals(query.getName());

        SchemaDefinition.Builder schemaDefinition = SchemaDefinition.newSchemaDefinition();
        schemaDefinition.operationTypeDefinition(OperationTypeDefinition.newOperationTypeDefinition().name("query").typeName(query).build());

        Map<String, Object> mutationType = (Map<String, Object>) schema.get("mutationType");
        boolean nonDefaultMutationName = false;
        if (mutationType != null) {
            TypeName mutation = TypeName.newTypeName().name((String) mutationType.get("name")).build();
            nonDefaultMutationName = !"Mutation".equals(mutation.getName());
            schemaDefinition.operationTypeDefinition(OperationTypeDefinition.newOperationTypeDefinition().name("mutation").typeName(mutation).build());
        }

        Map<String, Object> subscriptionType = (Map<String, Object>) schema.get("subscriptionType");
        boolean nonDefaultSubscriptionName = false;
        if (subscriptionType != null) {
            TypeName subscription = TypeName.newTypeName().name(((String) subscriptionType.get("name"))).build();
            nonDefaultSubscriptionName = !"Subscription".equals(subscription.getName());
            schemaDefinition.operationTypeDefinition(OperationTypeDefinition.newOperationTypeDefinition().name("subscription").typeName(subscription).build());
        }

        Document.Builder document = Document.newDocument();
        if (nonDefaultQueryName || nonDefaultMutationName || nonDefaultSubscriptionName) {
            document.definition(schemaDefinition.build());
        }

        List<Map<String, Object>> types = (List<Map<String, Object>>) schema.get("types");
        for (Map<String, Object> type : types) {
            TypeDefinition typeDefinition = createTypeDefinition(type);
            if (typeDefinition == null) continue;
            document.definition(typeDefinition);
        }

        return document.build();
    }
1168963
def create_for(line, search_result):
    '''
    '''
    try:
        return line.format(search_result.group("indented_for"),
                           search_result.group("var"),
                           search_result.group("start"),
                           search_result.group("stop"),
                           search_result.group("cond"))
    except IndexError:
        return line.format(search_result.group("indented_for"),
                           search_result.group("var"),
                           search_result.group("start"),
                           search_result.group("stop"))
658814
function onFilterResults(e) {
    var frag         = Y.one(Y.config.doc.createDocumentFragment()),
        resultNode   = getFilterResultNode(),
        typePlural   = filter.get('queryType'),
        typeSingular = typePlural === 'classes' ? 'class' : 'module';

    if (e.results.length) {
        YArray.each(e.results, function (result) {
            frag.append(Lang.sub(LIST_ITEM_TEMPLATE, {
                rootPath    : APIList.rootPath,
                displayName : filter.getDisplayName(result.highlighted),
                name        : result.text,
                typePlural  : typePlural,
                typeSingular: typeSingular
            }));
        });
    } else {
        frag.append(
            '<li class="message">' +
                'No ' + typePlural + ' found.' +
            '</li>'
        );
    }

    resultNode.empty(true);
    resultNode.append(frag);

    focusManager.refresh();
}
1008221
@Override
    public IterableResult<Extension> search(ExtensionQuery query) throws SearchException
    {
        return RepositoryUtils.search(query, this.repositories);
    }
278460
def fromDiscoveryResult(cls, discoveryResult):
        
        if discoveryResult.isXRDS():
            method = cls.fromXRDS
        else:
            method = cls.fromHTML
        return method(discoveryResult.normalized_uri,
                      discoveryResult.response_text)
1340207
private void initializeSearchTextListener() {
    searchText.addListener((observable, oldText, newText) -> {
      if (newText.equals("")) { // empty search -> doesn't match anything!
        resetSearch();
      } else {
        updateSearch(newText);
      }
    });
  }
274622
public void addSearchResult(CaptureSearchResult result, boolean append) {
		String resultDate = result.getCaptureTimestamp();
		if ((firstResultTimestamp == null) ||
				(firstResultTimestamp.compareTo(resultDate) > 0)) {
			firstResultTimestamp = resultDate;
		}
		if ((lastResultTimestamp == null) ||
				(lastResultTimestamp.compareTo(resultDate) < 0)) {
			lastResultTimestamp = resultDate;
		}

		if (append) {

			if (!results.isEmpty()) {
				results.getLast().setNextResult(result);
				result.setPrevResult(results.getLast());
			}

			results.add(result);
		} else {
			if (!results.isEmpty()) {
				results.getFirst().setPrevResult(result);
				result.setNextResult(results.getFirst());
			}

			results.add(0, result);
		}
	}
1335355
public void addResultCollector(ResultCollector<?, DPO> resultCollector) {
        if (resultCollector != null) {
            addTrigger(resultCollector);
            addDataProvider(resultCollector);
        }
    }