Subobject field
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Metadata Fields: Arclanguage - Base64 - Bigint - Boolean - Compound - Counter - Dataobjref - Date - Decimal - Email - Fields - Float - Id - Idci - Image - Int - Itemref - Keywords - Langid - Longtext - Longtext_counter - Multilang - Multipart - Name - Namedset - Pagerange - Recaptcha - Recaptcha3 - Relation - Search - Secret - Set - Storable - Subject - Subobject - Text - Time - Timestamp - Url - Uuid
Contents
Description
This is a type repesenting a Data Object (or objects) which is a sub-part of this object, not just related to it in some way.
This is used by the system and not intended for use in user defined fields.
It's used to define Document Objects as part of EPrint Objects and Saved Search Objects as part of User Objects.
Inheritance
Additional Properties
Name | Default Value | Required | Description | Notes |
---|---|---|---|---|
datasetid | n/a | YES | ID of the dataset that a sub-object must belong. | |
dataset_fieldname | datasetid | NO | The name of the field to store the dataset ID. | |
dataobj_fieldname | objectid | NO | The name of the field to store the data object ID. | |
show_in_fieldlist | 0 | NO | Whether field should be included in parent data object's field list. | Different from Metadata default (1). |
match | IN | NO | How to match values in search results. | Different from Metadata default (EQ). Treat the search value as a list of whitespace-separated words rather than a single string. |
Required Phrases
No additional phrases beyond the standard metadata field phrases.
Database
A subobject field does not actually add anu extra fields or tables to the database it just uses existing fields to associated two different data objects.
API
See API page.
Examples
Most basic example.
{ name => 'primary_file', type => 'subobject', datasetid => 'file', }
Associate multiple sub-objects.
{ name => 'files', type => 'subobject', datasetid => 'file', multiple => 1, }
Associate sub-objects that can only belong to one type of parent object.
{ name => 'documents', type=> 'subobject', datasetid => 'document', multiple => 1, dataobj_fieldname => 'eprintid', }
- Associate sub-objects that can belong to any type of parent object.
{ name => 'files', type=> 'subobject', multiple => 1, datasetid => 'file', dataset_fieldname => 'thingtype', dataobj_fieldname => 'thingid', }