| Inherits from | |
|---|---|
| Declared in | NNQuery.h |
Posted when the receiver's grouping attributes have changed. NNQuery is mainly a wrapper around the NSMetadataQuery class, and shares a lot of its API. There are additional methods for manipulating the search, as NNQuery uses NNTag instances instead of directly setting the NSPredicate.
- executeSynchronousQueryForString:
- executeSynchronousQuery
- executeSynchronousQueryWithBundlingAttribute:
- init
- initWithTags:
- tags
- setTags:
- startQuery
- stopQuery
- disableUpdates
- enableUpdates
- isStarted
- isStopped
- isGathering
- resultCount
- resultAtIndex:
- results
- flatResults
- flatPlainResults
- bundlingAttributes
- setBundlingAttributes:
- filters
- setFilters:
- addFilter:
- addFilters:
- removeFilter:
- removeAllFilters
- startDate
- setStartDate:
- endDate
- setEndDate:
- filterResults:usingValues:forBundlingAttribute:newBundlingAttributes:
- hasResultsUsingFilterWithValues:forBundlingAttribute:
- hasFilter
- (NSArray *)executeSynchronousQueryForString:(NSString *)queryString Query string to execute
TaggableObjects for query string
Executes a synchronous query for the query string that will return the results immediately.
NNQuery.h- (NSArray *)executeSynchronousQueryTaggableObjects for selected tags
Executes a synchronous query that will return the results immediately.
NNQuery.h- (NSArray *)executeSynchronousQueryWithBundlingAttribute:(NSString *)attr Bundling attribute, i.e. kMDItemContentTypeTree
Bundles that contain taggableObjects for selected tags
Executes a synchronous query that will return the bundled results immediately.
NNQuery.h- (id)initNew query - use setTags: to set tags for searching
NNQuery.h- (id)initWithTags:(NNSelectedTags *)otherTags Tags to search for
NNQuery ready to search for otherTags
Designated initializer - call this one if you want to set the selected tags right away.
NNQuery.h- (NNSelectedTags *)tagsTags the query is currently prepared to search for
NNQuery.h- (void)setTags:(NNSelectedTags *)otherTags Tags to search for
NNQuery.h- (BOOL)startQueryYES when succesful, NO otherwise
Starts the query
NNQuery.h- (void)stopQueryStops the query
NNQuery.h- (void)disableUpdatesTemporarily stops the query from gathering results - use this if you e.g. want to display intermediate results.
NNQuery.h- (void)enableUpdatesReenables result gathering - use this after disableUpdates.
NNQuery.h- (BOOL)isStartedYES if query is started, NO otherwise
NNQuery.h- (BOOL)isStoppedYES if the query is stopped, NO otherwise
NNQuery.h- (BOOL)isGatheringYES if query is gathering results, NO otherwise
This returns YES if the query is started and updating was not disabled.
NNQuery.h- (NSUInteger)resultCountNumber of results currently found
NNQuery.h- (id)resultAtIndex:(NSUInteger)idx Index of the result to return
Result at position idx
NNQuery.h- (NSArray *)resultsResults that may contain a hierarchical tree of bundles or a flat list of items. This depends on the current bundling attributes.
NNQuery.h- (NSArray *)flatResultsResults as flat array
NNQuery.h- (NSMutableArray *)flatPlainResultsResults as flat unfiltered array.
NNQuery.h- (NSArray *)bundlingAttributesBundling attributes as array
NNQuery.h- (void)setBundlingAttributes:(NSArray *)attributes The new attributes to use
Sets new bundling attributes
NNQuery.h- (NSArray *)filtersArray of NNQueryFilters
NNQuery.h- (void)setFilters:(NSMutableArray *)someFilters Filters to use when executing the query
NNQuery.h- (void)addFilter:(NNQueryFilter *)filter Filter to add
Adds a filter to the query
NNQuery.h- (void)addFilters:(NSArray *)someFilters Filters to add
Adds multiple filters to the query
NNQuery.h- (void)removeFilter:(NNQueryFilter *)filter Filter to remove
Removes a filter from the query
NNQuery.h- (void)removeAllFiltersRemoves all active query filters
NNQuery.h- (NSDate *)startDatestartDate
NNQuery.h- (void)setStartDate:(NSDate *)date Start date of tagged objects to return
If a startDate is set, tagged objects will only be retrieved if they have been tagged AFTER the given date
NNQuery.h- (NSDate *)endDateendDate
NNQuery.h- (void)setEndDate:(NSDate *)date End date of tagged objects to return
If a endDate is set, tagged objects will only be retrieved if they have been tagged BEFORE the given date
NNQuery.h- (void)filterResults:(BOOL)flag usingValues:(NSArray *)filterValues forBundlingAttribute:(NSString *)attribute newBundlingAttributes:(NSArray *)newAttributes If YES filter is applied
Array of values to use for the filter, e.g. "DOCUMENTS" or "PDF"
DEPRECATED - currently supposed to be "kMDItemContentTypeTree"
DEPRECATED
TODO daniel
Applies new filter. may be set at any time even if the query is currently active. This has nothing to do with the filter methods above. filterResults: will filter gathered results, whereas the NNQueryFilters will constrain the query directly.
NNQuery.h- (BOOL)hasResultsUsingFilterWithValues:(NSArray *)filterValues forBundlingAttribute:(NSArray *)attribute Array of values to use for the filter, e.g. "DOCUMENTS" or "PDF"
Attribute to use, e.g. "kMDItemContentTypeTree"
YES if there are results, NO otherwise
Returns YES if there are results for the given filter.
NNQuery.h- (BOOL)hasFilterYES if there's currently a filter
NNQuery.hLast updated: 2010-5-13