Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
PKPCitationGridHandler Class Reference
Inheritance diagram for PKPCitationGridHandler:
GridHandler PKPHandler CitationGridHandler

Public Member Functions

 _getExportFilterConfiguration ()
 
_handleCitationForm (&$args, &$request, $persist=true)
 
 _recheckCitation (&$request, &$originalCitation, $persist=true)
 
 addCitation (&$args, &$request)
 
 checkCitation (&$args, &$request)
 
 deleteCitation (&$args, &$request)
 
 editCitation (&$args, &$request)
 
 exportCitations (&$args, &$request, $noCitationsFoundMessage)
 
 fetchCitationFormErrorsAndComparison (&$args, &$request)
 
 getAssocId ()
 
getAssocObject ()
 
 getAssocType ()
 
getCitationFromArgs ($request, &$args, $createIfMissing=false)
 
 getIsSubcomponent ()
 
getRowInstance ()
 
 initialize (&$request, $args)
 
 PKPCitationGridHandler ()
 
 sendAuthorQuery (&$args, &$request)
 
 setAssocObject (&$assocObject)
 
 setAssocType ($assocType)
 
 updateCitation (&$args, &$request)
 
 updateRawCitation (&$args, &$request)
 
- Public Member Functions inherited from GridHandler
 _addFeatures ($features)
 
 _fixColumnWidths ()
 
_getInitializedRowInstance (&$request, $elementId, &$element, $isModified=false)
 
 _renderCellInternally (&$request, &$row, &$column)
 
 _renderGridBodyPartsInternally (&$request)
 
 _renderRowsInternally (&$request, &$elements)
 
 addAction ($action, $position=GRID_ACTION_POSITION_ABOVE)
 
 addColumn (&$column)
 
 authorize (&$request, &$args, $roleAssignments)
 
 callFeaturesHook ($hookName, $args)
 
 doSpecificFetchGridActions ($args, &$request, &$templateMgr)
 
 fetchCell (&$args, &$request)
 
 fetchGrid ($args, &$request)
 
 fetchRow (&$args, &$request)
 
 getActions ($position=GRID_ACTION_POSITION_ABOVE)
 
getColumn ($columnId)
 
getColumns ()
 
getColumnsByFlag ($flag)
 
 getColumnsCount ($flag)
 
getDataElementFromRequest (&$request, &$elementId)
 
getDataProvider ()
 
 getEmptyRowText ()
 
 getFeatures ()
 
 getFilterForm ()
 
 getFilterSelectionData ($request)
 
 getFootNote ()
 
getGridDataElements ($request)
 
 getInstructions ()
 
 getIsSubcomponent ()
 
 getJSHandler ()
 
 getPublishChangeEvents ()
 
 getRangeInfo ($rangeName, $contextData=null)
 
 getRequestArg ($key)
 
 getRequestArgs ()
 
getRequestedRow ($request, $args)
 
 getRowDataElement ($request, $rowId)
 
 getRowDataElementSequence (&$gridDataElement)
 
getRowInstance ()
 
 getTemplate ()
 
 getTitle ()
 
 getUrls ()
 
 GridHandler ($dataProvider=null)
 
 hasColumn ($columnId)
 
 hasGridDataElements ($request)
 
 initFeatures (&$request, $args)
 
 initialize (&$request, $args=null)
 
loadData (&$request, $filter)
 
 noAutocompleteResults ()
 
 renderFilter ($request, $filterData=array())
 
 renderRowInternally (&$request, &$row)
 
 saveRowDataElementSequence (&$request, $rowId, &$gridDataElement, $newSequence)
 
 saveSequence ($args, &$request)
 
 setEmptyRowText ($emptyRowText)
 
 setFirstDataColumn ()
 
 setFootNote ($footNote)
 
 setGridDataElements (&$data)
 
 setInstructions ($instructions)
 
 setTemplate ($template)
 
 setTitle ($title)
 
 setUrls (&$request, $extraUrls=array())
 
- Public Member Functions inherited from PKPHandler
 addCheck (&$handlerValidator)
 
 addPolicy (&$authorizationPolicy, $addToTop=false)
 
 addRoleAssignment ($roleIds, $operations)
 
 authorize (&$request, &$args, $roleAssignments)
 
