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 111 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 122 of file DMCollection.php.

DMCollection::addFacet ( DMFacetTerm term)
Parameters:
DMFacetTermterm

Definition at line 280 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::addField ( DMDCElement element)
Parameters:
DMECElementelement

Definition at line 301 of file DMCollection.php.

DMCollection::addGridViewField ( DMDCElement field)
Parameters:
DMDCElementfield

Definition at line 350 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::addViewerDefinition ( DMObjectViewerDefinition vd)
Parameters:
DMObjectViewerDefinitionvd

Definition at line 549 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

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

Definition at line 130 of file DMCollection.php.

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

Definition at line 87 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 206 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

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

Definition at line 213 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 247 of file DMCollection.php.

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

Definition at line 258 of file DMCollection.php.

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

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

Definition at line 287 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 314 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 336 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 357 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 374 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 428 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 463 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 497 of file DMCollection.php.

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

Definition at line 505 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

DMCollection::getURI ( )
Returns:
DMInternalURI

Implements DMURIAddressable.

Definition at line 523 of file DMCollection.php.

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

Definition at line 558 of file DMCollection.php.

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

Definition at line 570 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

DMCollection::hasCustomObjectViewPrefs ( )
Returns:
Boolean

Definition at line 164 of file DMCollection.php.

DMCollection::hasCustomResultsViewPrefs ( )
Returns:
Boolean

Definition at line 178 of file DMCollection.php.

DMCollection::hasCustomSearchViewPrefs ( )
Returns:
Boolean

Definition at line 192 of file DMCollection.php.

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

Definition at line 273 of file DMCollection.php.

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

Definition at line 478 of file DMCollection.php.

Referenced by DMConfigXML::saveCollection().

DMCollection::isUsingDefaultTemplateSet ( )
Returns:
Boolean

Definition at line 532 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 223 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

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

Definition at line 265 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setHasCustomObjectViewPrefs ( bool)
Parameters:
Booleanbool

Definition at line 171 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setHasCustomResultsViewPrefs ( bool)
Parameters:
Booleanbool

Definition at line 185 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setHasCustomSearchViewPrefs ( bool)
Parameters:
Booleanbool

Definition at line 199 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 383 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 470 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setRedirectingReferenceURLs ( bool)
Parameters:
Booleanbool

Definition at line 485 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setTemplateSetID ( id)
Parameters:
intid

Definition at line 515 of file DMCollection.php.

Referenced by DMConfigXML::loadCollection().

DMCollection::setUsingDefaultTemplateSet ( bool)
Parameters:
Booleanbool

Definition at line 539 of file DMCollection.php.

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

DMCollection::unsetDateSearchRange ( )
Returns:
void

Definition at line 235 of file DMCollection.php.

DMCollection::unsetFacets ( )
Returns:
void

Definition at line 294 of file DMCollection.php.

DMCollection::unsetFields ( )
Returns:
void

Definition at line 343 of file DMCollection.php.

DMCollection::unsetGridViewFields ( )
Returns:
void

Definition at line 364 of file DMCollection.php.

DMCollection::unsetViewerDefinitions ( )
Returns:
void

Definition at line 577 of file DMCollection.php.


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