Class HarmoniRecordStructure

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: HarmoniRecordStructure.class.php,v 1.36 2007/09/04 20:25:43 adamfranco Exp $
  • license: GNU General Public License
  • copyright: Copyright &copy;2005, Middlebury College

Located in /harmoni/core/oki2/repository/HarmoniRecordStructure.class.php (line 29)

RecordStructure
   |
   --HarmoniRecordStructure
Variable Summary
mixed $_schema
Method Summary
HarmoniRecordStructure HarmoniRecordStructure (mixed $schema, mixed $repositoryId)
void convertPartStructureToType (object Id $partStructureId, object Type $type, [mixed $statusStars = null])
object PartStructure createPartStructure (string $displayName, string $description, mixed $partType, boolean $isMandatory, boolean $isRepeatable, mixed $isPopulatedByRepository, [optional $theid = null], object Type $type, boolean $isPopulatedByDR)
void deletePartStructure (object Id $partStructureId)
string getDescription ()
string getDisplayName ()
string getFormat ()
object Id getId ()
object PartStructure getPartStructure (mixed $partId, object $infoPartId)
object PartStructureIterator getPartStructures ()
object TypeIterator getPartStructureTypes ()
string getSchema ()
object Type getType ()
boolean isRepeatable ()
void updateDescription (mixed $description, string $description )
void updateDisplayName (mixed $displayName, string $displayName )
void updateFormat (mixed $format, string $format )
boolean validateRecord (mixed $record, object Record $record )
Variables
mixed $_createdParts (line 34)
mixed $_schema (line 33)
Methods
Constructor HarmoniRecordStructure (line 36)
HarmoniRecordStructure HarmoniRecordStructure (mixed $schema, mixed $repositoryId)
convertPartStructureToType (line 478)

Convert this PartStructure and all of its associated Parts to a new type.

Usage of this method may cause data-loss if the types are do not convert well.

WARNING: NOT IN OSID

  • since: 6/8/06
  • access: public
void convertPartStructureToType (object Id $partStructureId, object Type $type, [mixed $statusStars = null])
  • object Id $partStructureId
  • object Type $type
createPartStructure (line 412)

Create an PartStructure in this RecordStructure. This is not part of the Repository OSID at the time of this writing, but is needed for dynamically created RecordStructures/PartStructures.

  • return: The newly created PartStructure.
object PartStructure createPartStructure (string $displayName, string $description, mixed $partType, boolean $isMandatory, boolean $isRepeatable, mixed $isPopulatedByRepository, [optional $theid = null], object Type $type, boolean $isPopulatedByDR)
  • string $displayName: The DisplayName of the new RecordStructure.
  • string $description: The Description of the new RecordStructure.
  • object Type $type: One of the InfoTypes supported by this implementation. E.g. string, shortstring, blob, datetime, integer, float,
  • boolean $isMandatory: True if the PartStructure is Mandatory.
  • boolean $isRepeatable: True if the PartStructure is Repeatable.
  • boolean $isPopulatedByDR: True if the PartStructure is PopulatedBy the DR.
  • optional $theid: object $id An optional HarmoniId object for this part structure.
deletePartStructure (line 555)

Delete a PartStucture

  • since: 6/8/06
  • access: public
void deletePartStructure (object Id $partStructureId)
  • object Id $partStructureId
getDescription (line 114)

Get the description for this RecordStructure.

  • 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
string getDescription ()

Redefinition of:
RecordStructure::getDescription()
Get the description for this RecordStructure.
getDisplayName (line 66)

Get the display name for this RecordStructure.

  • 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
string getDisplayName ()

Redefinition of:
RecordStructure::getDisplayName()
Get the display name for this RecordStructure.
getFormat (line 303)

Get the format for this RecordStructure. The format is defined by the implementation, e.g. XML.

  • 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
string getFormat ()

Redefinition of:
RecordStructure::getFormat()
Get the format for this RecordStructure. The format is defined by the implementation, e.g. XML.
getId (line 162)

Get the unique Id for this RecordStructure.

  • 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:
RecordStructure::getId()
Get the unique Id for this RecordStructure.
getPartStructure (line 173)

Get the PartStructure in the RecordStructure with the specified Id.

  • 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
object PartStructure getPartStructure (mixed $partId, object $infoPartId)
  • object $infoPartId
getPartStructures (line 219)

Get all the PartStructures in the RecordStructure. 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 PartStructureIterator getPartStructures ()

Redefinition of:
RecordStructure::getPartStructures()
Get all the PartStructures in the RecordStructure. Iterators return a set, one at a time.
getPartStructureTypes (line 454)

Get the possible types for PartStructures.

WARNING: NOT IN OSID - Use at your own risk.

  • return: The Types supported in this implementation.
object TypeIterator getPartStructureTypes ()
getSchema (line 253)

Get the schema for this RecordStructure. The schema is defined by the implementation, e.g. Dublin Core.

  • 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
string getSchema ()

Redefinition of:
RecordStructure::getSchema()
Get the schema for this RecordStructure. The schema is defined by the implementation, e.g. Dublin Core.
getType (line 355)

Get the Type for this RecordStructure.

  • 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 Type getType ()

Redefinition of:
RecordStructure::getType()
Get the Type for this RecordStructure.
isRepeatable (line 279)

Return true if this RecordStructure is repeatable; false otherwise.

This is determined by the implementation.

  • 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
boolean isRepeatable ()

Redefinition of:
RecordStructure::isRepeatable()
Return true if this RecordStructure is repeatable; false otherwise.
updateDescription (line 137)

Update the description for this RecordStructure.

  • 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
void updateDescription (mixed $description, string $description )
  • string $description
updateDisplayName (line 89)

Update the display name for this RecordStructure.

  • 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
void updateDisplayName (mixed $displayName, string $displayName )
  • string $displayName

Redefinition of:
RecordStructure::updateDisplayName()
Update the display name for this RecordStructure.
updateFormat (line 328)

Update the format for this RecordStructure.

  • 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
void updateFormat (mixed $format, string $format )
  • string $format
validateRecord (line 388)

Validate a Record against its RecordStructure. Return true if valid;

false otherwise. The status of the Asset holding this Record is not changed through this method. The implementation may throw an Exception for any validation failures and use the Exception's message to identify specific causes.

  • 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
boolean validateRecord (mixed $record, object Record $record )

Redefinition of:
RecordStructure::validateRecord()
Validate a Record against its RecordStructure. Return true if valid;

Inherited Methods

Inherited From RecordStructure

RecordStructure::getDescription()
RecordStructure::getDisplayName()
RecordStructure::getFormat()
RecordStructure::getId()
RecordStructure::getPartStructures()
RecordStructure::getSchema()
RecordStructure::getType()
RecordStructure::isRepeatable()
RecordStructure::updateDisplayName()
RecordStructure::validateRecord()

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