Documentation

Metadata
in package

Manages resources's metadata (loads from database or HTTP request, writes into the database, serializes to RDF, etc.).

Tags
author

zozlak

Table of Contents

Constants

DATE_TYPES  = [\zozlak\RdfConstants::XSD_DATE, \zozlak\RdfConstants::XSD_DATE_TIME]
FILTER_INCLUDE  = 'include'
FILTER_SKIP  = 'skip'
NUMERIC_TYPES  = [\zozlak\RdfConstants::XSD_DECIMAL, \zozlak\RdfConstants::XSD_FLOAT, \zozlak\RdfConstants::XSD_DOUBLE, \zozlak\RdfConstants::XSD_INTEGER, \zozlak\RdfConstants::XSD_NEGATIVE_INTEGER, \zozlak\RdfConstants::XSD_NON_NEGATIVE_INTEGER, \zozlak\RdfConstants::XSD_NON_POSITIVE_INTEGER, \zozlak\RdfConstants::XSD_POSITIVE_INTEGER, \zozlak\RdfConstants::XSD_LONG, \zozlak\RdfConstants::XSD_INT, \zozlak\RdfConstants::XSD_SHORT, \zozlak\RdfConstants::XSD_BYTE, \zozlak\RdfConstants::XSD_UNSIGNED_LONG, \zozlak\RdfConstants::XSD_UNSIGNED_INT, \zozlak\RdfConstants::XSD_UNSIGNED_SHORT, \zozlak\RdfConstants::XSD_UNSIGNED_BYTE]
SAVE_ADD  = 'add'
SAVE_MERGE  = 'merge'
SAVE_OVERWRITE  = 'overwrite'
TYPE_GEOM  = 'GEOM'
TYPE_URI  = 'URI'

Properties

$graph  : DatasetNodeInterface
$id  : int

Methods

__construct()  : mixed
getAcceptedFormats()  : string
getDatasetNode()  : DatasetNodeInterface
getUri()  : string
idAsUri()  : string
loadFromDb()  : void
loadFromRequest()  : int
loadFromResource()  : void
merge()  : DatasetNodeInterface
negotiateFormat()  : string
save()  : void
setId()  : void
setResponseBody()  : void
update()  : void
autoAddId()  : bool
manageSystemMetadata()  : void
Updates system-managed metadata, e.g. who and when lastly modified a resource

Constants

DATE_TYPES

public mixed DATE_TYPES = [\zozlak\RdfConstants::XSD_DATE, \zozlak\RdfConstants::XSD_DATE_TIME]

FILTER_INCLUDE

public mixed FILTER_INCLUDE = 'include'

FILTER_SKIP

public mixed FILTER_SKIP = 'skip'

NUMERIC_TYPES

public mixed NUMERIC_TYPES = [\zozlak\RdfConstants::XSD_DECIMAL, \zozlak\RdfConstants::XSD_FLOAT, \zozlak\RdfConstants::XSD_DOUBLE, \zozlak\RdfConstants::XSD_INTEGER, \zozlak\RdfConstants::XSD_NEGATIVE_INTEGER, \zozlak\RdfConstants::XSD_NON_NEGATIVE_INTEGER, \zozlak\RdfConstants::XSD_NON_POSITIVE_INTEGER, \zozlak\RdfConstants::XSD_POSITIVE_INTEGER, \zozlak\RdfConstants::XSD_LONG, \zozlak\RdfConstants::XSD_INT, \zozlak\RdfConstants::XSD_SHORT, \zozlak\RdfConstants::XSD_BYTE, \zozlak\RdfConstants::XSD_UNSIGNED_LONG, \zozlak\RdfConstants::XSD_UNSIGNED_INT, \zozlak\RdfConstants::XSD_UNSIGNED_SHORT, \zozlak\RdfConstants::XSD_UNSIGNED_BYTE]

SAVE_MERGE

public mixed SAVE_MERGE = 'merge'

SAVE_OVERWRITE

public mixed SAVE_OVERWRITE = 'overwrite'

TYPE_GEOM

public mixed TYPE_GEOM = 'GEOM'

Properties

$graph

private DatasetNodeInterface $graph

Methods

__construct()

public __construct([int|null $id = null ]) : mixed
Parameters
$id : int|null = null

getAcceptedFormats()

public static getAcceptedFormats() : string
Return values
string

getDatasetNode()

public getDatasetNode() : DatasetNodeInterface
Return values
DatasetNodeInterface

getUri()

public getUri() : string
Return values
string

idAsUri()

public static idAsUri(int $id) : string
Parameters
$id : int
Return values
string

loadFromDb()

public loadFromDb(string $mode[, string|null $property = null ]) : void
Parameters
$mode : string
$property : string|null = null

loadFromRequest()

public loadFromRequest([string|null $resUri = null ]) : int
Parameters
$resUri : string|null = null
Return values
int

loadFromResource()

public loadFromResource(DatasetNodeInterface $res) : void
Parameters
$res : DatasetNodeInterface

merge()

public merge(string $mode) : DatasetNodeInterface
Parameters
$mode : string
Return values
DatasetNodeInterface

negotiateFormat()

public static negotiateFormat() : string
Return values
string

setId()

public setId(int $id) : void
Parameters
$id : int

setResponseBody()

public setResponseBody(string $format) : void
Parameters
$format : string

update()

public update(DatasetNode $newMeta[, array<string|int, string> $preserve = [] ]) : void
Parameters
$newMeta : DatasetNode
$preserve : array<string|int, string> = []

autoAddId()

private autoAddId(string $ids) : bool
Parameters
$ids : string
Return values
bool

manageSystemMetadata()

Updates system-managed metadata, e.g. who and when lastly modified a resource

private manageSystemMetadata(DatasetNodeInterface $meta) : void
Parameters
$meta : DatasetNodeInterface

        
On this page

Search results