Skip to content

FlickrImport_ImportJob

Ned Henry edited this page Jun 6, 2014 · 1 revision

FlickrImport_ImportJob

The FlickrImport import job class.

  • Class name: FlickrImport_ImportJob
  • Namespace:
  • Parent class: Omeka_Job_AbstractJob

Properties

$flickr_api_key

public string $flickr_api_key = 'a664b4fdddb9e009f43e8a6012b1a392'
  • Visibility: public
  • This property is static.

$url

private string $url
  • Visibility: private

$type

private string $type
  • Visibility: private

$setID

private string $setID
  • Visibility: private

$collection

private int $collection
  • Visibility: private

$selecting

private boolean $selecting = false
  • Visibility: private

$selected

private array $selected = array()
  • Visibility: private

$public

private bool $public = false
  • Visibility: private

$ownerRole

private string $ownerRole = "Contributor"
  • Visibility: private

$f

private object $f
  • Visibility: private

Methods

\FlickrImport_ImportJob::perform()

void FlickrImport_ImportJob::\FlickrImport_ImportJob::perform()()

Execute the import of a set of photos as a background process

  • Visibility: public

\FlickrImport_ImportJob::setUrl()

null FlickrImport_ImportJob::\FlickrImport_ImportJob::setUrl()(string $url)

Set the Flickr url

  • Visibility: public

Arguments

  • $url string - <p>URL of Flickr photo, photoset, gallery, or photostream</p>

\FlickrImport_ImportJob::setCollection()

null FlickrImport_ImportJob::\FlickrImport_ImportJob::setCollection()(string $collection)

Set the collection ID

  • Visibility: public

Arguments

  • $collection string - <p>The collection ID of the collection to which to add the photos</p>

\FlickrImport_ImportJob::setSelected()

null FlickrImport_ImportJob::\FlickrImport_ImportJob::setSelected()(array $selected)

Set the selected array

  • Visibility: public

Arguments

  • $selected array - <p>An array containing the photoIDs of Flickr photos to add</p>

\FlickrImport_ImportJob::setSelecting()

null FlickrImport_ImportJob::\FlickrImport_ImportJob::setSelecting()(boolean $selecting)

Set the selecting property

  • Visibility: public

Arguments

  • $selecting boolean - <p>Indicates whether individual photos are being selected in a multi-photo import</p>

\FlickrImport_ImportJob::setPublic()

null FlickrImport_ImportJob::\FlickrImport_ImportJob::setPublic()(boolean $public)

Set the public property

  • Visibility: public

Arguments

  • $public boolean - <p>Indicates whether the new omeka item or items will be public</p>

\FlickrImport_ImportJob::setUserRole()

null FlickrImport_ImportJob::\FlickrImport_ImportJob::setUserRole()(string $role)

Set the role property

  • Visibility: public

Arguments

  • $role string - <p>String containing the name of the Dublin Core element to which to add the Flickr user's information</p>

\FlickrImport_ImportJob::setType()

null FlickrImport_ImportJob::\FlickrImport_ImportJob::setType()(string $type)

Set the type property

  • Visibility: public

Arguments

  • $type string - <p>The type of flickr collection. Allowed values are "photoset", "gallery", or "photostream"</p>

\FlickrImport_ImportJob::_parseURL()

\$string FlickrImport_ImportJob::\FlickrImport_ImportJob::_parseURL()()

Parse the Flickr url parameter

  • Visibility: private

\FlickrImport_ImportJob::_getPhotoIDs()

array FlickrImport_ImportJob::\FlickrImport_ImportJob::_getPhotoIDs()()

Retrieve the IDs of the photos in a Flickr collection

  • Visibility: private

\FlickrImport_ImportJob::GetPhotoFiles()

array FlickrImport_ImportJob::\FlickrImport_ImportJob::GetPhotoFiles()(string $itemID, object $f)

Retrieve the files associated with a given Flickr photo

  • Visibility: public
  • This method is static.

Arguments

  • $itemID string - <p>The Flickr photo ID from which to extract metadata</p>
  • $f object - <p>The phpFlickr interface</p>

\FlickrImport_ImportJob::GetPhotoPost()

array FlickrImport_ImportJob::\FlickrImport_ImportJob::GetPhotoPost()(string $itemID, object $f, int $collection, string $ownerRole, $public)

Fetch metadata from a Flickr photo and prepare it

  • Visibility: public
  • This method is static.

Arguments

  • $itemID string - <p>The Flickr photo ID from which to extract metadata</p>
  • $f object - <p>The phpFlickr interface</p>
  • $collection int - <p>The ID of the collection to which to add the new item</p>
  • $ownerRole string - <p>The name of the dublin core field to which to add the new omeka item or items</p>
  • $public mixed

\FlickrImport_ImportJob::MakeDuplicateCollection()

int FlickrImport_ImportJob::\FlickrImport_ImportJob::MakeDuplicateCollection()(string $setID, string $type, object $f, string $ownerRole, $public)

Create a new Omeka collection from a Flickr collection

  • Visibility: public
  • This method is static.

Arguments

  • $setID string - <p>A unique identifier for the Flickr collection from which to extract metadata</p>
  • $type string - <p>The type of Flickr collection</p>
  • $f object - <p>The phpFlickr interface</p>
  • $ownerRole string - <p>The name of the dublin core field to which to add the new omeka item or items</p>
  • $public mixed

\FlickrImport_ImportJob::_addPhoto()

void FlickrImport_ImportJob::\FlickrImport_ImportJob::_addPhoto()(string $itemID)

Create a new Omeka item with information from a Flickr image

  • Visibility: private

Arguments

  • $itemID string - <p>The Flickr photo ID of the photo to be added</p>

\FlickrImport_ImportJob::_handleError()

void FlickrImport_ImportJob::\FlickrImport_ImportJob::_handleError()(string $errorString)

Send an error from the background process into Omeka for future display

This function asynchronously calls an error logging script which saves the error message in the Omeka database, to display to the next administrator who accesses the Flickr import plugin.

  • Visibility: private

Arguments

  • $errorString string - <p>The error message to send to the administrator</p>