RepoResourceInterface
            
            extends
                            RepoResourceInterface                    
                
            in
            
        
    
        
        
    Tags
Table of Contents
Constants
- META_IDS = 'ids'
 - Provide only a `resourceUrl titleProperty title` triple for a requested resource/resources matching the search.
 - META_NEIGHBORS = 'neighbors'
 - Include metadata of all resources a given one points to and all resources which point to it. If parentProperty is specified, only resources pointing to a given one with a specified RDF predicate are included.
 - META_NONE = 'none'
 - Provides no metadata.
 - META_PARENTS = 'parents'
 - Like `relatives` but follows the parentProperty predicate only from subject to object.
 - META_PARENTS_ONLY = 'parentsOnly'
 - Like `relativesOnly` but follows the parentProperty predicate only from subject to object.
 - META_PARENTS_REVERSE = 'parentsReverse'
 - Like `relativesReverse` but follows the parentProperty predicate only from subject to object.
 - META_RELATIVES = 'relatives'
 - Include metadata of all resources which can be reached from a given one by following (in both directions) an RDF predicate specified by the parentProperty as well as all metadata of all resources a given resource points to.
 - META_RELATIVES_ONLY = 'relativesOnly'
 - Include metadata of all resources which can be reached from a given one by following (in both directions) an RDF predicate specified by the parentProperty
 - META_RELATIVES_REVERSE = 'relativesReverse'
 - Include metadata of all resources which can be reached from a given one by following (in both directions) an RDF predicate specified by the parentProperty as well as all metadata of all resources a given resource points to and all resources pointing to a given one.
 - META_RESOURCE = 'resource'
 - Provide only given resource's metadata
 
Methods
- __construct() : mixed
 - Creates an object representing a repository resource.
 - getClasses() : array<string|int, string>
 - Returns all RDF types (classes) of a given repository resource.
 - getDissServices() : array<string|int, Service>
 - Returns list of dissemination services available for a resource.
 - getGraph() : DatasetNodeInterface
 - Returns resource metadata.
 - getIds() : array<string|int, string>
 - Returns an array with all repository resource identifiers.
 - getMetadata() : DatasetNodeInterface
 - Returns resource metadata.
 - getRepo() : RepoInterface
 - Returns repository connection object associated with the given resource object.
 - getUri() : TermInterface
 - Returns the repository resource URL.
 - isA() : bool
 - Naivly checks if the resource is of a given class.
 - loadMetadata() : void
 - Loads current metadata from the repository.
 - setGraph() : void
 - Replaces resource metadata with a given RDF graph. A reference to the provided metadata is stored meaning future modifications of the $metadata object automatically affect the resource metadata.
 - setMetadata() : void
 - Replaces resource metadata with a given RDF resource graph. A deep copy of the provided metadata is stored meaning future modifications of the $metadata object don't affect the resource metadata.
 
Constants
META_IDS
Provide only a `resourceUrl titleProperty title` triple for a requested resource/resources matching the search.
    public
        mixed
    META_IDS
    = 'ids'
    
    
    
META_NEIGHBORS
Include metadata of all resources a given one points to and all resources which point to it. If parentProperty is specified, only resources pointing to a given one with a specified RDF predicate are included.
    public
        mixed
    META_NEIGHBORS
    = 'neighbors'
    
    
    
META_NONE
Provides no metadata.
    public
        mixed
    META_NONE
    = 'none'
    
    
    
META_PARENTS
Like `relatives` but follows the parentProperty predicate only from subject to object.
    public
        mixed
    META_PARENTS
    = 'parents'
    
    
    
META_PARENTS_ONLY
Like `relativesOnly` but follows the parentProperty predicate only from subject to object.
    public
        mixed
    META_PARENTS_ONLY
    = 'parentsOnly'
    
    
    
META_PARENTS_REVERSE
Like `relativesReverse` but follows the parentProperty predicate only from subject to object.
    public
        mixed
    META_PARENTS_REVERSE
    = 'parentsReverse'
    
    
    
META_RELATIVES
Include metadata of all resources which can be reached from a given one by following (in both directions) an RDF predicate specified by the parentProperty as well as all metadata of all resources a given resource points to.
    public
        mixed
    META_RELATIVES
    = 'relatives'
    
    
    
