com. kelvinluck. flickr.Tag

Class to describe a tag on a photo on Flickr.

Instances of this class are created to hold tags that are attached to Photos returned from flickr.com

Currently very bare bones - this class will be expanded

Version

0.1.0

Author

Kelvin Luck < kelvin at kelvinluck dot com >

Summary
Class to describe a tag on a photo on Flickr.
The raw text of this tag
The text of this tag
An object detailing the relationships between this tag and different photos.
A private static Object containing Tag objects.
Add’s a reference to a Photo to this Tag.
Get’s this tags _photos Object.
Get’s a Tag object for the given id.

Variables

raw

public var raw: String

The raw text of this tag

value

public var value: String

The text of this tag

_photos

public var _photos: Object

An object detailing the relationships between this tag and different photos.

_tags

private static var _tags: Object

A private static Object containing Tag objects.  Used by getTag to insure that only one Tag is created for each tag returned from flickr.com

Functions

Tag

private function Tag(raw: String)
Constructor functioncreates a new Tag object.

Don’t call directly, use getTag to make sure that there is only one Tag instance for each id as returned by flickr.com

addPhoto

function addPhoto(id: String,
photo: Photo,
author: Person):Void

Add’s a reference to a Photo to this Tag.

Parameters

idThe id which describes the link between this Photo and Tag.
photoThe Photo you want to add to this tag.
authorThe Person who attached that Tag to this Photo.

See Also

_photos

getPhotos

getPhotos

function getPhotos():Object

Get’s this tags _photos Object.  See Also: _photos

<setPhotos>

getTag

public static function getTag(raw: String):Tag

Get’s a Tag object for the given id.

Consults _tags to make sure that only one Tag instance is created for each tag id from flickr.com

Parameters

rawThe raw of the Tag you want to get
public var raw: String
The raw text of this tag
public var value: String
The text of this tag
public var _photos: Object
An object detailing the relationships between this tag and different photos.
private static var _tags: Object
A private static Object containing Tag objects.
private function Tag(raw: String)
function addPhoto(id: String,
photo: Photo,
author: Person):Void
Add’s a reference to a Photo to this Tag.
Class to describe a photo from Flickr.
function getPhotos():Object
Get’s this tags _photos Object.
public static function getTag(raw: String):Tag
Get’s a Tag object for the given id.
Class to describe a person from Flickr.