.. _UC22:

Use Case 22 - Link/Citation Report for Owner
--------------------------------------------

.. index:: Use Case 22, UC22, report, citation, object reference report

Revisions
  View document revision history_.

Goal
  User can get report of links and citations to objects they own (also can 
  view this as a referrer log).

Summary 

  A data owner would benefit from having a report that indicated the 
  connections to objects they own. Within DataONE, this could be handled by
  examining the object associations contained in the system metadata. For 
  external references to content, DataONE could provide summaries generated 
  from log reports, though with much greater uncertainty.

Actors
  - Data owner
  - Data referrer
  - Member Nodes
  - Coordinating Node

Preconditions 
  - Owner has content in DataONE
  - References to content appear directly in system metadata or in access logs
  
Triggers
  - Owner requests report for content citations and references
  - Scheduled report generated for data owner
 
Post Conditions
  - Owner has a report on citations and references to their data
  - System state is updated to enable reporting for the next time period

.. 
   @startuml images/22_seq.png
   actor "User (Data Owner)" as user
   participant "Client" as app_client << Application >>
   user -> app_client
   participant "Authentication API" as c_authenticate << Coordinating Node >>
   app_client -> c_authenticate: login (user, pw)
   app_client <-- c_authenticate: token or failure
   participant "Query API" as c_query << Coordinating Node >>
   app_client -> c_query: getLinksAndCites (PID, fromDate, toDate)
   participant "Authorization API" as c_authorize << Coordinating Node >>
   c_query -> c_authorize: isAuth (token, resultset)
   participant "Verify API" as c_ver << Coordinating Node >>
   c_authorize -> c_ver: isValidToken (token)
   c_authorize <-- c_ver: T or F
   c_query <-- c_authorize: T or F
   app_client <-- c_query: records or fail
   note right
   Can the Query API handle queries
   on log records or should this be
   handled by another API?
   (e.g. "Report API"?)
   end note
   @enduml

.. image::  images/22_seq.png

*Figure 1.* Interactions for use case 22, User can get report of links, cites
my data (also can view this as a referrer log)

.. _history: https://redmine.dataone.org/projects/d1/repository/changes/documents/Projects/cicore/architecture/api-documentation/source/design/UseCases/22_uc.txt