dmBridge PHP API
DMCollection Class Reference

Encapsulates a CONTENTdm(R) collection. More...

Inheritance diagram for DMCollection:

Public Member Functions

Static Public Member Functions


Detailed Description

Encapsulates a CONTENTdm(R) collection.

Author:
Alex Dolski <alex.dolski@unlv.edu> http://www.opensource.org/licenses/mit-license.php

Definition at line 15 of file DMCollection.php.


Constructor & Destructor Documentation

DMCollection::__construct ( alias)

To instantiate a generic collection, supply an alias with value of /dmdefault.

Parameters:
alias
Exceptions:
DMUnavailableModelException
Since:
0.1

Definition at line 102 of file DMCollection.php.


Member Function Documentation

DMCollection::__toString ( )

The return value of this method may change and should not be depended on.

Returns:
string The collection's alias
Since:
0.1

Definition at line 113 of file DMCollection.php.

DMCollection::addFacet ( DMFacetTerm term)
Parameters:
DMFacetTermterm

Definition at line 271 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::addField ( DMDCElement element)
Parameters:
DMECElementelement

Definition at line 292 of file DMCollection.php.

DMCollection::addGridViewField ( DMDCElement field)
Parameters:
DMDCElementfield

Definition at line 341 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::addViewerDefinition ( DMObjectViewerDefinition vd)
Parameters:
DMObjectViewerDefinitionvd

Definition at line 541 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::equals ( obj)
Parameters:
mixedobj
Returns:
Boolean

Definition at line 121 of file DMCollection.php.

static DMCollection::exists ( alias) [static, final]
Parameters:
stringalias
Since:
0.4

Definition at line 78 of file DMCollection.php.

Referenced by DMCollectionFactory::getCollection(), DMObjectQuery::getURI(), and DMAPICollectionController::view().

static DMCollection::getAuthorized ( ) [static]
Returns:
An array of all collections in the CONTENTdm(R) system to which the current user has access, as DMCollection objects. The list of collections returned has no bearing on any restrictions set in the templates, if any.
Since:
0.1

Definition at line 64 of file DMCollection.php.

Referenced by DMConfigXML::getDomDocument(), DMGenericTemplateHelper::getHtmlCollectionsAsPulldown(), UNLVRandomAddForm::init(), UNLVHighlightAddForm::init(), DMCPTemplateSetForm::init(), DMConfigXML::loadTemplateSet(), and DMTESitemapController::view().

DMCollection::getDateSearchBeginYear ( )
Returns:
int Four-digit year

Definition at line 197 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

DMCollection::getDateSearchEndYear ( )
Returns:
int Four-digit year

Definition at line 204 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

DMCollection::getDateSearchField ( )

Loops through the collection's array of fields and returns the first date element it comes across.

Returns:
DMDCElement
Since:
0.3

Definition at line 238 of file DMCollection.php.

DMCollection::getDescription ( )
Returns:
string A brief description of the collection.

Definition at line 249 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection(), DMXMLRepresentationTransformerV1::transformCollection(), and DMJSONRepresentationTransformerV1::transformCollection().

DMCollection::getFacets ( )
Returns:
array Array of DMFacetTerm objects

Definition at line 278 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

DMCollection::getField ( nick)
Parameters:
stringnick The field nickname that is used internally by CONTENTdm(R)
Returns:
The DMCollection's DMDCElement object corresponding to $nick, or null if a field with nickname $nick does not exist.
See also:
DMDCElement::getVocabulary()
Since:
0.1

Definition at line 305 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::getFields ( )
Returns:
An array of all fields in the collection, as DMDCElement objects. If the collection is the default collection, returns an array of all DC fields. Field properties are as they are defined in the CONTENTdm(R) system. To retrieve custom field properties, as for e.g. grid view, use DMCollection::getResultsViewFields().
See also:
getVocabulary()
Since:
0.1

Definition at line 327 of file DMCollection.php.

Referenced by getDateSearchField(), getField(), DMConfigXML::loadCollection(), DMConfigXML::saveCollection(), DMXMLRepresentationTransformerV1::transformCollection(), and DMJSONRepresentationTransformerV1::transformCollection().

DMCollection::getGridViewFields ( )
Returns:
array array of DMDCElement objects

Definition at line 348 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

DMCollection::getImage512URI ( )

Returns the URI of a representative image for the collection.

The image will be 512 pixels on its longest side.

Returns:
DMURI

