⧼vector-jumptocontent⧽

API:EPrints/Citation: Difference between revisions

From EPrints Documentation
Pod2wiki (talk | contribs)
Created page with "<!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment'..."
 
Pod2wiki (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
==NAME==
==NAME==
'''EPrints::Citation''' - loading and rendering of citation styles
'''EPrints::Citation''' - Loading and rendering of citation styles.


<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 17: Line 17:
<!-- Pod2Wiki=head_description -->
<!-- Pod2Wiki=head_description -->
==DESCRIPTION==
==DESCRIPTION==
Renders citations for data objects using a paticular style defined in it own configuration file.
This is an abstract class used by [[API:EPrints/Citation/EPC|EPrints::Citation::EPC]] and  [[API:EPrints/Citation/XSL|EPrints::Citation::XSL]] whichb use XML EPC and XSL respecively to define citation style files.
<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 25: Line 29:
</div>
</div>
<!-- Pod2Wiki=head_synopsis -->
<!-- Pod2Wiki=head_synopsis -->
==SYNOPSIS==
===SYNOPSIS===
   my $citation = $repo-&gt;dataset( "eprint" )-&gt;citation( "default" );
   my $citation = $repo-&gt;dataset( "eprint" )-&gt;citation( "default" );
    
    
Line 52: Line 56:


  $citation = EPrints::Citation-&gt;new( $filename, %opts )
  $citation = EPrints::Citation-&gt;new( $filename, %opts )
Returns a new EPrints::Citation object read from $filename.
Returns a new EPrints::Citation object read from <tt>$filename</tt>.


Options:
Options:
Line 70: Line 74:
Attempts to reload the citation source file.
Attempts to reload the citation source file.


Returns undef if the file could not be loaded.
Returns <tt>undef</tt> if the file could not be loaded.


<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 109: Line 113:


  $type = $citation-&gt;type()
  $type = $citation-&gt;type()
Returns the type of this citation. Only supported value is "table_row".
Returns the type of this citation. Only supported value is <tt>table_row</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%; '>

Latest revision as of 12:31, 4 March 2022

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


NAME

EPrints::Citation - Loading and rendering of citation styles.

User Comments


DESCRIPTION

Renders citations for data objects using a paticular style defined in it own configuration file.

This is an abstract class used by EPrints::Citation::EPC and EPrints::Citation::XSL whichb use XML EPC and XSL respecively to define citation style files.

User Comments


SYNOPSIS

 my $citation = $repo->dataset( "eprint" )->citation( "default" );
 
 $ok = $citation->freshen();
 
 $citation->render( $eprint, %opts );
 

User Comments


METHODS

User Comments


new

$citation = EPrints::Citation->new( $filename, %opts )

Returns a new EPrints::Citation object read from $filename.

Options:

   dataset - dataset this citation belongs to

User Comments


freshen

$ok = $citation->freshen()

Attempts to reload the citation source file.

Returns undef if the file could not be loaded.

User Comments


load_source

$ok = $citation->load_source()

Reads the source file.

User Comments


render

$frag = $citation->render( $dataobj, %opts )

Renders a EPrints::DataObj using this citation style.

User Comments


type

$type = $citation->type()

Returns the type of this citation. Only supported value is table_row.

User Comments


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/.

User Comments