getAuthorizedContext ()
 
getAuthorizedContextObject ($assocType)
 
getDispatcher ()
 
 getId ()
 
 getLastAuthorizationMessage ()
 
 getLoginExemptions ()
 
getRangeInfo ($rangeName, $contextData=null)
 
 getRoleAssignment ($roleId)
 
 getRoleAssignments ()
 
 hashPageContext ($contextData=array())
 
 index ()
 
 initialize (&$request, $args=null)
 
 PKPHandler ()
 
 setDispatcher (&$dispatcher)
 
 setId ($id)
 
 validate ($requiredContexts=null, $request=null)
 

Detailed Description

Handle generic parts of citation grid requests.

Definition at line 23 of file PKPCitationGridHandler.inc.php.

Member Function Documentation

PKPCitationGridHandler::_getExportFilterConfiguration ( )

This method returns the texts and filter groups that should be presented for citation reference list export.

FIXME: We either have to move that somewhere to the configuration or create more generic filter groups if we want to support several meta-data schemas.

Returns
array keys are translation keys that point to the heading to be displayed in the select list, the values are the type description wildcards to be used for filter selection in this group.

Definition at line 564 of file PKPCitationGridHandler.inc.php.

Referenced by exportCitations().

& PKPCitationGridHandler::_handleCitationForm ( $args,
$request,
  $persist = true 
)

Create and validate a citation form with POST request data and (optionally) persist the citation.

Parameters
$argsarray
$requestPKPRequest
$persistboolean
Returns
CitationForm the citation form for further processing

Definition at line 579 of file PKPCitationGridHandler.inc.php.

References getAssocObject(), and getCitationFromArgs().

Referenced by checkCitation(), fetchCitationFormErrorsAndComparison(), and updateCitation().

PKPCitationGridHandler::_recheckCitation ( $request,
$originalCitation,
  $persist = true 
)

Internal method that re-checks the given citation and returns a rendered citation editing form with the changes.

Parameters
$requestPKPRequest
$originalCitationCitation
$persistboolean whether to save (true) or render (false)
Returns
string|Citation a serialized JSON message with the citation form when $persist is false, else the persisted citation object.

Definition at line 611 of file PKPCitationGridHandler.inc.php.

References getAssocObject(), DAORegistry\getDAO(), and JSONMessage\getString().

Referenced by checkCitation(), updateCitation(), and updateRawCitation().

PKPCitationGridHandler::addCitation ( $args,
$request 
)

An action to manually add a new citation

Parameters
$argsarray
$requestPKPRequest
Returns
string a serialized JSON message

Definition at line 312 of file PKPCitationGridHandler.inc.php.

References editCitation().

PKPCitationGridHandler::checkCitation ( $args,
$request 
)

Check (parse and lookup) a citation

Parameters
$argsarray
$requestPKPRequest
Returns
string a serialized JSON message

Definition at line 365 of file PKPCitationGridHandler.inc.php.

References _handleCitationForm(), _recheckCitation(), getCitationFromArgs(), and JSONMessage\getString().

PKPCitationGridHandler::deleteCitation ( $args,
$request 
)

Delete a citation

Parameters
$argsarray
$requestPKPRequest
Returns
string a serialized JSON message

Definition at line 443 of file PKPCitationGridHandler.inc.php.

References getCitationFromArgs(), and DAORegistry\getDAO().

PKPCitationGridHandler::editCitation ( $args,
$request 
)

Edit a citation

Parameters
$argsarray
$requestPKPRequest
Returns
string a serialized JSON message

Definition at line 324 of file PKPCitationGridHandler.inc.php.

References getAssocObject(), getCitationFromArgs(), and JSONMessage\getString().

Referenced by addCitation().

PKPCitationGridHandler::exportCitations ( $args,
$request,
  $noCitationsFoundMessage 
)

Export a list of formatted citations

Parameters
$argsarray
$requestPKPRequest
$noCitationsFoundMessagestring an app-specific help message
Returns
string a serialized JSON message

Definition at line 193 of file PKPCitationGridHandler.inc.php.

References _getExportFilterConfiguration(), getAssocId(), getAssocObject(), DAORegistry\getDAO(), and GridHandler\getGridDataElements().

