
org.openidex.search.SearchGroup Maven / Gradle / Ivy
The newest version!
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.openidex.search;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.*;
import org.openide.filesystems.FileObject;
import org.openide.loaders.DataObject;
import org.openide.nodes.Node;
/**
* Class which groups individual search types. It provides several services
* to provide search on them. The services are scanning node system to
* provide search object for group of search types -> efficient search.
*
* @author Peter Zavadsky
* @author Marian Petras
*/
public abstract class SearchGroup {
/**
* Property name which is fired when performing search and searched object
* passed criteria.
*/
public static final String PROP_FOUND = "org.openidex.search.found"; // NOI18N
/**
* Property name which is fired for in for the case original node
's has
* changed the way result
was changed based on set criteria.
* Interested listeners should then get the event with values
*
* - property change name = PROP_RESULT
*
- property source = this search type instance
*
- old value = detail which was changed or
null
there wasn't before for the node -> new value has to be non-null
* for the latter case.
* - new value = detail which was changed or null if the node was removed from the result -> old value has to be non-null
* for that case
*
* This allows implementation of the dynamic changing of result suggested
* by Jesse and Sebastian (at least partially implemented now).
*/
public static final String PROP_RESULT = "org.openidex.search.result"; // NOI18N
/** Property change support. */
private PropertyChangeSupport propChangeSupport;
/** search types added to this search group */
protected SearchType[] searchTypes = new SearchType[0];
/** Set of nodes on which sub-system to search. */
protected final Set searchRoots = new HashSet(5);
/** Set of objects which passed the search criteria (searchtypes).*/
protected final Set
© 2015 - 2025 Weber Informatics LLC | Privacy Policy