NNTagging Reference Library

NNTagToFileWriter Class Reference

NNTagToFileWriter Class Reference

Inherits from
Declared in NNTagToFileWriter.h

Overview

Abstract class

This abstract class provides the interface for all TagToFile writers.

Tasks

Instance Methods

allTaggedObjects

- (NSArray *)allTaggedObjects
Return Value

All objects tagged with this TagToFileWriter

Discussion

Abstract method.

Declared In
NNTagToFileWriter.h

writeTags:toFile:

- (BOOL)writeTags:(NSArray *)tags toFile:(NNFile *)file
Parameters
tags

Array of NNTags to write to file

file

File to write the tags to

Return Value

YES if tags were written successfully, NO otherwise

Discussion

Abstract method.

Writes all given tags to the file, overwriting any previous tags. Be careful to include any tags already present on the file!

Declared In
NNTagToFileWriter.h

readTagsFromFile:

- (NSArray *)readTagsFromFile:(NNFile *)file
Parameters
file

Dile to get tags for

Return Value

Array of NNTags on file

Discussion

Calls readTagsFromFiles:creationOptions with NNTagsCreationOptionFull by default. May be overwritten by subclass if appropriate.

Declared In
NNTagToFileWriter.h

readTagsFromFile:creationOptions:

- (NSArray *)readTagsFromFile:(NNFile *)file creationOptions:(NNTagsCreationOptions)options
Parameters
file

File to get tags for

options

Influence tag creation

Return Value

Array of NNTags on file

Discussion

Abstract method.

Declared In
NNTagToFileWriter.h

queryStringForTag:

- (NSString *)queryStringForTag:(NNSimpleTag *)tag
Parameters
tag

NNSimpleTag to create query for

Return Value

Query String for NNSimpleTag

Discussion

Abstract method.

Declared In
NNTagToFileWriter.h

queryStringForTag:negated:

- (NSString *)queryStringForTag:(NNSimpleTag *)tag negated:(BOOL)negated
Parameters
tag

NNSimpleTag to create query for

negated

YES if tag should be negated, NO otherwise

Return Value

Query String for NNSimpleTag

Discussion

Abstract method.

Declared In
NNTagToFileWriter.h

spotlightMetadataField

- (NSString *)spotlightMetadataField
Return Value

Spotlight metadata field the tags are stored in

Discussion

Abstract method.

Declared In
NNTagToFileWriter.h

scopeLimiter

- (NSString *)scopeLimiter
Return Value

Scope limiter in Spotlight query format

Discussion

Abstract method.

Declared In
NNTagToFileWriter.h

extractTagNamesFromSpotlightMetadataFieldValue:

- (NSArray *)extractTagNamesFromSpotlightMetadataFieldValue:(id)tagsSpotlightMetadataFieldValue
Parameters
tagsSpotlightMetadataFieldValue

Value of the spotlight field where the tag metadata is stored

Return Value

NSArray of NSStrings with the names of the tags

Discussion

Abstract method.

Declared In
NNTagToFileWriter.h

Last updated: 2010-5-13