Documentation

Ontology
in package

Description of Ontology

Tags
author

zozlak

Table of Contents

Properties

$collections  : array<string|int, string>
restrictions go first as checkRestriction() can affect the whole graph
$ontology  : Dataset
$schema  : Schema

Methods

__construct()  : mixed
check()  : bool
getVocabularies()  : array<string|int, string>
Returns an array of vocabulary URIs used by the ontology
import()  : void
importOwlFile()  : bool
loadFile()  : void
loadRepo()  : void
createCollection()  : RepoResource
removeObsoleteChildren()  : void
sanitizeOwlObject()  : DatasetNode
Prepares an RDF resource representing an OWL object (class/dataProperty/objectProperty/restriction) for repository import.

Properties

$collections

restrictions go first as checkRestriction() can affect the whole graph

private static array<string|int, string> $collections = [\zozlak\RdfConstants::OWL_ANNOTATION_PROPERTY, \zozlak\RdfConstants::OWL_RESTRICTION, \zozlak\RdfConstants::OWL_CLASS, \zozlak\RdfConstants::OWL_OBJECT_PROPERTY, \zozlak\RdfConstants::OWL_DATATYPE_PROPERTY]

Methods

check()

public check() : bool
Return values
bool

getVocabularies()

Returns an array of vocabulary URIs used by the ontology

public getVocabularies() : array<string|int, string>
Return values
array<string|int, string>

import()

public import(Repo $repo[, bool $verbose = false ][, int $concurrency = 3 ]) : void
Parameters
$repo : Repo
$verbose : bool = false
$concurrency : int = 3

importOwlFile()

public importOwlFile(Repo $repo, string $owlPath, bool $verbose[, DatasetNode|null $collectionMeta = null ][, DatasetNode|null $resourceMeta = null ]) : bool
Parameters
$repo : Repo
$owlPath : string
$verbose : bool
$collectionMeta : DatasetNode|null = null
$resourceMeta : DatasetNode|null = null
Tags
throws
RuntimeException
Return values
bool

if owl file has been uploaded

loadFile()

public loadFile(string $filename) : void
Parameters
$filename : string

removeObsoleteChildren()

private removeObsoleteChildren(Repo $repo, string $collectionId, string $parentProp, array<string|int, string> $imported, bool $verbose[, int $concurrency = 3 ]) : void
Parameters
$repo : Repo
$collectionId : string
$parentProp : string
$imported : array<string|int, string>
$verbose : bool
$concurrency : int = 3

sanitizeOwlObject()

Prepares an RDF resource representing an OWL object (class/dataProperty/objectProperty/restriction) for repository import.

private sanitizeOwlObject(DatasetNode $res, NamedNodeInterface $id, NamedNodeInterface $parentId) : DatasetNode
Parameters
$res : DatasetNode

an owl object metadata to be sanitized

$id : NamedNodeInterface

desired owl object identifier (may differ from $res node)

$parentId : NamedNodeInterface

collection in which a repository resource should be created

Return values
DatasetNode

created/updated repository resource metadata


        
On this page

Search results