Definition at line 365 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection(), DMXMLRepresentationTransformerV1::transformCollection(), and DMJSONRepresentationTransformerV1::transformCollection().

DMCollection::getName ( )

Returns the name of the collection, as defined in the CONTENTdm(R) system.

Note: If the current user does not have access to the collection, the collection will be named "Untitled Collection," due to a bug/feature of the CONTENTdm(R) dmGetCollectionList() API function.

Returns:
string
Since:
0.1

Definition at line 419 of file DMCollection.php.

Referenced by DMXMLRepresentationTransformerV1::transformCollection(), and DMJSONRepresentationTransformerV1::transformCollection().

DMCollection::getOverviewURI ( )
Returns:
DMURI The overview URI defined in the Control Panel

Definition at line 455 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection(), DMXMLRepresentationTransformerV1::transformCollection(), and DMJSONRepresentationTransformerV1::transformCollection().

DMCollection::getResultsViewFields ( )

Returns an array of all DMDCElement objects that are to be displayed in grid view.

Returns:
array
See also:
DMCollection::getFields()
Since:
0.1

Definition at line 489 of file DMCollection.php.

DMCollection::getTemplateSet ( )
Returns:
DMTemplateSet
Since:
0.4

Definition at line 497 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

DMCollection::getURI ( )
Returns:
DMInternalURI

Implements DMURIAddressable.

Definition at line 515 of file DMCollection.php.

DMCollection::getViewerDefinitionForMediaType ( DMMediaType type)
Parameters:
DMMediaTypetype
Returns:
DMObjectViewerDefinition

Definition at line 550 of file DMCollection.php.

DMCollection::getViewerDefinitions ( )
Returns:
array Array of DMObjectViewerDefinition objects

Definition at line 562 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

DMCollection::hasCustomObjectViewPrefs ( )
Returns:
Boolean

Definition at line 155 of file DMCollection.php.

DMCollection::hasCustomResultsViewPrefs ( )
Returns:
Boolean

Definition at line 169 of file DMCollection.php.

DMCollection::hasCustomSearchViewPrefs ( )
Returns:
Boolean

Definition at line 183 of file DMCollection.php.

DMCollection::isDefault ( )
Returns:
bool Whether the instance is of the default collection, of alias "/dmdefault"

Definition at line 264 of file DMCollection.php.

DMCollection::isRedirectingReferenceURLs ( )
Returns:
Boolean
Since:
0.4

Definition at line 470 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

DMCollection::isUsingDefaultTemplateSet ( )
Returns:
Boolean

Definition at line 524 of file DMCollection.php.

DMCollection::setDateSearchRange ( begin_year,
end_year 
)
Parameters:
intbegin_year Four-digit year
intend_year Four-digit year
Exceptions:
DMIllegalArgumentExceptionif $end_year is earlier than $begin_year

Definition at line 214 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setDescription ( desc)
Parameters:
stringdesc A brief description of the collection.

Definition at line 256 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setHasCustomObjectViewPrefs ( bool)
Parameters:
Booleanbool

Definition at line 162 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setHasCustomResultsViewPrefs ( bool)
Parameters:
Booleanbool

Definition at line 176 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setHasCustomSearchViewPrefs ( bool)
Parameters:
Booleanbool

Definition at line 190 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setImage512URI ( DMURI uri)
Parameters:
DMURIuri The URI of a representative image for the collection. The image should be 512 pixels on its longest side and compressed for fast downloading.

Definition at line 374 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setOverviewURI ( DMURI uri)
Parameters:
DMURIuri The overview URI defined in the Control Panel

Definition at line 462 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setRedirectingReferenceURLs ( bool)
Parameters:
Booleanbool

Definition at line 477 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setTemplateSetID ( id)
Parameters:
intid

Definition at line 507 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setUsingDefaultTemplateSet ( bool)
Parameters:
Booleanbool

Definition at line 531 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection(), and setTemplateSetID().

DMCollection::unsetDateSearchRange ( )
Returns:
void

Definition at line 226 of file DMCollection.php.

DMCollection::unsetFacets ( )
Returns:
void

Definition at line 285 of file DMCollection.php.

DMCollection::unsetFields ( )
Returns:
void

Definition at line 334 of file DMCollection.php.

DMCollection::unsetGridViewFields ( )
Returns:
void

Definition at line 355 of file DMCollection.php.

DMCollection::unsetViewerDefinitions ( )
Returns:
void

Definition at line 569 of file DMCollection.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables