RootTableHelper
extends ArcheCoreHelper
in package
Description of RootTableHelper Class
Tags
Table of Contents
Properties
- $data : mixed
- $lang : mixed
- $prefixesToChange : mixed
- $resources : mixed
Methods
- createFullPropertyFromShortcut() : string
- createHtml() : string
- createShortcut() : string
- Create shortcut from the property for the gui
- extractChildTreeView() : array<string|int, mixed>
- extractChildView() : array<string|int, mixed>
- Ectract the api data from the rdf data
- extractExpertView() : object
- Get all metadata for a given resource
- extractPrevNextItem() : array<string|int, mixed>
- Fetch the previous and next item from the child list
- extractRootDTView() : mixed
- extractRootView() : mixed
- fetchApiEndpoint() : string
- Fetch the defined ARCHE GUI endpoint
- isCacheExists() : bool
- Check if the drupal DB has the cached data
- setRootDefaultTitle() : mixed
- this is for the single objects, where we dont have multiple value
- setTripleValueTitle() : string
- changePropertyToShortcut() : mixed
- change the long proeprty urls inside the resource array
- createBaseProperties() : void
- Set up the base parameters
- createRootTableHeader() : string
- The root table header html code
- createRootTableHtml() : string
- Create the response html string
- formatRange() : string
- Format the range values for the better readability
- isDirOrFile() : void
- The actual resource is a binary file or a directory
- isPublic() : void
- Actual resource accessrestriction
- setDefaultTitle() : mixed
- If the property doesn't have the actual lang related value, then we have to create one based on en/de/und/or first array element
Properties
$data
private
mixed
$data
$lang
private
mixed
$lang
= "en"
$prefixesToChange
private
static mixed
$prefixesToChange
= array("http://fedora.info/definitions/v4/repository#" => "fedora", "http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#" => "ebucore", "http://www.loc.gov/premis/rdf/v1#" => "premis", "http://www.jcp.org/jcr/nt/1.0#" => "nt", "http://www.w3.org/2000/01/rdf-schema#" => "rdfs", "http://www.w3.org/ns/ldp#" => "ldp", "http://www.iana.org/assignments/relation/" => "iana", "https://vocabs.acdh.oeaw.ac.at/schema#" => "acdh", "https://id.acdh.oeaw.ac.at/" => "acdhID", "http://purl.org/dc/elements/1.1/" => "dc", "http://purl.org/dc/terms/" => "dcterms", "http://www.w3.org/2002/07/owl#" => "owl", "http://xmlns.com/foaf/0.1/" => "foaf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" => "rdf", "http://www.w3.org/2004/02/skos/core#" => "skos", "http://hdl.handle.net/21.11115/" => "handle", "http://xmlns.com/foaf/spec/" => "foaf")
$resources
private
mixed
$resources
= []
Methods
createFullPropertyFromShortcut()
public
static createFullPropertyFromShortcut(string $prop) : string
Parameters
- $prop : string
Return values
stringcreateHtml()
public
createHtml(array<string|int, mixed> $data, string $lang) : string
Parameters
- $data : array<string|int, mixed>
- $lang : string
Return values
stringcreateShortcut()
Create shortcut from the property for the gui
public
static createShortcut(string $prop) : string
Parameters
- $prop : string
Return values
stringextractChildTreeView()
public
extractChildTreeView(array<string|int, mixed> $result, string $baseUrl[, string $lang = "en" ]) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
- $baseUrl : string
- $lang : string = "en"
Return values
array<string|int, mixed>extractChildView()
Ectract the api data from the rdf data
public
extractChildView(array<string|int, mixed> $result, array<string|int, mixed> $properties, string $totalCount, string $baseUrl[, string $lang = "en" ]) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
- $properties : array<string|int, mixed>
- $totalCount : string
- $baseUrl : string
- $lang : string = "en"
Return values
array<string|int, mixed>extractExpertView()
Get all metadata for a given resource
public
extractExpertView(object $pdoStmt, int $resId, array<string|int, mixed> $contextRelatives[, string $lang = "en" ]) : object
Parameters
- $pdoStmt : object
- $resId : int
- $contextRelatives : array<string|int, mixed>
- $lang : string = "en"
Return values
objectextractPrevNextItem()
Fetch the previous and next item from the child list
public
extractPrevNextItem(array<string|int, mixed> $result, string $resourceId, string $lang) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
- $resourceId : string
- $lang : string
Return values
array<string|int, mixed>extractRootDTView()
public
extractRootDTView(object $pdoStmt, array<string|int, mixed> $properties, array<string|int, mixed> $propertyLabel, string $lang) : mixed
Parameters
- $pdoStmt : object
- $properties : array<string|int, mixed>
- $propertyLabel : array<string|int, mixed>
- $lang : string
extractRootView()
public
extractRootView(object $pdoStmt, array<string|int, mixed> $properties, array<string|int, mixed> $propertyLabel, string $lang) : mixed
Parameters
- $pdoStmt : object
- $properties : array<string|int, mixed>
- $propertyLabel : array<string|int, mixed>
- $lang : string
fetchApiEndpoint()
Fetch the defined ARCHE GUI endpoint
public
fetchApiEndpoint(string $url[, array<string|int, mixed> $params = [] ]) : string
Parameters
- $url : string
- $params : array<string|int, mixed> = []
Return values
stringisCacheExists()
Check if the drupal DB has the cached data
public
isCacheExists(string $cacheId) : bool
Parameters
- $cacheId : string
Return values
boolsetRootDefaultTitle()
this is for the single objects, where we dont have multiple value
protected
setRootDefaultTitle(string $lang) : mixed
Parameters
- $lang : string
setTripleValueTitle()
protected
setTripleValueTitle(array<string|int, mixed> $triple, string $lang) : string
Parameters
- $triple : array<string|int, mixed>
- $lang : string
Return values
stringchangePropertyToShortcut()
change the long proeprty urls inside the resource array
private
changePropertyToShortcut([string $resId = "" ]) : mixed
Parameters
- $resId : string = ""
createBaseProperties()
Set up the base parameters
private
createBaseProperties(type &$v, string $baseUrl, string $lang) : void
Parameters
- $v : type
- $baseUrl : string
- $lang : string
createRootTableHeader()
The root table header html code
private
createRootTableHeader() : string
Return values
stringcreateRootTableHtml()
Create the response html string
private
createRootTableHtml() : string
Return values
stringformatRange()
Format the range values for the better readability
private
formatRange(array<string|int, mixed> $range) : string
Parameters
- $range : array<string|int, mixed>
Return values
stringisDirOrFile()
The actual resource is a binary file or a directory
private
isDirOrFile(type &$v) : void
Parameters
- $v : type
isPublic()
Actual resource accessrestriction
private
isPublic(type &$v) : void
Parameters
- $v : type
setDefaultTitle()
If the property doesn't have the actual lang related value, then we have to create one based on en/de/und/or first array element
private
setDefaultTitle(string $lang, string $resId) : mixed
Parameters
- $lang : string
- $resId : string