ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\MetaData\Repository\RepositoryInterface Interface Reference
+ Inheritance diagram for ILIAS\MetaData\Repository\RepositoryInterface:
+ Collaboration diagram for ILIAS\MetaData\Repository\RepositoryInterface:

Public Member Functions

 getMD (int $obj_id, int $sub_id, string $type)
 
 getMDOnPath (PathInterface $path, int $obj_id, int $sub_id, string $type)
 Returns an MD set with only the elements specified on a path, and all nested subelements of the last elements on the path. More...
 
 searchMD (ClauseInterface $clause, ?int $limit, ?int $offset, FilterInterface ... $filters)
 Results are always ordered first by obj_id, then sub_id, then type. More...
 
 manipulateMD (SetInterface $set)
 Follows a trail of markers from the root element, and creates, updates or deletes marked MD elements along the trail. More...
 
 transferMD (SetInterface $from_set, int $to_obj_id, int $to_sub_id, string $to_type, bool $throw_error_if_invalid)
 Transfers a metadata set to an object, regardless of its source. More...
 
 deleteAllMD (int $obj_id, int $sub_id, string $type)
 

Detailed Description

Definition at line 29 of file RepositoryInterface.php.

Member Function Documentation

◆ deleteAllMD()

ILIAS\MetaData\Repository\RepositoryInterface::deleteAllMD ( int  $obj_id,
int  $sub_id,
string  $type 
)

◆ getMD()

ILIAS\MetaData\Repository\RepositoryInterface::getMD ( int  $obj_id,
int  $sub_id,
string  $type 
)
  • obj_id: Object ID (NOT ref_id!) of the parent repository object (e.g for page objects the obj_id of the content object; for media objects this is set to 0, because their object id are not assigned to ref ids). NOTE: In the metadata tables, this corresponds to the field rbac_id.
  • sub_id: ID of the object carrying the metadata, which might be a subobject of an enclosing repository object (e.g for structure objects the obj_id of the structure object). Might be the same as the objID. NOTE: In the metadata tables, this corresponds to the field obj_id.
  • type: (Sub-)Type of the object (e.g st,pg,crs ...). NOTE: In the metadata tables, this corresponds to the field obj_type.

Implemented in ILIAS\MetaData\Repository\LOMDatabaseRepository, and ILIAS\MetaData\Repository\NullRepository.

◆ getMDOnPath()

ILIAS\MetaData\Repository\RepositoryInterface::getMDOnPath ( PathInterface  $path,
int  $obj_id,
int  $sub_id,
string  $type 
)

Returns an MD set with only the elements specified on a path, and all nested subelements of the last elements on the path.

The path must start from the root element. Note that path filters are ignored, and if the path contains steps to super elements, it is only followed down to the first element that the path returns to. Note that resulting partial MD sets might not be completely valid, due to conditions between elements. Be careful when dealing with vocabularies, or Technical > Requirement > OrComposite.

Implemented in ILIAS\MetaData\Repository\LOMDatabaseRepository, and ILIAS\MetaData\Repository\NullRepository.

◆ manipulateMD()

ILIAS\MetaData\Repository\RepositoryInterface::manipulateMD ( SetInterface  $set)

Follows a trail of markers from the root element, and creates, updates or deletes marked MD elements along the trail.

Non-scaffold elements with 'create or update' markers are updated, and scaffold elements with 'create or update' markers are created with the data value on the marker. Stops when encountering a neutral marker on a scaffold.

Implemented in ILIAS\MetaData\Repository\LOMDatabaseRepository, and ILIAS\MetaData\Repository\NullRepository.

◆ searchMD()

ILIAS\MetaData\Repository\RepositoryInterface::searchMD ( ClauseInterface  $clause,
?int  $limit,
?int  $offset,
FilterInterface ...  $filters 
)

Results are always ordered first by obj_id, then sub_id, then type.

Multiple filters are joined with a logical OR, values within the same filter with AND.

Returns
RessourceIDInterface[]

Implemented in ILIAS\MetaData\Repository\LOMDatabaseRepository, and ILIAS\MetaData\Repository\NullRepository.

◆ transferMD()

ILIAS\MetaData\Repository\RepositoryInterface::transferMD ( SetInterface  $from_set,
int  $to_obj_id,
int  $to_sub_id,
string  $to_type,
bool  $throw_error_if_invalid 
)

Transfers a metadata set to an object, regardless of its source.

Takes The data from 'create or update' markers takes priority over the data carried by marked elements, but 'delete' markers and unmarked or neutrally marked scaffolds are ignored. Always deletes whatever metadata already exist at the target.

If $throw_error_if_invalid is set true, an error is thrown if the markers on the $from_set are invalid, otherwise the invalid markers are replaced by neutral markers.

Implemented in ILIAS\MetaData\Repository\LOMDatabaseRepository, and ILIAS\MetaData\Repository\NullRepository.


The documentation for this interface was generated from the following file: