Difference between revisions of "API:EPrints/DataObj/SavedSearch"

From EPrints Documentation
Jump to: navigation, search
(Removing all content from page)
Line 1: Line 1:
 +
<!-- Pod2Wiki=_preamble_
 +
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
 +
-->
 +
__NOTOC__
 +
{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/SavedSearch.pm|package_name=EPrints::DataObj::SavedSearch}}[[Category:API|SavedSearch]]<div><!-- Edit below this comment -->
  
 +
 +
<!-- Pod2Wiki=head_name --></div>
 +
==NAME==
 +
'''EPrints::DataObj::SavedSearch''' - Single saved search.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=head_description --></div>
 +
==DESCRIPTION==
 +
A saved search is a sub class of EPrints::DataObj.
 +
 +
Each one belongs to one and only one user, although one user may own multiple saved searches.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=item_get_system_field_info --></div>
 +
===$field_config = EPrints::DataObj::SavedSearch-&gt;get_system_field_info===
 +
 +
Return an array describing the system metadata of the saved search. dataset.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=item_get_dataset_id --></div>
 +
===$dataset = EPrints::DataObj::SavedSearch-&gt;get_dataset_id===
 +
 +
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=item_commit --></div>
 +
===$success = $saved_search-&gt;commit( [$force] )===
 +
 +
Write this object to the database.
 +
 +
If $force isn't true then it only actually modifies the database if one or more fields have been changed.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=item_get_user --></div>
 +
===$user = $saved_search-&gt;get_user===
 +
 +
Return the EPrints::User which owns this saved search.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=item_make_searchexp --></div>
 +
===$searchexp = $saved_search-&gt;make_searchexp===
 +
 +
Return a EPrints::Search describing how to find the eprints which are in the scope of this saved search.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=item_send_out_alert --></div>
 +
===$saved_search-&gt;send_out_alert===
 +
 +
Send out an email for this subcription. If there are no matching new items then an email is only sent if the saved search has mailempty set to true.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=item_process_set --></div>
 +
===EPrints::DataObj::SavedSearch::process_set( $session, $frequency );===
 +
 +
Static method. Calls send_out_alert on every saved search  with a frequency matching $frequency.
 +
 +
Also saves a file logging that the alerts for this frequency was sent out at the current time.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=item_get_last_timestamp --></div>
 +
===$timestamp = EPrints::DataObj::SavedSearch::get_last_timestamp( $session, $frequency );===
 +
 +
Static method. Return the timestamp of the last time this frequency  of alert was sent.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=item_has_owner --></div>
 +
===$boolean = $user-&gt;has_owner( $possible_owner )===
 +
 +
True if the users are the same record.
 +
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<h4><span style='display:none'>User Comments</span></h4>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->

Revision as of 16:34, 12 February 2010


EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::DataObj::SavedSearch - Single saved search.

User Comments


DESCRIPTION

A saved search is a sub class of EPrints::DataObj.

Each one belongs to one and only one user, although one user may own multiple saved searches.

User Comments


$field_config = EPrints::DataObj::SavedSearch->get_system_field_info

Return an array describing the system metadata of the saved search. dataset.

User Comments


$dataset = EPrints::DataObj::SavedSearch->get_dataset_id

Returns the id of the EPrints::DataSet object to which this record belongs.

User Comments


$success = $saved_search->commit( [$force] )

Write this object to the database.

If $force isn't true then it only actually modifies the database if one or more fields have been changed.

User Comments


$user = $saved_search->get_user

Return the EPrints::User which owns this saved search.

User Comments


$searchexp = $saved_search->make_searchexp

Return a EPrints::Search describing how to find the eprints which are in the scope of this saved search.

User Comments


$saved_search->send_out_alert

Send out an email for this subcription. If there are no matching new items then an email is only sent if the saved search has mailempty set to true.

User Comments


EPrints::DataObj::SavedSearch::process_set( $session, $frequency );

Static method. Calls send_out_alert on every saved search with a frequency matching $frequency.

Also saves a file logging that the alerts for this frequency was sent out at the current time.

User Comments


$timestamp = EPrints::DataObj::SavedSearch::get_last_timestamp( $session, $frequency );

Static method. Return the timestamp of the last time this frequency of alert was sent.

User Comments


$boolean = $user->has_owner( $possible_owner )

True if the users are the same record.

User Comments