PKPCitationGridHandler::fetchCitationFormErrorsAndComparison ( $args,
$request 
)

Fetch the posted citation as a citation string with calculated differences between the field based and the raw version.

Parameters
$argsarray
$requestPKPRequest
Returns
string a serialized JSON message

Definition at line 466 of file PKPCitationGridHandler.inc.php.

References _handleCitationForm().

PKPCitationGridHandler::getAssocId ( )

Get the assoc id

Returns
integer one of the ASSOC_TYPE_* values

Definition at line 91 of file PKPCitationGridHandler.inc.php.

References getAssocObject().

Referenced by CitationGridHandler\exportCitations(), exportCitations(), getCitationFromArgs(), and initialize().

& PKPCitationGridHandler::getAssocObject ( )

Get the object that citations are associated to.

See Also
PKPCitationGridHandler::setAssocObject() for more details.
Returns
DataObject

Definition at line 65 of file PKPCitationGridHandler.inc.php.

Referenced by _handleCitationForm(), _recheckCitation(), editCitation(), exportCitations(), getAssocId(), and sendAuthorQuery().

PKPCitationGridHandler::getAssocType ( )

Get the type of the object that citations are associated to.

Returns
integer one of the ASSOC_TYPE_* constants

Definition at line 83 of file PKPCitationGridHandler.inc.php.

Referenced by getCitationFromArgs(), and initialize().

& PKPCitationGridHandler::getCitationFromArgs (   $request,
$args,
  $createIfMissing = false 
)

This will retrieve a citation object from the grids data source based on the request arguments. If no citation can be found then this will raise a fatal error.

Parameters
$argsarray
$createIfMissingboolean If this is set to true then a citation object will be instantiated if no citation id is in the request.
Returns
Citation

Definition at line 529 of file PKPCitationGridHandler.inc.php.

References getAssocId(), getAssocType(), and GridHandler\getRowDataElement().

Referenced by _handleCitationForm(), checkCitation(), deleteCitation(), editCitation(), and updateRawCitation().

PKPCitationGridHandler::getIsSubcomponent ( )
& PKPCitationGridHandler::getRowInstance ( )
See Also
GridHandler::getRowInstance()

Definition at line 169 of file PKPCitationGridHandler.inc.php.

Referenced by updateCitation().

PKPCitationGridHandler::PKPCitationGridHandler ( )

Constructor

Definition at line 33 of file PKPCitationGridHandler.inc.php.

PKPCitationGridHandler::sendAuthorQuery ( $args,
$request 
)

Send an author query based on the posted data.

Parameters
$argsarray
$requestPKPRequest
Returns
string a serialized JSON message

Definition at line 485 of file PKPCitationGridHandler.inc.php.

References getAssocObject().

PKPCitationGridHandler::setAssocObject ( $assocObject)

Set the object that citations are associated to This object must implement the getId() and getCitations() methods.

Parameters
$assocObjectDataObject an object that implements getId() and getCitations(). The getCitations() method must return a plain text list of all citations associated with the object to be processed.

FIXME: Use a dedicated interface rather than DataObject once we drop PHP4 support.

Definition at line 54 of file PKPCitationGridHandler.inc.php.

Referenced by CitationGridHandler\initialize().

PKPCitationGridHandler::setAssocType (   $assocType)

Set the type of the object that citations are associated to.

Parameters
integerone of the ASSOC_TYPE_* constants

Definition at line 74 of file PKPCitationGridHandler.inc.php.

Referenced by CitationGridHandler\initialize().

PKPCitationGridHandler::updateCitation ( $args,
$request 
)

Update a citation

Parameters
$argsarray
$requestPKPRequest
Returns
string a serialized JSON message

Definition at line 398 of file PKPCitationGridHandler.inc.php.

References _handleCitationForm(), _recheckCitation(), PKPHandler\getId(), getRowInstance(), and GridHandler\renderRowInternally().

PKPCitationGridHandler::updateRawCitation ( $args,
$request 
)

Change the raw text of a citation and re-process it.

Parameters
$argsarray
$requestPKPRequest
Returns
string a serialized JSON message

Definition at line 346 of file PKPCitationGridHandler.inc.php.

References _recheckCitation(), and getCitationFromArgs().


The documentation for this class was generated from the following file: