From 54515b42fea369e2645cc8fa4232d3f21ee883a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petter=20Goks=C3=B8yr=20=C3=85sen?= Date: Sat, 17 Sep 2016 07:14:16 +0200 Subject: [PATCH] ncip: add documentation extracted from the specification --- ncip/messages.go | 352 +++++++++++++++++++++++++++++++++++++++++++++++ ncip/ncip.go | 5 + 2 files changed, 357 insertions(+) diff --git a/ncip/messages.go b/ncip/messages.go index 8d65ce0..78dd7ef 100644 --- a/ncip/messages.go +++ b/ncip/messages.go @@ -7,6 +7,17 @@ type SchemeValue struct { Value string `xml:",innerxml"` } +// AcceptItem represents a requests that the responding application accept an +// Item to be circulated to a User. The responding application may be a third +// party that has no prior knowledge of either the User or the Item. The +// initiation message identifies the action the responding agency is requested +// to take when it receives the item. The request may include a date by which +// the initiating application requires the Item to be returned, an indication +// that the user may apply to renew the loan of the Item, and financial data +// relating to the supply of the Item. If there is a possibility that the +// responding application has no prior // knowledge of either the User or the +// Item, the request may optionally include data about the User and/or the +// Item. type AcceptItem struct { XMLName xml.Name InitiationHeader *InitiationHeader @@ -27,6 +38,10 @@ type AcceptItem struct { Ext *Ext } +// AcceptItemResponse represents a response to an AcceptItem request. The +// responder accepts the Item for the action specified. It returns the Request +// Id. It may optionally provide an Item Id that the initiating application may +// use to reference the Item in subsequent messages. type AcceptItemResponse struct { XMLName xml.Name ResponseHeader *ResponseHeader @@ -36,6 +51,9 @@ type AcceptItemResponse struct { Ext *Ext } +// AgencyCreated represents a request that informs the responding application +// that a new Agency has been created. The initiating // application provides +// the Agency Id and details about the Agency. type AgencyCreated struct { XMLName xml.Name InitiationHeader *InitiationHeader @@ -49,6 +67,8 @@ type AgencyCreated struct { Ext *Ext } +// AgencyCreatedResponse represents a response to a AgencyCreated request. The +// responding application replies that it understood the notification message. type AgencyCreatedResponse struct { XMLName xml.Name ResponseHeader *ResponseHeader @@ -56,6 +76,13 @@ type AgencyCreatedResponse struct { Ext *Ext } +// AgencyUpdated represents a request that informs the responding application +// that one or more data elements of an Agency have been updated. The +// initiating application provides elements that have been deleted with the +// value for each element and/or elements that have been added with the value +// for each element. If the value for an existing element has changed, the +// message must include that element in both the delete and add sections of the +// message. type AgencyUpdated struct { InitiationHeader *InitiationHeader AgencyId SchemeValue @@ -64,12 +91,19 @@ type AgencyUpdated struct { Ext *Ext } +// AgencyUpdatedResponse represents a response to an AgencyUpdated request. +// The responding application replies that it understood the notification +// message. type AgencyUpdatedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// CancelRecallItem represents a request that the responding application cancel +// the recall of an Item that it had previously been asked to recall. The +// initiating application may also request data about the User and/or Item +// involved with this recall cancellation. type CancelRecallItem struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -79,6 +113,9 @@ type CancelRecallItem struct { Ext *Ext } +// CancelRecallItemResponse represents a response to a CancelRecallItem request +// The responding application cancels the recall of the Item and takes +// appropriate fiscal actions. It may also supply the data elements requested. type CancelRecallItemResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -90,6 +127,10 @@ type CancelRecallItemResponse struct { Ext *Ext } +// CancelRequestItem item represents a equest that the responding application +// cancel a previous request for an Item. The initiating application may also +// request data about the User and/or Item involved with this request +// cancellation. type CancelRequestItem struct { XMLName xml.Name InitiationHeader *InitiationHeader @@ -107,6 +148,10 @@ type CancelRequestItem struct { Ext *Ext } +// CancelRequestItemResponse represents a response to a CancelRequestItem +// request. The responding application cancels the request. It may provide +// updated fiscal data about the User. It may also supply the data elements +// requested. type CancelRequestItemResponse struct { XMLName xml.Name ResponseHeader *ResponseHeader @@ -120,6 +165,9 @@ type CancelRequestItemResponse struct { Ext *Ext } +// CheckInItem represents a request that the responding application check in an +// Item. It also permits the initiating application to request data about the +// User and/or Item involved with this check in. type CheckInItem struct { XMLName xml.Name InitiationHeader *InitiationHeader @@ -130,6 +178,9 @@ type CheckInItem struct { Ext *Ext } +// CheckInItemResponse represents a response to a CheckInItem request. The +// responder checks in the Item and returns any routing data, fine/fee data, +// and/or requested User or Item data. type CheckInItemResponse struct { XMLName xml.Name ResponseHeader *ResponseHeader @@ -143,6 +194,11 @@ type CheckInItemResponse struct { Ext *Ext } +// CheckOutItem represents a request that the responding application check out +// an Item to a User. It also permits the initiating application to acknowledge +// the fee amount (if any) associated with the check out. The initiating +// application may also request data about the User and/or Item involved with this +// check out. type CheckOutItem struct { XMLName xml.Name InitiationHeader *InitiationHeader @@ -162,6 +218,9 @@ type CheckOutItem struct { Ext *Ext } +// CheckOutItemResponse represents a response to CheckOutItem request. The +// responding application checks out the Item to the User until the date +// indicated in the response. It may also supply the data elements requested. type CheckOutItemResponse struct { XMLName xml.Name ResponseHeader *ResponseHeader @@ -181,6 +240,10 @@ type CheckOutItemResponse struct { Ext *Ext } +// CirculationStatusChangeReported represents a request that the responding +// application mark an Item as reported returned, missing, lost, or never +// borrowed. The initiating application may also request data about the User +// and/or Item involved with this status change. type CirculationStatusChangeReported struct { InitiationHeader *InitiationHeader ItemId ItemId @@ -195,12 +258,22 @@ type CirculationStatusChangeReported struct { Ext *Ext } +// CirculationStatusChangeReportedResponse represents a response to a +// CirculationStatusChange request. The responding application marks the Item +// as specified by the initiator. It may also supply the data elements +// requested. type CirculationStatusChangeReportedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// CirculationStatusUpdated represents a request that informs the responding +// application that the circulation status of an Item has been updated. The +// initiating application provides the unique Id of the item Id and the new +// circulation status. Only the following three values from Circulation Status +// are valid here: Renew Still Pending, Item Not Renewed, or Item Overdue. No +// other values of Circulation Status are permitted for this service. type CirculationStatusUpdated struct { InitiationHeader *InitiationHeader ItemId ItemId @@ -208,12 +281,19 @@ type CirculationStatusUpdated struct { Ext *Ext } +// CirculationStatusUpdatedResponse represents a response to a +// CirculationStatusUpdate request. The responding application replies that it +// understood the notification message. type CirculationStatusUpdatedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// CreateAgency represents a request that the responding application create a +// record for an agency. The initiating application supplies the data elements +// to be used to create the Agency. It may optionally supply a proposed Agency +// Id. type CreateAgency struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -227,6 +307,9 @@ type CreateAgency struct { Ext *Ext } +// CreateAgencyResponse represents a response to a CreateAgency request. +// The responding application creates a record for an agency and returns a +// Agency Id. type CreateAgencyResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -234,6 +317,9 @@ type CreateAgencyResponse struct { Ext *Ext } +// CreateItem represents a request that the responding application create a +// record for an item. The initiating application supplies the data elements to +// be used to create the Item. It may optionally supply a proposed Item Id. type CreateItem struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -250,6 +336,8 @@ type CreateItem struct { Ext *Ext } +// CreateItemResponse represents a response to a CreateItem request. The +// responding application creates a record for an item and returns a Item Id. type CreateItemResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -257,6 +345,9 @@ type CreateItemResponse struct { Ext *Ext } +// CreateUser represents a request that the responding application create a +// record for a user. The initiating application supplies the data elements to +// be used to create the User. It may optionally supply a proposed User Id. type CreateUser struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -271,6 +362,8 @@ type CreateUser struct { Ext *Ext } +// CreateUserResponse represents a response to CreateUser request. The +// responding application creates a record for a user and returns a User Id. type CreateUserResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -278,6 +371,10 @@ type CreateUserResponse struct { Ext *Ext } +// CreateUserFiscalTransaction represents a request that the responding +// application create a new fiscal transaction for a service provided to a +// User. The initiating application provides the type of update and fiscal +// details about the update it wants done. type CreateUserFiscalTransaction struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -287,6 +384,9 @@ type CreateUserFiscalTransaction struct { Ext *Ext } +// CreateUserFiscalTransactionResponse represents a response to a +// CreateUserFiscalTransaction request. The responding application creates +// fiscal transaction data for the User. type CreateUserFiscalTransactionResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -295,6 +395,14 @@ type CreateUserFiscalTransactionResponse struct { Ext *Ext } +// DeleteItem represents a request that asks that the responding application +//delete an item record. This may also result in deletion of the associated +// bibliographic record, depending on the rules of the responding application. +// The purpose of this service is to enable applications to remove unnecessary +// items in weeding and binding situations as well as cleaning up after +// creation of a temporary item. The initiating application provides an +// identifier and the responder is not required to return any data other than +// an acknowledgement or an error. type DeleteItem struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -302,6 +410,9 @@ type DeleteItem struct { Ext *Ext } +// DeleteItemResponse represents a response to a DeleteItem request. The +// responding application deletes the item specified by the initiating +// application. type DeleteItemResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -309,6 +420,12 @@ type DeleteItemResponse struct { Ext *Ext } +// DeleteUser represents a request that asks that the responding application +// delete a User. This service is intended to enable resource sharing systems +// and similar applications to remove temporary users created during request +// processes. The initiating application provides an identifier and the +// responder is not required to return any data other than an acknowledgement +// or an error. type DeleteUser struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -317,6 +434,9 @@ type DeleteUser struct { Ext *Ext } +// DeleteUserResponse represents a response to a DeleteUser request. The +// responding application deletes the user record specified by the initiating +// application. type DeleteUserResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -324,6 +444,10 @@ type DeleteUserResponse struct { Ext *Ext } +// ItemCheckedIn represents a request that informs the responding application +// that an Item has been checked in. The initiating application provides the +// Unique Item Id and may optionally provide other details associated with the +// check in. type ItemCheckedIn struct { InitiationHeader *InitiationHeader UserId *UserId @@ -335,12 +459,18 @@ type ItemCheckedIn struct { Ext *Ext } +// ItemCheckedInResponse represents a response to a ItemCheckedIn request. The +// responding application replies that it understood the notification message. type ItemCheckedInResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemCheckedOut represents a request that informs the responding application +// that an Item has been checked out to a User. The initiating application +// provides the Item Id and User Id involved in the check out, and may +// optionally provide other details associated with the check out. type ItemCheckedOut struct { InitiationHeader *InitiationHeader UserId UserId @@ -358,12 +488,19 @@ type ItemCheckedOut struct { Ext *Ext } +// ItemCheckedOutResponse represents a response to an ItenCheckedOut request. +// The responding application replies that it understood the notification +// message. type ItemCheckedOutResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemCreated represents a request that informs the responding application +// that a new Item has been created. The initiating application provides the +// Item Id and details about the Item, and may optionally provide other details +// associated with the Item. type ItemCreated struct { InitiationHeader *InitiationHeader ItemId ItemId @@ -379,12 +516,19 @@ type ItemCreated struct { Ext *Ext } +// ItemCreatedResponse represents a response to an ItemCreated request. +// The responding application replies that it understood the notification +// message. type ItemCreatedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemRecallCancelled represents a request that informs the responding +// application that a recall has been cancelled. The initiating application +// provides the Item Id, and may optionally provide the User Id and other data +// related to cancellation of the recall. type ItemRecallCancelled struct { InitiationHeader *InitiationHeader UserId *UserId @@ -395,12 +539,19 @@ type ItemRecallCancelled struct { Ext *Ext } +// ItemRecallCancelledResponse represents a response to an ItemRecallCanceled +// request. The responding application replies that it understood the +// notification message type ItemRecallCancelledResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemRecalled represents a request that informs the responding application +// that an Item has been recalled. The initiating application provides the Item +// Id of the recalled item and a new due date, and may optionally provide other +// details associated with the recall. type ItemRecalled struct { InitiationHeader *InitiationHeader UserId *UserId @@ -412,12 +563,19 @@ type ItemRecalled struct { Ext *Ext } +// ItemRecalledResponse represents a response to an ItemRecalled request. The +// responding application replies that it understood the notification message. type ItemRecalledResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemReceived represents a request that informs the responding application +// that an agency has received an item. If the item has been received on behalf +// of a user, then data about that User should also be included in the message. +// The initiating application may optionally provide other details associated +// with the receipt of the Item. type ItemReceived struct { InitiationHeader *InitiationHeader ItemId ItemId @@ -429,12 +587,18 @@ type ItemReceived struct { Ext *Ext } +// ItemReceivedResponse represents a response to an ItemReceived request. The +// responding application replies that it understood the notification message. type ItemReceivedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemRenewed represents a request that informs the responding application +// that an Item has been renewed. The initiating application provides the Item +// Id and the new due date, and may optionally supply other details associated +// with the renewal. type ItemRenewed struct { InitiationHeader *InitiationHeader UserId *UserId @@ -447,12 +611,19 @@ type ItemRenewed struct { Ext *Ext } +// ItemRenewedResponse represents a response to an ItemRenewed request. The +// responding application replies that it understood the notification message. type ItemRenewedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemRequestCancelled represents a request that informs the responding +// application that a request for an Item has been cancelled. The initiating +// application provides the Item Id and/or Request Id, and the User Id, and the +// type of the request being cancelled. It may optionally provide other details +// associated with the request being cancelled. type ItemRequestCancelled struct { InitiationHeader *InitiationHeader UserId UserId @@ -466,12 +637,23 @@ type ItemRequestCancelled struct { Ext *Ext } +// ItemRequestCancelledResponse represents a response to an ItemRequestCancelled +// request. The responding application replies that it understood the notification +// message. type ItemRequestCancelledResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemRequestUpdated represents a request that informs the responding +// application that a request for an Item has been updated. The initiating +// application provides the Item Id and the User Id, or the Request Id. The +// initiating application provides elements that have been deleted with the +// value for each element and/or elements that have been added with the value +// for each element. If the value for an existing element has changed, the +// message must include that element in both the delete and add sections of the +// message. Other data may also be provided. type ItemRequestUpdated struct { InitiationHeader *InitiationHeader UserId UserId @@ -485,12 +667,20 @@ type ItemRequestUpdated struct { Ext *Ext } +// ItemRequestUpdatedResponse represents a response to an ItemRequestUpdated +// request. The responding application replies that it understood the +// notification message. type ItemRequestUpdatedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemRequested represents a request that informs the responding application +// that a request for an Item, which may not be immediately available, has been +// made. The initiating application provides the Item Id, or the Request Id and +// Bibliographic Id. It also provides the User Id and the type of request being +// made. It may also optionally provide other details related to the request. type ItemRequested struct { InitiationHeader *InitiationHeader UserId UserId @@ -511,12 +701,20 @@ type ItemRequested struct { Ext *Ext } +// ItemRequestedResponse represents a response to a ItemRequested request. The +// responding application replies that it understood the notification message. type ItemRequestedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemShipped represents a request that informs the responding application +// that an Agency has shipped an Item. The date when the Item was shipped and +// the address to which it was shipped must be included in the message. When +// shipment supports a user request, User data should be supplied with the +// message. The initiating application may also provide other details +// associated with shipment of the Item. type ItemShipped struct { InitiationHeader *InitiationHeader RequestId RequestId @@ -529,12 +727,21 @@ type ItemShipped struct { Ext *Ext } +// ItemShippedResponse represents a response to an ItemShipped request. The +// responding application replies that it understood the notification message. type ItemShippedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// ItemUpdated represents a request that informs the responding application +// that one or more data elements of an Item have been updated. The initiating +// application provides elements that have been deleted with the value for each +// element and/or elements that have been added with the value for each element. +// If the value for an existing element has changed, the message must include +// that element in both the delete and add sections of the message. This +// service may not be used to report changes to circulation status. type ItemUpdated struct { InitiationHeader *InitiationHeader ItemId ItemId @@ -543,12 +750,18 @@ type ItemUpdated struct { Ext *Ext } +// ItemUpdatedResponse represents a response to an ItemUpdated request. The +// responding application replies that it understood the notification message. type ItemUpdatedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// LookupAgency represents a request that requests data about a particular +// Agency known to the responding application. The initiating application +// provides the Id of the Agency and the list of elements for which data is +// requested. type LookupAgency struct { InitiationHeader *InitiationHeader AgencyId SchemeValue @@ -556,6 +769,8 @@ type LookupAgency struct { Ext *Ext } +// LookupAgencyResponse represents a response to a LookupAgency request. The +// responding application returns the requested data to the initiating application. type LookupAgencyResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -569,6 +784,9 @@ type LookupAgencyResponse struct { Ext *Ext } +// LookupItem represents a request that data about a particular Item known to +// the responding application. The initiator provides the Id of the Item and a +// list of elements for which data is requested. type LookupItem struct { InitiationHeader *InitiationHeader ItemId *ItemId @@ -579,6 +797,9 @@ type LookupItem struct { Ext *Ext } +// LookupItemResponse represents a response to a LookupItem request. The +// responding application returns the requested data to the initiating +// application. type LookupItemResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -591,6 +812,9 @@ type LookupItemResponse struct { Ext *Ext } +// LookupRequest represents a request that data about a particular Request +// known to the responding application. The initiator provides the Id of the +// Request and a list of elements for which data is requested. type LookupRequest struct { InitiationHeader *InitiationHeader UserId *UserId @@ -604,6 +828,9 @@ type LookupRequest struct { Ext *Ext } +// LookupRequestResponse represents a response to a LookupRequest request. The +// responding application returns the requested data to the initiating +// application. type LookupRequestResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -629,6 +856,9 @@ type LookupRequestResponse struct { Ext *Ext } +// LookupUser represents a request that data about a particular User known to +// the responding application. The initiator provides the Id of the User and a +// list of elements for which data is requested. type LookupUser struct { XMLName xml.Name InitiationHeader *InitiationHeader @@ -641,6 +871,9 @@ type LookupUser struct { Ext *Ext } +// LookupUserResponse represents a response to a LookupUser request. The +// responding application returns the requested data to the initiating +// application. type LookupUserResponse struct { XMLName xml.Name ResponseHeader *ResponseHeader @@ -655,6 +888,10 @@ type LookupUserResponse struct { Ext *Ext } +// RecallItem represents a request that the responding application recall an +// Item from a User. The initiating application may propose a new date due for +// the Item. The initiating application may also request data about the User +// and/or Item involved with this recall. type RecallItem struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -666,6 +903,10 @@ type RecallItem struct { Ext *Ext } +// RecallItemResponse represents a response to a RecallItem request. The +// responding application agrees to recall the Item and to take appropriate +// action. It may supply the new date on which the Item is now due. It may +// supply the data elements requested. type RecallItemResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -678,6 +919,11 @@ type RecallItemResponse struct { Ext *Ext } +// RenewItem represents a request that the responding application renew an Item +// for a User. The initiating application may include a suggested revision of +// the due date and an acknowledgement of fee amount. The initiating +// application may also request data about the User and/or Item involved with +// this renewal. type RenewItem struct { XMLName xml.Name InitiationHeader *InitiationHeader @@ -695,6 +941,10 @@ type RenewItem struct { Ext *Ext } +// RenewItemResponse represents a response to a RenewItem request. The +// responding application renews the Item to the User and provides a +// revised date on which the Item now is due. It may also supply the data +// elements requested. type RenewItemResponse struct { XMLName xml.Name ResponseHeader *ResponseHeader @@ -713,6 +963,10 @@ type RenewItemResponse struct { Ext *Ext } +// ReportCirculationStatusChange represents a request that the responding +// application mark an Item as reported returned, missing, lost, or never +// borrowed. The initiating application may also request data about the User +// and/or Item involved with this status change. type ReportCirculationStatusChange struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -728,6 +982,10 @@ type ReportCirculationStatusChange struct { Ext *Ext } +// ReportCirculationStatusChangeResponse represents a response to a +// ReportCirculationStatusChange request.The responding application marks the +// Item as specified by the initiator. It may also supply the data elements +// requested. type ReportCirculationStatusChangeResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -738,6 +996,12 @@ type ReportCirculationStatusChangeResponse struct { Ext *Ext } +// RequestItem represents a request that the responding application place a +// request on an Item for a User whether or not the Item is immediately +// available. The initiating application indicates the type of request being +// made. The initiating application may optionally provide an acknowledgement +// of the fee to be charged for the service. The initiating application may +// also request data about the User and/or Item involved with this request. type RequestItem struct { XMLName xml.Name InitiationHeader *InitiationHeader @@ -763,6 +1027,10 @@ type RequestItem struct { Ext *Ext } +// RequestItemResponse represents a response to a RequestItem request. The +// responding application places the request and provides data about where the +// Item may be picked up and the date it expects the Item to be available. It +// may also supply the data elements requested. type RequestItemResponse struct { XMLName xml.Name ResponseHeader *ResponseHeader @@ -783,6 +1051,11 @@ type RequestItemResponse struct { Ext *Ext } +// SendUserNotice represents a request that the responding application send a +// notice to a user. The initiating application provides the Id of the User and +// the type of notice to send. The initiating application may optionally +// provide a date on which it desires the notice be sent, and the content of +// the notice. type SendUserNotice struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -792,6 +1065,9 @@ type SendUserNotice struct { Ext *Ext } +// SendUserNoticeResponse represents a response to a SendUserNotice request. +// The responding application agrees to send a notice and may provide either +// the date the notice was sent or the date on which it will send the notice. type SendUserNoticeResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -801,6 +1077,11 @@ type SendUserNoticeResponse struct { Ext *Ext } +// UndoCheckOutItem represents a request that the responding application undo +// the check out that immediately preceded this message. If the responder +// agrees to the request, processing continues as if the preceding check out +// had never occurred. This service is typically used by self-check +// applications. type UndoCheckOutItem struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -811,6 +1092,8 @@ type UndoCheckOutItem struct { Ext *Ext } +// UndoCheckOutItemResponse represents a response to a UndoCheckOutItem +// request. The immediately preceding check out is undone. type UndoCheckOutItemResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -820,6 +1103,12 @@ type UndoCheckOutItemResponse struct { Ext *Ext } +// UpdateAgency represents a request that the responding application update +// data about an Agency. The initiating application provides elements to be +// deleted with the value for each element and/or elements to be added with the +// value for each element. If the initiating application is changing the value +// for an existing element, it must include that element in both the delete and +// add sections of the message. type UpdateAgency struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -829,6 +1118,9 @@ type UpdateAgency struct { Ext *Ext } +// UpdateAgencyResponse represents a response to an UpdateAgency request. The +// responding application updates data about the Agency as specified by the +// initiating application. type UpdateAgencyResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -836,6 +1128,9 @@ type UpdateAgencyResponse struct { Ext *Ext } +// UpdateCirculationStatus represents a request that the responding application +// update the circulation status of an Item. The initiating application +// provides the Id of the item Id and the new circulation status. type UpdateCirculationStatus struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -844,6 +1139,9 @@ type UpdateCirculationStatus struct { Ext *Ext } +// UpdateCirculationStatusResponse represents a response to a +// UpdateCirculationStats request. The responding application updates the +// circulation status as specified by the initiating application. type UpdateCirculationStatusResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -851,6 +1149,13 @@ type UpdateCirculationStatusResponse struct { Ext *Ext } +// UpdateItem represents a request that the responding application update data +// about an Item. The initiating application provides elements to be deleted +// with the value for each element and/or elements to be added with the value +// for each element. If the initiating application is changing the value for an +// existing element, it must include that element in both the delete and add +// sections of the message. This service cannot be used to change the +// circulation status of an Item. type UpdateItem struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -860,6 +1165,9 @@ type UpdateItem struct { Ext *Ext } +// UpdateItemResponse represents a response to an UpdateItem request. The +// responding application updates data about the Item as specified by the +// initiating application. type UpdateItemResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -867,6 +1175,12 @@ type UpdateItemResponse struct { Ext *Ext } +// UpdateRequestItem represents a request that asks the responding application +// to update data about a request for an Item made by a User. The initiating +// application provides elements to be deleted with the value for each element +// and/or elements to be added with the value for each element. If the +// initiating application is changing the value for an existing element, it +// must include that element in both the delete andadd sections of the message. type UpdateRequestItem struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -882,6 +1196,9 @@ type UpdateRequestItem struct { Ext *Ext } +// UpdateRequestItemResponse represents a response to a UpdateRequestItem +// request. The responding application updates the Item request as specified by +// the initiating application. type UpdateRequestItemResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -899,6 +1216,12 @@ type UpdateRequestItemResponse struct { Ext *Ext } +// UpdateUser represents a request that the responding application update data +// about a User. The initiating application provides elements to be deleted +// with the value for each element and/or elements to be added with the value +// for each element. If the initiating application is changing the value for an +// existing element, it must include that element in both the delete and add +//sections of the message. type UpdateUser struct { InitiationHeader *InitiationHeader MandatedAction *MandatedAction @@ -909,6 +1232,9 @@ type UpdateUser struct { Ext *Ext } +// UpdateUserResponse represents a response to an UpdateUser request. The +// responding application updates data about the User as specified by the +// initiating application. type UpdateUserResponse struct { ResponseHeader *ResponseHeader Problem []Problem @@ -916,6 +1242,10 @@ type UpdateUserResponse struct { Ext *Ext } +// UserCreated represents a request that informs the responding application +// that a record for a user has been created. The initiating application +// provides Name Information and the User Id and may optionally provide +// additional data about the new User. type UserCreated struct { InitiationHeader *InitiationHeader UserId UserId @@ -928,12 +1258,17 @@ type UserCreated struct { Ext *Ext } +// UserCreatedResponse represents a response to an UserCreated request. The +// responding application replies that it understood the notification message. type UserCreatedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// UserFiscalTransactionCreated represents a request that informs the responding +// application that a new fiscal transaction has been applied to a User’s +// fiscal account. type UserFiscalTransactionCreated struct { InitiationHeader *InitiationHeader UserId UserId @@ -941,12 +1276,18 @@ type UserFiscalTransactionCreated struct { Ext *Ext } +// UserFiscalTransactionCreatedResponse represents a response to an +// UserFiscalTransactionCreated request. The responding application replies +// that it understood the notification message. type UserFiscalTransactionCreatedResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// UserNoticeSent represents a request that informs the responding application +// that a notice has been sent to a User. The initiating application provides +// the User Id, the type of notice, and details about the notice. type UserNoticeSent struct { InitiationHeader *InitiationHeader UserId UserId @@ -955,12 +1296,21 @@ type UserNoticeSent struct { Ext *Ext } +// UserNoticeSentResponse represents a response to an UserNoticeSent request. +// The responding application replies that it understood the notification +// message. type UserNoticeSentResponse struct { ResponseHeader *ResponseHeader Problem []Problem Ext *Ext } +// UserUpdated represents a request that informs the responding application +// that one or more data elements of a User have been updated. The initiating +// application provides elements that have been deleted with the value for each +// element and/or elements that have been added with the value for each +// element. If the value for an existing element has changed, the message must +// include that element in both the delete and add sections of the message. type UserUpdated struct { InitiationHeader *InitiationHeader UserId UserId @@ -969,6 +1319,8 @@ type UserUpdated struct { Ext *Ext } +// UserUpdatedResponse represents a response to an UserUpdated request. The +// responding application replies that it understood the notification message. type UserUpdatedResponse struct { ResponseHeader *ResponseHeader Problem []Problem diff --git a/ncip/ncip.go b/ncip/ncip.go index cf36456..9982032 100644 --- a/ncip/ncip.go +++ b/ncip/ncip.go @@ -1,3 +1,8 @@ +// Package ncip provides data structures and means for working with the +// NISO Circulation Interchange Protocol (NCIP). +// +// The package is based on NCIP version 2.02, as documented in the xsd shcema +// available at http://www.ncip.info/the-standard.html package ncip type Request interface {