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

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<!-- Pod2Wiki=_preamble_  
 
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
+
This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/Access.pm|package_name=EPrints::DataObj::Access}}[[Category:API|Access]]<!-- End of Pod2Wiki -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/Access.pm|package_name=EPrints::DataObj::Access}}[[Category:API|ACCESS]][[Category:API:EPrints/DataObj|ACCESS]]<div><!-- Edit below this comment -->
<!-- Pod2Wiki=head_name -->=NAME=
+
 
 +
 
 +
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 +
==NAME==
 
'''EPrints::DataObj::Access''' - Accesses to the Web server
 
'''EPrints::DataObj::Access''' - Accesses to the Web server
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
+
<span style='display:none'>User Comments</span>
Inherits from [[API:EPrints/DataObj|EPrints::DataObj]].
+
<!-- Edit below this comment -->
 +
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_instance_variables -->=INSTANCE VARIABLES=
+
</div>
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=head_description -->
<!-- Pod2Wiki=item_$obj->{ -->==$obj->{==
+
==DESCRIPTION==
 +
Accesses to particular abstract/summary pages (views) or publication  documents (downloads).
  
  $obj-&gt;{ "data" }
+
<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 -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_$obj->{ -->==$obj->{==
 
  
  $obj-&gt;{ "dataset" }
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_core_metadata_fields -->
 +
==CORE METADATA FIELDS==
 +
<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 -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_$obj->{ -->==$obj->{==
 
  
  $obj-&gt;{ "session" }
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_accessid -->
 +
===accessid (counter)===
  
<!-- End of Pod2Wiki -->
+
Unique ID for the access.
<!-- Pod2Wiki=head_core_fields -->=CORE FIELDS=
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_accessid -->==accessid==
 
  
Unique id for the access.
+
<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 -->
  
<!-- End of Pod2Wiki -->
+
 
<!-- Pod2Wiki=item_datestamp -->==datestamp==
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_datestamp -->
 +
===datestamp (timestamp)===
  
 
Time of access.
 
Time of access.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_requester_id -->==requester_id==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_requester_id -->
 +
===requester_id (text)===
 +
 
 +
ID of the requesting user-agent. (Typically an IP address).
 +
 
 +
<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_requester_user_agent -->
 +
===requester_user_agent (text)===
  
Id of the requesting user-agent (typically IP address).
+
The HTTP user agent string. (Useful for robots spotting).
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_requester_user_agent -->==requester_user_agent==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
The HTTP user agent string (useful for robots spotting).
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_requester_country -->==requester_country==
+
</div>
 +
<!-- Pod2Wiki=item_requester_country -->
 +
===requester_country (text)===
  
Country the request originated from.
+
The country from which the request originated. (Typically determined  using {{API:PodLink|file=Geo/IP|package_name=Geo::IP|section=|text=Geo::IP}}).  
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_requester_institution -->==requester_institution==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
Institution the request originated from.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_referring_entity_id -->==referring_entity_id==
+
</div>
 +
<!-- Pod2Wiki=item_requester_institution -->
 +
===requester_institution (text)===
  
Id of the object from which the user agent came from (i.e. HTTP referrer).
+
The institution from which the request originated. (This could be used  to store the Net-Name from a WHOIS lookup).
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_service_type_id -->==service_type_id==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
Id of the type of service requested.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_referent_id -->==referent_id==
+
</div>
 +
<!-- Pod2Wiki=item_referring_entity_id -->
 +
===referring_entity_id (longtext)===
  
Id of the object requested.
+
ID of the object from which the user agent came from (i.e. HTTP  referrer).
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_referent_docid -->==referent_docid==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
Id of the document requested (if relevent).
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_methods -->=METHODS=
+
</div>
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_service_type_id -->
<!-- Pod2Wiki=item_get_system_field_info -->==get_system_field_info==
+
===service_type_id (text)===
  
  $thing = EPrints::DataObj::Access-&gt;get_system_field_info
+
Id of the type of service requested. (E.g. abstract view or full text download).
  
Core fields contained in a Web access.
+
<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 -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_constructor_methods -->==Constructor Methods==
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_new -->===new===
 
  
  $thing = EPrints::DataObj::Access-&gt;new( $session, $accessid )
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_referent_id -->
 +
===referent_id (int)===
  
The data object identified by $accessid.
+
ID of the object requested. (Normally the eprint ID).
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_new_from_data -->===new_from_data===
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  $thing = EPrints::DataObj::Access-&gt;new_from_data( $session, $known )
 
  
A new <tt>EPrints::DataObj::Access</tt> object containing data $known (a hash reference).
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_referent_docid -->
 +
===referent_docid (int)===
  
<!-- End of Pod2Wiki -->
+
ID of the document requested (if relevant).
<!-- Pod2Wiki=head_class_methods -->==Class Methods==
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_remove_all -->===remove_all===
 
  
  EPrints::DataObj::Access::remove_all( $session )
+
<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 -->
  
Remove all records from the license dataset.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_gid -->===get_gid===
+
</div>
 +
<!-- Pod2Wiki=head_references_and_related_objects -->
 +
==REFERENCES AND RELATED OBJECTS==
 +
None.
  
  $dataset = $eprint-&gt;get_gid
+
<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 -->
  
Returns the OAI identifier for this access.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_defaults -->===get_defaults===
+
</div>
 +
<!-- Pod2Wiki=head_instance_variables -->
 +
==INSTANCE VARIABLES==
 +
See [[API:EPrints/DataObj#INSTANCE_VARIABLES|EPrints::DataObj/INSTANCE_VARIABLES]].
  
  $defaults = EPrints::DataObj::Access-&gt;get_defaults( $session, $data )
+
<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 -->
  
Return default values for this object based on the starting data.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_object_methods -->==Object Methods==
+
</div>
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=head_methods -->
<!-- Pod2Wiki=item_remove -->===remove===
+
==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 -->
  
  $foo = $thing-&gt;remove()
 
  
Remove this record from the data set (see [[API:EPrints/Database|EPrints::Database]]).
+
<!-- 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%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_referent_id -->===get_referent_id===
 
  
  $dataobj-&gt;get_referent_id()
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_get_system_field_info -->
 +
====get_system_field_info====
  
Return the fully qualified referent id.
+
$fields = EPrints::DataObj::Access-&gt;get_system_field_info
 +
Returns an array describing the system metadata of the access dataset.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_get_requester_id -->===get_requester_id===
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  $dataobj-&gt;get_requester_id()
 
  
Return the fully qualified requester id.
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_get_dataset_id -->
 +
====get_dataset_id====
  
<!-- End of Pod2Wiki -->
+
$dataset = EPrints::DataObj::Access-&gt;get_dataset_id
<!-- Pod2Wiki=head_see_also -->=SEE ALSO=
+
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%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- 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%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_get_referent_id -->
 +
====get_referent_id====
 +
 
 +
$referent_id = $access-&gt;get_referent_id
 +
Returns the fully-qualified referent ID.
 +
 
 +
<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_get_requester_id -->
 +
====get_requester_id====
 +
 
 +
$requester_id = $access-&gt;get_requester_id
 +
Return the fully-qualified requester ID.
 +
 
 +
<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]].
 
[[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]].
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_copyright -->
 +
==COPYRIGHT==
 +
{{API:Copyright}}
 +
<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=_postamble_ --><!-- Edit below this comment -->

Latest revision as of 11:11, 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


API: Core API

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


NAME

EPrints::DataObj::Access - Accesses to the Web server

User Comments


DESCRIPTION

Accesses to particular abstract/summary pages (views) or publication documents (downloads).

User Comments


CORE METADATA FIELDS

User Comments


accessid (counter)

Unique ID for the access.

User Comments


datestamp (timestamp)

Time of access.

User Comments


requester_id (text)

ID of the requesting user-agent. (Typically an IP address).

User Comments


requester_user_agent (text)

The HTTP user agent string. (Useful for robots spotting).

User Comments


requester_country (text)

The country from which the request originated. (Typically determined using Geo::IP).

User Comments


requester_institution (text)

The institution from which the request originated. (This could be used to store the Net-Name from a WHOIS lookup).

User Comments


referring_entity_id (longtext)

ID of the object from which the user agent came from (i.e. HTTP referrer).

User Comments


service_type_id (text)

Id of the type of service requested. (E.g. abstract view or full text download).

User Comments


referent_id (int)

ID of the object requested. (Normally the eprint ID).

User Comments


referent_docid (int)

ID of the document requested (if relevant).

User Comments


REFERENCES AND RELATED OBJECTS

None.

User Comments


INSTANCE VARIABLES

See EPrints::DataObj/INSTANCE_VARIABLES.

User Comments


METHODS

User Comments


Class Methods

User Comments


get_system_field_info

$fields = EPrints::DataObj::Access->get_system_field_info

Returns an array describing the system metadata of the access dataset.

User Comments


get_dataset_id

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

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

User Comments


Object Methods

User Comments


get_referent_id

$referent_id = $access->get_referent_id

Returns the fully-qualified referent ID.

User Comments


get_requester_id

$requester_id = $access->get_requester_id

Return the fully-qualified requester ID.

User Comments


SEE ALSO

EPrints::DataObj and EPrints::DataSet.

User Comments


COPYRIGHT

© Copyright 2023 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