META_RELATIVES_ONLY
Include metadata of all resources which can be reached from a given one by following (in both directions) an RDF predicate specified by the parentProperty
    public
        mixed
    META_RELATIVES_ONLY
    = 'relativesOnly'
    
    
    
META_RELATIVES_REVERSE
Include metadata of all resources which can be reached from a given one by following (in both directions) an RDF predicate specified by the parentProperty as well as all metadata of all resources a given resource points to and all resources pointing to a given one.
    public
        mixed
    META_RELATIVES_REVERSE
    = 'relativesReverse'
    
    
    
META_RESOURCE
Provide only given resource's metadata
    public
        mixed
    META_RESOURCE
    = 'resource'
    
    
    
Methods
__construct()
Creates an object representing a repository resource.
    public
                    __construct(string $url, RepoInterface $repo) : mixed
    Parameters
- $url : string
 - 
                    
URL of the resource
 - $repo : RepoInterface
 - 
                    
repository connection object
 
getClasses()
Returns all RDF types (classes) of a given repository resource.
    public
                    getClasses() : array<string|int, string>
    Return values
array<string|int, string>getDissServices()
Returns list of dissemination services available for a resource.
    public
                    getDissServices() : array<string|int, Service>
    Return values
array<string|int, Service>getGraph()
Returns resource metadata.
    public
                    getGraph() : DatasetNodeInterface
    Fetches them from the repository with the loadMetadata() if they were
not fetched already.
A reference to the metadata is returned meaning adjusting the returned object automatically affects the resource metadata.
Tags
Return values
DatasetNodeInterfacegetIds()
Returns an array with all repository resource identifiers.
    public
                    getIds() : array<string|int, string>
    Return values
array<string|int, string>getMetadata()
Returns resource metadata.
    public
                    getMetadata() : DatasetNodeInterface
    Fetches them from the repository with the loadMetadata() if they were
not fetched already.
A deep copy of metadata is returned meaning adjusting the returned object does not automatically affect the resource metadata. Use the setMetadata() method to write back the changes you made.
Tags
Return values
DatasetNodeInterfacegetRepo()
Returns repository connection object associated with the given resource object.
    public
                    getRepo() : RepoInterface
    Return values
RepoInterfacegetUri()
Returns the repository resource URL.
    public
                    getUri() : TermInterface
    Return values
TermInterfaceisA()
Naivly checks if the resource is of a given class.
    public
                    isA(string $class) : bool
    Naivly means that a given rdfs:type triple must exist in the resource metadata.
Parameters
- $class : string
 
Return values
boolloadMetadata()
Loads current metadata from the repository.
    public
                    loadMetadata([bool $force = false ][, string $mode = self::META_RESOURCE ][, string $parentProperty = null ][, array<string|int, string> $resourceProperties = [] ][, array<string|int, string> $relativesProperties = [] ]) : void
    Parameters
- $force : bool = false
 - 
                    
enforce fetch from the repository (when you want to make sure metadata are in line with ones in the repository or e.g. reset them back to their current state in the repository)
 - $mode : string = self::META_RESOURCE
 - 
                    
scope of the metadata returned by the repository - one of
RepoResourceInterface::META_*constants. - $parentProperty : string = null
 - 
                    
RDF property name used to find related resources in some modes
 - $resourceProperties : array<string|int, string> = []
 - 
                    
list of RDF properties to be includes for a resource (if the list is empty, all exsiting RDF properties are included)
 - $relativesProperties : array<string|int, string> = []
 - 
                    
list of RDF properties to be includes for resources being relatives (if the list is empty, all exsiting RDF properties are included)
 
Tags
setGraph()
Replaces resource metadata with a given RDF graph. A reference to the provided metadata is stored meaning future modifications of the $metadata object automatically affect the resource metadata.
    public
                    setGraph(DatasetInterface $metadata) : void
    New metadata are not automatically written back to the repository. Use the updateMetadata() method to write them back.
Parameters
- $metadata : DatasetInterface
 
Tags
setMetadata()
Replaces resource metadata with a given RDF resource graph. A deep copy of the provided metadata is stored meaning future modifications of the $metadata object don't affect the resource metadata.
    public
                    setMetadata(DatasetNodeInterface $metadata) : void
    New metadata are not automatically written back to the repository.
Use the updateMetadata() method to write them back.
Parameters
- $metadata : DatasetNodeInterface