Difference between revisions of "API:EPrints/DataObj/CitationCache"
(One intermediate revision by the same user not shown) | |||
Line 54: | Line 54: | ||
===datasetid (text)=== | ===datasetid (text)=== | ||
− | The name of the dataset to which the item that has a citation cache belongs. | + | The name of the dataset to which the item that has a citation cache belongs. <tt>eprint</tt> is used for eprints, rather than the <tt>inbox</tt>, <tt>buffer</tt>, etc. |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 78: | Line 78: | ||
===style (text)=== | ===style (text)=== | ||
− | The style of citation for a particular item. | + | The style of citation for a particular item. Each data object may have many different citation styles and defined appropriate data object's sub-directory of the citations configuration directory. |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 90: | Line 90: | ||
===citation_text (text)=== | ===citation_text (text)=== | ||
− | The actually text generated for the citation cache by render_citation. | + | The actually text generated for the citation cache by [[API:EPrints/DataObj/CitationCache#render_citation|render_citation]]. |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 103: | Line 103: | ||
The moment at which this citation cache was generated. | The moment at which this citation cache was generated. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_references_and_related_objects --> | ||
+ | ==REFERENCES AND RELATED OBJECTS== | ||
+ | None. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_instance_variables --> | ||
+ | ==INSTANCE VARIABLES== | ||
+ | See <EPrints::DataObj|EPrints::DataObj#INSTANCE_VARIABLES>. | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 113: | Line 135: | ||
<!-- Pod2Wiki=head_methods --> | <!-- Pod2Wiki=head_methods --> | ||
==METHODS== | ==METHODS== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_constructor_methods --> | ||
+ | ===Constructor Methods=== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create --> | ||
+ | ====create==== | ||
+ | |||
+ | EPrints::DataObj::CitationCache::create( $session, $data ); | ||
+ | Create a new citationcache object from supplied <tt>$data</tt>. Unlike other create methods this one does not return the new object as it's never needed, and would increase the load on modifying items. | ||
+ | |||
+ | Also, this does not queue the fields for indexing. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_class_methods --> | ||
+ | ===Class Methods=== | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
<span style='display:none'>User Comments</span> | <span style='display:none'>User Comments</span> | ||
Line 121: | Line 176: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_get_system_field_info --> | <!-- Pod2Wiki=item_get_system_field_info --> | ||
− | ===get_system_field_info=== | + | ====get_system_field_info==== |
$field_info = EPrints::DataObj::CitationCache->get_system_field_info | $field_info = EPrints::DataObj::CitationCache->get_system_field_info | ||
Line 134: | Line 189: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_get_dataset_id --> | <!-- Pod2Wiki=item_get_dataset_id --> | ||
− | ===get_dataset_id=== | + | ====get_dataset_id==== |
$dataset = EPrints::DataObj::CitationCache->get_dataset_id | $dataset = EPrints::DataObj::CitationCache->get_dataset_id | ||
Line 146: | Line 201: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=item_get_defaults --> |
− | === | + | ====get_defaults==== |
− | $ | + | $defaults = EPrints::DataObj::CitationCache->get_defaults( $session, $data ) |
− | + | Return default values for this object based on the starting <tt>$data</tt>. | |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 159: | Line 214: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=head_object_methods --> |
− | === | + | ===Object Methods=== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
<span style='display:none'>User Comments</span> | <span style='display:none'>User Comments</span> | ||
Line 174: | Line 223: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=item_commit --> |
− | === | + | ====commit==== |
− | $ | + | $citationcache->commit |
− | + | Commit the formatted text generated for a citationcache | |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 188: | Line 237: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_render --> | <!-- Pod2Wiki=item_render --> | ||
− | ===render=== | + | ====render==== |
$xhtml = $citationcache->render | $xhtml = $citationcache->render | ||
− | A | + | A citation cache cannot have a rendering of itself. |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 201: | Line 250: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_get_dataobj --> | <!-- Pod2Wiki=item_get_dataobj --> | ||
− | ===get_dataobj=== | + | ====get_dataobj==== |
+ | |||
+ | $dataobj = $citationcache->get_dataobj | ||
+ | Returns the object to which this citation cache relates. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
− | + | <!-- Pod2Wiki= --> | |
− | + | </div> | |
+ | <!-- Pod2Wiki=head_see_also --> | ||
+ | ==SEE ALSO== | ||
+ | [[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]]. | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
Latest revision as of 16:37, 10 January 2022
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::DataObj::CitationCache - A cached citation for a data object.
DESCRIPTION
This class describes a single item in the citationcache dataset. A citationcache object describes a formatted citation for a single item in another dataset.
To enable citation caching edit the archive's cfg/cfg.d/citationcaches.pl and change the appropriate line to:
$c->{citation_caching}->{enabled} = 1;
CORE METADATA FIELDS
citationcacheid (int)
The unique numerical ID of this citation cache event.
datasetid (text)
The name of the dataset to which the item that has a citation cache belongs. eprint is used for eprints, rather than the inbox, buffer, etc.
objectid (int)
The numerical ID of the object in the dataset.
style (text)
The style of citation for a particular item. Each data object may have many different citation styles and defined appropriate data object's sub-directory of the citations configuration directory.
citation_text (text)
The actually text generated for the citation cache by render_citation.
timestamp (time)
The moment at which this citation cache was generated.
REFERENCES AND RELATED OBJECTS
None.
INSTANCE VARIABLES
See <EPrints::DataObj|EPrints::DataObj#INSTANCE_VARIABLES>.
METHODS
Constructor Methods
create
EPrints::DataObj::CitationCache::create( $session, $data );
Create a new citationcache object from supplied $data. Unlike other create methods this one does not return the new object as it's never needed, and would increase the load on modifying items.
Also, this does not queue the fields for indexing.
Class Methods
get_system_field_info
$field_info = EPrints::DataObj::CitationCache->get_system_field_info
Return the metadata field configuration for this object.
get_dataset_id
$dataset = EPrints::DataObj::CitationCache->get_dataset_id
Returns the id of the EPrints::DataSet object to which this record belongs.
get_defaults
$defaults = EPrints::DataObj::CitationCache->get_defaults( $session, $data )
Return default values for this object based on the starting $data.
Object Methods
commit
$citationcache->commit
Commit the formatted text generated for a citationcache
render
$xhtml = $citationcache->render
A citation cache cannot have a rendering of itself.
get_dataobj
$dataobj = $citationcache->get_dataobj
Returns the object to which this citation cache relates.
SEE ALSO
EPrints::DataObj and EPrints::DataSet.
COPYRIGHT
© Copyright 2000-2024 University of Southampton.
EPrints 3.4 is supplied by EPrints Services.
http://www.eprints.org/eprints-3.4/
LICENSE
This file is part of EPrints 3.4 http://www.eprints.org/.
EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.
EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.