LaudatioUtilService
class LaudatioUtilService implements LaudatioUtilsInterface
Class LaudatioUtilService
Properties
protected | $basePath |
Methods
LaudatioUtilService constructor.
parseXMLToJson: Parse xml to json
Populate Corpus object with attributes from the Corpus Header
updateCorpusAttributes: update corpus object fields
updateCorpusFileAttributes: update corpus file object fields
duplicateCorpus: create a copy of a corpus on publication to represent the new working period
No description
Checks if Corpus is versioned and
Populate Document object with attributes fom the Document header
setCommitData: save git commit data on the object and persist to database
updateDocumentAttributes: update the Document object fields
documentIsVersioned: determine if a document object is versioned (internal vid)
Populate Annotation object with attributes from the Annotation Header
setPreparationAttributes: not in use
updateAnnotationAttributes: update the Annotation model fields
annotationIsVersioned: determine if an Annotation object is versioned (internal vid)
Associate an array of Document objects to a Corpus
Associate an array of Annotation objects to a Document
Associate an array of Annotation objects to a Corpus
Associate an array of Preparation objects to an Annotation: not in use
setVersionMapping: set the internal database versioning (vid) for an object
No description
No description
No description
setCorpusLogoSymLink: set a symlink in the filesystem to corpus logo images
getModelByType: Fetch eloquent model by id and type
Fetch a Model by type and filename
getModelByFileAndCorpus: fetch an eloquent model by its filename, type and corpusid
getElasticSearchIdByCorpusId: get elasticsearch document _id associated with an eloquent object
getElasticSearchIndexByCorpusId: get elasticsearch document index id associated with an eloquent object
getDatabaseIdByCorpusId: get a Corpus Eloquent objects database id
getCorpusLogoByCorpusId: get the logo image file path of a corpus Eloquent object
getCorpusNameByCorpusId
getCorpusNameByObjectElasticsearchId: get the name of a corpus of any eloquent object by its elasticsearch id field
getCurrentCorpusIndexByElasticsearchId
getCurrentDocumentIndexByElasticsearchId
getCurrentAnnotationIndexByElasticsearchId
getCurrentCorpusIndexByAnnotationElasticsearchId
No description
getCurrentCorpusIndexByDocumentElasticsearchId
No description
getDocumentGenreByCorpusId: fetch a corpus' document genre by traversing all its document objects
getCorpusVersion: get the publication version of a corpus eloquent object
getWorkFlowStatus: get the workflow status of a corpus eloquent object
getInvitedByCorpus: get corpus collaboration invites
No description
getCorpusProjectPathByCorpusId: get the file path of a corpus' project
getCorpusAndProjectPathByCorpusId: get the file path of a corpus' project and the corpus
getCorpusPathByCorpusId: get the file path of a corpus
No description
No description
deleteModels: delete eloquent models by file path
deleteModel: delete eloquent model by type and database id
updateDirectoryPaths: update Directory Paths for Document and Annotation eloquent objects
getDirectoryPath: get directorypaths by collection of paths and filename
No description
buildCiteFormat creates citations for a given piece of data
getDocumentRange
emptyCorpusCache: empty the corpus redis cache
No description
emptyCorpusDataFileCache: empty redis corpus data file cache
emptyCorpusFileCache: empty redis corpus header file cache
emptyCorpusFileInfoCache: empty redis corpus header file info cache
emptyDocumentCacheByCorpusId: empty redis eloquent document object cache by corpus id
emptyDocumentCacheByDocumentIndex: empty redis eloquent document object cache
emptyDocumentCacheByDocumentElasticsearchId
emptyAnnotationCacheByCorpusId
emptyAnnotationCacheByAnnotationIndex
emptyAnnotationCacheByNameAndCorpusId
emptyAnnotationGroupCacheByAnnotationAndCorpusId
checkForDuplicateCorpusName checks the path-normalized name of a corpus if it already exists with in a project
determineAdminRole
No description
determineUserAdminRole
removeMergedDuplicates: remove duplicates from comma separated strings generated from merged arrays
removeMergedNA: remove NA-entries from comma separated strings generated from merged arrays
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
at line 48
__construct()
LaudatioUtilService constructor.
at line 61
parseXMLToJson($xml, $options)
parseXMLToJson: Parse xml to json
at line 174
setCorpusAttributes($json, $params)
Populate Corpus object with attributes from the Corpus Header
at line 224
updateCorpusAttributes($params, $corpusId)
updateCorpusAttributes: update corpus object fields
at line 238
updateCorpusFileAttributes($corpus)
updateCorpusFileAttributes: update corpus file object fields
at line 270
duplicateCorpus($oldCorpus, $new_corpus_elasticsearch_id, $new_corpus_id, $new_corpus_index, $new_guideline_index, $now, $oldDocumentIndex, $oldAnnotationIndex, $new_document_index, $new_annotation_index)
duplicateCorpus: create a copy of a corpus on publication to represent the new working period
at line 398
copyCorpusFiles($oldCorpus, $new_corpus_id, $newIndex)
at line 425
corpusIsVersioned($corpusId)
Checks if Corpus is versioned and
at line 447
setDocumentAttributes($json, $corpusId, $uid, $fileName, $isDir)
Populate Document object with attributes fom the Document header
at line 552
setCommitData($commitData, $corpusId)
setCommitData: save git commit data on the object and persist to database
at line 636
updateDocumentAttributes($params, $documentId)
updateDocumentAttributes: update the Document object fields
at line 650
documentIsVersioned($documentId)
documentIsVersioned: determine if a document object is versioned (internal vid)
at line 672
setAnnotationAttributes($json, $corpusId, $uid, $fileName, $isDir)
Populate Annotation object with attributes from the Annotation Header
at line 728
setPreparationAttributes($json, $annotationId, $corpusId, $isDir)
setPreparationAttributes: not in use
at line 793
updateAnnotationAttributes($params, $annotationId)
updateAnnotationAttributes: update the Annotation model fields
at line 807
annotationIsVersioned($annotationId)
annotationIsVersioned: determine if an Annotation object is versioned (internal vid)
at line 826
associateDocumentsToCorpus($documents, $corpusId)
Associate an array of Document objects to a Corpus
at line 843
associateAnnotationsToDocument($annotations, $documentId)
Associate an array of Annotation objects to a Document
at line 861
associateAnnotationsToCorpus($annotations, $corpusId)
Associate an array of Annotation objects to a Corpus
at line 878
associatePreparationsToAnnotation($preparations, $annotationId)
Associate an array of Preparation objects to an Annotation: not in use
at line 896
setVersionMapping($object, $type)
setVersionMapping: set the internal database versioning (vid) for an object
at line 935
getDOIByCorpusDatabaseId($corpusDatabaseId)
at line 952
getDOIByCorpusElasticsearchId($elasticsearchId, $corpus_index)
at line 975
getDOIByCorpusId($corpusId, $corpus_index)
at line 1005
setCorpusLogoSymLink($flysystem, $path)
setCorpusLogoSymLink: set a symlink in the filesystem to corpus logo images
at line 1038
getModelByType($id, $type)
getModelByType: Fetch eloquent model by id and type
at line 1065
getModelByFileName($fileName, $type, $isDir, $corpusId)
Fetch a Model by type and filename
at line 1133
getModelByFileAndCorpus($fileName, $type, $isDir, $corpusId)
getModelByFileAndCorpus: fetch an eloquent model by its filename, type and corpusid
at line 1193
getElasticSearchIdByCorpusId($corpusid, $corpus_index)
getElasticSearchIdByCorpusId: get elasticsearch document _id associated with an eloquent object
at line 1210
getElasticSearchIndexByCorpusId($corpusid)
getElasticSearchIndexByCorpusId: get elasticsearch document index id associated with an eloquent object
at line 1229
getDatabaseIdByCorpusId($corpusid, $corpus_index)
getDatabaseIdByCorpusId: get a Corpus Eloquent objects database id
at line 1249
getCorpusLogoByCorpusId($corpusid, $index)
getCorpusLogoByCorpusId: get the logo image file path of a corpus Eloquent object
at line 1269
getCorpusNameByCorpusId($corpusid, $index)
getCorpusNameByCorpusId
at line 1289
getCorpusNameByObjectElasticsearchId($type, $objectId)
getCorpusNameByObjectElasticsearchId: get the name of a corpus of any eloquent object by its elasticsearch id field
at line 1329
getCurrentCorpusIndexByElasticsearchId($elasticSearchId)
getCurrentCorpusIndexByElasticsearchId
at line 1349
getCurrentDocumentIndexByElasticsearchId($elasticSearchId)
getCurrentDocumentIndexByElasticsearchId
at line 1370
getCurrentAnnotationIndexByElasticsearchId($elasticSearchId)
getCurrentAnnotationIndexByElasticsearchId
at line 1390
getCurrentCorpusIndexByAnnotationElasticsearchId($elasticSearchId)
getCurrentCorpusIndexByAnnotationElasticsearchId
at line 1410
getCurrentCorpusIndexByAnnotationElasticsearchIdAndIndex($elasticSearchId, $index)
at line 1440
getCurrentCorpusIndexByDocumentElasticsearchId($elasticSearchId)
getCurrentCorpusIndexByDocumentElasticsearchId
at line 1459
getCurrentCorpusIndexByDocumentElasticsearchIdAndIndex($elasticSearchId, $index)
at line 1488
getDocumentGenreByCorpusId($corpusid, $index)
getDocumentGenreByCorpusId: fetch a corpus' document genre by traversing all its document objects
at line 1508
getCorpusVersion($corpusId)
getCorpusVersion: get the publication version of a corpus eloquent object
at line 1525
getWorkFlowStatus($corpusId)
getWorkFlowStatus: get the workflow status of a corpus eloquent object
at line 1542
getInvitedByCorpus($corpusId)
getInvitedByCorpus: get corpus collaboration invites
at line 1548
getInvitedByCorpusProject($projectId)
at line 1563
string
getCorpusProjectPathByCorpusId($corpusId, $corpus_index)
getCorpusProjectPathByCorpusId: get the file path of a corpus' project
at line 1584
getCorpusAndProjectPathByCorpusId($corpusid, $corpus_index)
getCorpusAndProjectPathByCorpusId: get the file path of a corpus' project and the corpus
at line 1604
getCorpusPathByCorpusId($corpusid, $corpus_index)
getCorpusPathByCorpusId: get the file path of a corpus
at line 1615
getCorpusTokensByCorpusId($corpusid, $corpus_index)
at line 1625
getCorpusGitLabIdByElasticsearchId($elasticsearchId, $corpus_index)
at line 1641
deleteModels($path)
deleteModels: delete eloquent models by file path
at line 1669
deleteModel($type, $id)
deleteModel: delete eloquent model by type and database id
at line 1702
updateDirectoryPaths($directory_path, $corpusId)
updateDirectoryPaths: update Directory Paths for Document and Annotation eloquent objects
at line 1716
getDirectoryPath($paths, $fileName)
getDirectoryPath: get directorypaths by collection of paths and filename
at line 1736
getPublishedCorpusData($corpusresponses, $elasticService, $perPage, $sortKriterium, $currentPage)
at line 1976
buildCiteFormat($data)
buildCiteFormat creates citations for a given piece of data
at line 2059
getDocumentRange($data, $documentResult)
getDocumentRange
at line 2094
emptyCorpusCache($corpusId, $index)
emptyCorpusCache: empty the corpus redis cache
at line 2104
emptySearchCache()
at line 2132
emptyCorpusDataFileCache($path, $corpusId)
emptyCorpusDataFileCache: empty redis corpus data file cache
at line 2144
emptyCorpusFileCache($path, $corpusId)
emptyCorpusFileCache: empty redis corpus header file cache
at line 2156
emptyCorpusFileInfoCache($path, $corpusId)
emptyCorpusFileInfoCache: empty redis corpus header file info cache
at line 2168
emptyDocumentCacheByCorpusId($corpusId, $index)
emptyDocumentCacheByCorpusId: empty redis eloquent document object cache by corpus id
at line 2183
emptyDocumentCacheByDocumentIndex($documentIndex)
emptyDocumentCacheByDocumentIndex: empty redis eloquent document object cache
at line 2194
emptyDocumentCacheByDocumentElasticsearchId($documentId, $documentIndex)
emptyDocumentCacheByDocumentElasticsearchId
at line 2205
emptyAnnotationCacheByCorpusId($corpusId, $index)
emptyAnnotationCacheByCorpusId
at line 2216
emptyAnnotationCacheByAnnotationIndex($index)
emptyAnnotationCacheByAnnotationIndex
at line 2228
emptyAnnotationCacheByNameAndCorpusId($name, $corpusId, $index)
emptyAnnotationCacheByNameAndCorpusId
at line 2241
emptyAnnotationGroupCacheByAnnotationAndCorpusId($annotationId, $corpusId, $index)
emptyAnnotationGroupCacheByAnnotationAndCorpusId
at line 2253
checkForDuplicateCorpusName($corpus_name, $corpus_name_path, $corpus_project_id)
checkForDuplicateCorpusName checks the path-normalized name of a corpus if it already exists with in a project
at line 2272
determineAdminRole($admin_roles)
determineAdminRole
at line 2289
getRoleMappingByUser($user)
at line 2322
determineUserAdminRole($user_roles)
determineUserAdminRole
at line 2351
removeMergedDuplicates($dataString)
removeMergedDuplicates: remove duplicates from comma separated strings generated from merged arrays
at line 2363
removeMergedNA($dataString)
removeMergedNA: remove NA-entries from comma separated strings generated from merged arrays