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

From EPrints Documentation
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 17: Line 17:
 
<!-- Pod2Wiki=head_description -->
 
<!-- Pod2Wiki=head_description -->
 
==DESCRIPTION==
 
==DESCRIPTION==
Inherits from [[API:EPrints/DataObj|EPrints::DataObj]].
+
Accesses to particular abstract/summary pages (views) or publication  documents (downloads).
  
 
<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 26: Line 26:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=head_instance_variables -->
+
<!-- Pod2Wiki=head_core_metadata_fields -->
==INSTANCE VARIABLES==
+
==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%; '>
 
<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 35: Line 35:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_$obj->{ -->
+
<!-- Pod2Wiki=item_accessid -->
===$obj-&gt;{ "data" }===
+
===accessid (counter)===
 
 
<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 -->
 
  
 
+
Unique ID for the access.
<!-- Pod2Wiki= -->
 
</div>
 
<!-- Pod2Wiki=item_$obj->{ -->
 
===$obj-&gt;{ "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%; '>
Line 55: Line 47:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_$obj->{ -->
+
<!-- Pod2Wiki=item_datestamp -->
===$obj-&gt;{ "session" }===
+
===datestamp (timestamp)===
  
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
+
Time of access.
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
  
 
<!-- 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%; '>
 
<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 74: Line 59:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_accessid -->
+
<!-- Pod2Wiki=item_requester_id -->
===accessid===
+
===requester_id (text)===
  
Unique id for the access.
+
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%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 86: Line 71:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_datestamp -->
+
<!-- Pod2Wiki=item_requester_user_agent -->
===datestamp===
+
===requester_user_agent (text)===
  
Time of access.
+
The HTTP user agent string. (Useful for robots spotting).
  
 
<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 98: Line 83:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_requester_id -->
+
<!-- Pod2Wiki=item_requester_country -->
===requester_id===
+
===requester_country (text)===
  
Id of the requesting user-agent (typically IP address).
+
The country from which the request originated. (Typically determined  using {{API:PodLink|file=Geo/IP|package_name=Geo::IP|section=|text=Geo::IP}}).  
  
 
<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 110: Line 95:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_requester_user_agent -->
+
<!-- Pod2Wiki=item_requester_institution -->
===requester_user_agent===
+
===requester_institution (text)===
  
The HTTP user agent string (useful for robots spotting).
+
The institution from which the request originated. (This could be used  to store the Net-Name from a WHOIS lookup).
  
 
<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 122: Line 107:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_requester_country -->
+
<!-- Pod2Wiki=item_referring_entity_id -->
===requester_country===
+
===referring_entity_id (longtext)===
  
Country the request originated from.
+
ID of the object from which the user agent came from (i.e. HTTP  referrer).
  
 
<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 134: Line 119:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_requester_institution -->
+
<!-- Pod2Wiki=item_service_type_id -->
===requester_institution===
+
===service_type_id (text)===
  
Institution the request originated from.
+
Id of the type of service requested. (E.g. abstract view or full text download).
  
 
<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 146: Line 131:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_referring_entity_id -->
+
<!-- Pod2Wiki=item_referent_id -->
===referring_entity_id===
+
===referent_id (int)===
  
Id of the object from which the user agent came from (i.e. HTTP referrer).
+
ID of the object requested. (Normally the eprint ID).
  
 
<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 158: Line 143:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_service_type_id -->
+
<!-- Pod2Wiki=item_referent_docid -->
===service_type_id===
+
===referent_docid (int)===
  
Id of the type of service requested.
+
ID of the document requested (if relevant).
  
 
<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 170: Line 155:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_referent_id -->
+
<!-- Pod2Wiki=head_references_and_related_objects -->
===referent_id===
+
==REFERENCES AND RELATED OBJECTS==
 
+
None.
Id of the object requested.
 
  
 
<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 182: Line 166:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_referent_docid -->
+
<!-- Pod2Wiki=head_instance_variables -->
===referent_docid===
+
==INSTANCE VARIABLES==
 
+
See [[API:EPrints/DataObj#INSTANCE_VARIABLES|EPrints::DataObj/INSTANCE_VARIABLES]].
Id of the document requested (if relevent).
 
  
 
<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 203: Line 186:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_get_system_field_info -->
+
<!-- Pod2Wiki=head_class_methods -->
===get_system_field_info===
+
===Class Methods===
 
 
$thing = EPrints::DataObj::Access-&gt;get_system_field_info
 
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%; '>
 
<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 216: Line 195:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=head_class_methods -->
+
<!-- Pod2Wiki=item_get_system_field_info -->
===Class Methods===
+
====get_system_field_info====
 +
 
 +
$fields = EPrints::DataObj::Access-&gt;get_system_field_info
 +
Returns an array describing the system metadata of the access 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%; '>
 
<span style='display:none'>User Comments</span>
 
<span style='display:none'>User Comments</span>
Line 250: Line 233:
 
====get_referent_id====
 
====get_referent_id====
  
  $dataobj-&gt;get_referent_id()
+
  $referent_id = $access-&gt;get_referent_id
Returns the fully qualified 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%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 263: Line 246:
 
====get_requester_id====
 
====get_requester_id====
  
  $dataobj-&gt;get_requester_id
+
  $requester_id = $access-&gt;get_requester_id
Return the fully qualified 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%; '>
 
<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 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 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