OntologyJsHelper
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
- checkCardinality() : string
- createBaseProperties() : void
- Set up the base parameters
- createHeader() : string
- The root table header html code
- createHtmlTable() : string
- Create the response html string
- 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 = ""
checkCardinality()
private
checkCardinality(string $val) : string
Parameters
- $val : string
Return values
stringcreateBaseProperties()
Set up the base parameters
private
createBaseProperties(type &$v, string $baseUrl, string $lang) : void
Parameters
- $v : type
- $baseUrl : string
- $lang : string
createHeader()
The root table header html code
private
createHeader() : string
Return values
stringcreateHtmlTable()
Create the response html string
private
createHtmlTable() : string
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