dmBridge PHP API
DMObjectQuery Class Reference

Encapsulates a CONTENTdm(R) search query. More...

Inheritance diagram for DMObjectQuery:

Public Member Functions

Static Public Member Functions

Data Fields


Detailed Description

Encapsulates a CONTENTdm(R) search query.

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

Definition at line 15 of file DMObjectQuery.php.


Member Function Documentation

DMObjectQuery::addFacetTerm ( DMFacetTerm f)
Parameters:
DMFacetTermf

Definition at line 62 of file DMObjectQuery.php.

DMObjectQuery::arePredicates ( )
Returns:
Boolean True if any search terms are present, or false if not.

Definition at line 315 of file DMObjectQuery.php.

static DMObjectQuery::getCurrent ( ) [static]
Returns:
DMObjectQuery
Deprecated:

Definition at line 42 of file DMObjectQuery.php.

Referenced by getURI().

DMObjectQuery::getFacetTerms ( )
Returns:
array of DMFacetTerms

Definition at line 69 of file DMObjectQuery.php.

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

DMObjectQuery::getFeedURI ( )

Convenience method equivalent to calling getURI(DMBridgeComponent::TemplateEngine, "atom").

Returns:
DMInternalURI

Definition at line 79 of file DMObjectQuery.php.

DMObjectQuery::getRatingRange ( )
Returns:
array Indexed array of floats with min rating at position 0 and max rating at position 1

Definition at line 87 of file DMObjectQuery.php.

DMObjectQuery::getSuggestion ( )

Returns the suggestion generated for an apparently misspelled term with no results; e.g.

"airplaen" -> "Did you mean 'airplane'?"

Returns:
string

Definition at line 346 of file DMObjectQuery.php.

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

DMObjectQuery::getURI ( component = DMBridgeComponent::TemplateEngine,
representation = null,
DMTemplateSet ts = null,
DMInternalURI inherited_uri = null 
)
Parameters:
intcomponent One of the constants in the DMBridgeComponent class
stringrepresentation A valid representation, such as "html" or "atom"
DMTemplateSetts
DMInternalURIinherited_uri An optional URI from which to "inherit" a query and fragment.
Returns:
DMInternalURI URI of the query

Definition at line 371 of file DMObjectQuery.php.

Referenced by DMGenericTemplateHelper::getHtmlTermLinkedToSearch().

static DMObjectQuery::setCurrent ( DMObjectQuery oq) [static]
Parameters:
DMObjectQueryoq
Deprecated:

Definition at line 50 of file DMObjectQuery.php.

DMObjectQuery::setNumResultsPerPage ( rpp)
Parameters:
intrpp Results per page

Reimplemented from DMAbstractQuery.

Definition at line 306 of file DMObjectQuery.php.

DMObjectQuery::setRatingRange ( min,
max 
)

If called, this query instance will search only by rating.

Parameters:
floatmin Float on a scale of 0-1
floatmax Float on a scale of 0-1
Exceptions:
DMIllegalArgumentExceptionif min > max

Definition at line 99 of file DMObjectQuery.php.

DMObjectQuery::setSortFields ( array $  fields)
Parameters:
arrayfields Associative array of field-direction pairs, e.g. "title" => "asc" or "descri" => "desc"

Reimplemented from DMAbstractQuery.

Definition at line 328 of file DMObjectQuery.php.


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