Class FileRecord

Description

Each Asset has one of the AssetType supported by the Repository. There are

also zero or more RecordStructures required by the Repository for each AssetType. RecordStructures provide structural information. The values for a given Asset's RecordStructure are stored in a Record. RecordStructures can contain sub-elements which are referred to as PartStructures. The structure defined in the RecordStructure and its PartStructures is used in for any Records for the Asset. Records have Parts which parallel PartStructures.

<p> OSID Version: 2.0 </p>

  • version: $Id: FileRecord.class.php,v 1.27 2007/09/11 17:40:57 adamfranco Exp $
  • license: GNU General Public License
  • copyright: Copyright &copy;2005, Middlebury College

Located in /harmoni/core/oki2/repository/File/FileRecord.class.php (line 34)

RecordInterface
   |
   --FileRecord
Direct descendents
Class Description
FileSystemFileRecord This Record will use a FileSystemFileDataPart to store the file data in the filesystem.
RemoteFileRecord Remote fileRecords are just like FileRecords, but they reference file-data that lies at a remote web-accessible location.
Variable Summary
mixed $_id
mixed $_parts
Method Summary
FileRecord FileRecord (mixed $recordStructure, mixed $id, mixed $configuration, mixed $asset)
void addFileDataPart ($recordStructure $recordStructure)
object Part createPart (object Id $partStructureId, object mixed $value)
void deletePart (mixed $partId, object Id $partId )
object Id getId ()
object PartIterator getParts ()
object PartIterator getPartsByPartStructure (mixed $partStructureId, object Id $partStructureId )
object RecordStructure getRecordStructure ()
boolean isMultivalued ()
boolean _isLastPart (string $idString)
void _loadParts ()
Variables
mixed $_id (line 38)
mixed $_parts (line 41)
mixed $_partsLoaded (line 42)
mixed $_recordStructure (line 39)
Methods
Constructor FileRecord (line 44)
FileRecord FileRecord (mixed $recordStructure, mixed $id, mixed $configuration, mixed $asset)
addFileDataPart (line 102)

Add a fileDataPart

  • since: 12/6/06
  • access: public
void addFileDataPart ($recordStructure $recordStructure)
  • $recordStructure $recordStructure

Redefined in descendants as:
createPart (line 161)

Create a Part. Records are composed of Parts. Parts can also contain other Parts. Each Record is associated with a specific RecordStructure and each Part is associated with a specific PartStructure.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_ID
object Part createPart (object Id $partStructureId, object mixed $value)
  • object Id $partStructureId
  • object mixed $value: (original type: java.io.Serializable)

Redefinition of:
RecordInterface::createPart()
Create a Part. Records are composed of Parts. Parts can also contain other Parts. Each Record is associated with a specific RecordStructure and each Part is associated with a specific PartStructure.
deletePart (line 245)

Delete a Part and all its Parts.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_ID
void deletePart (mixed $partId, object Id $partId )
  • object Id $partId

Redefinition of:
RecordInterface::deletePart()
Delete a Part and all its Parts.

Redefined in descendants as:
getId (line 130)

Get the unique Id for this Record.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object Id getId ()

Redefinition of:
RecordInterface::getId()
Get the unique Id for this Record.
getPart (line 320)

Get the part from the record that matches the passed Id

WARNING: NOT IN OSID

  • since: 10/10/05
  • access: public
getParts (line 301)

Get all the Parts in the Record. Iterators return a set, one at a time.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object PartIterator getParts ()

Redefinition of:
RecordInterface::getParts()
Get all the Parts in the Record. Iterators return a set, one at a time.
getPartsByPartStructure (line 449)

Get the Parts of the Records for this Asset that are based on this RecordStructure PartStructure's unique Id.

WARNING: NOT IN OSID (as of July 2005)

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_ID
object PartIterator getPartsByPartStructure (mixed $partStructureId, object Id $partStructureId )
  • object Id $partStructureId
getRecordStructure (line 364)

Get the RecordStructure associated with this Record.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object RecordStructure getRecordStructure ()

Redefinition of:
RecordInterface::getRecordStructure()
Get the RecordStructure associated with this Record.
isMultivalued (line 340)

Return true if this Record is multi-valued; false otherwise. This is determined by the implementation.

WARNING: NOT IN OSID - Use at your own risk

  • throws: osid.dr.DigitalRepositoryException An exception with one of the following messages defined in osid.dr.DigitalRepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
boolean isMultivalued ()
_isLastPart (line 378)

Return TRUE if the Part of the passed Id is the last one, and the whole schebang should be deleted.

WARNING: NOT IN OSID - Use at your own risk

  • since: 10/25/04
  • access: private
boolean _isLastPart (string $idString)
  • string $idString

Redefined in descendants as:
_loadParts (line 467)

Do a single query to load all of the small-valued parts for the record; that is, everything but the file and thumb data.

  • since: 11/17/05
  • access: private
void _loadParts ()

Redefined in descendants as:
  • RemoteFileRecord::_loadParts() : Do a single query to load all of the small-valued parts for the record; that is, everything but the file and thumb data.

Inherited Methods

Inherited From RecordInterface

RecordInterface::createPart()
RecordInterface::deletePart()
RecordInterface::getDisplayName()
RecordInterface::getId()
RecordInterface::getParts()
RecordInterface::getRecordStructure()
RecordInterface::updateDisplayName()

Documentation generated on Wed, 19 Sep 2007 10:23:12 -0400 by phpDocumentor 1.3.0RC3