\acdhOeaw\utilOntology

Ontology cache class.

Fetching full ontology (resolving class and property inheritance) from a triplestore is time consuming. At the same time the ontology changes rarely. Thus caching is a perfect solution.

The ontology is cached in a JSON file (path is taken from the repoConfig:ontologyCacheFile config property). It is automatically refreshed if the repository resource storing the ontology owl (as set in the repoConfig:ontologyResId) modification date is newer then the cache file modification time.

Summary

Methods
Properties
Constants
__construct()
getRepoObjectClasses()
getSharedObjectClasses()
getContainerClasses()
getClass()
getProperty()
No public properties found
FEDORA_LAT_MOD
No protected methods found
No protected properties found
N/A
getFromFile()
getFromTriplestore()
$classes
$properties
$repoObjectClasses
$sharedObjectClasses
$containerClasses
N/A

Constants

FEDORA_LAT_MOD

FEDORA_LAT_MOD

Properties

$classes

$classes : 

Type

$properties

$properties : 

Type

$repoObjectClasses

$repoObjectClasses : 

Type

$sharedObjectClasses

$sharedObjectClasses : 

Type

$containerClasses

$containerClasses : 

Type

Methods

__construct()

__construct(\acdhOeaw\fedora\Fedora  $fedora) 

Parameters

\acdhOeaw\fedora\Fedora $fedora

repository connection object

getRepoObjectClasses()

getRepoObjectClasses() : array

Returns list of classes inheriting from `repoConfig:fedoraRepoObjectClass`

Returns

array

getSharedObjectClasses()

getSharedObjectClasses() 

getContainerClasses()

getContainerClasses() 

getClass()

getClass(string  $class) : \stdClass

Returns class description. It is an object containing following properties:

  • class class name URI
  • clasess array of inherited class name URIs
  • properties object descriping class properties indexed with property URIs each property is described by an object with a following structure:
    • property property URI
    • range property range (class URI)
    • min minimum cardinality
    • max maximum cardinality

Parameters

string $class

class name URI

Returns

\stdClass

getProperty()

getProperty(string  $property) : \stdClass

Returns property description. It is an object containing following properties:

  • property - property URI
  • range - property range (class URI)

Parameters

string $property

property URI

Returns

\stdClass

getFromFile()

getFromFile(string  $file) 

Parameters

string $file

getFromTriplestore()

getFromTriplestore(\acdhOeaw\fedora\Fedora  $fedora, string  $file) 

Parameters

\acdhOeaw\fedora\Fedora $fedora
string $file