Difference between revisions of "Compound field"

From EPrints Documentation
Jump to: navigation, search
 
m (Database)
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{fieldtypes}}
 +
__NOTOC__
 +
== Inheritance ==
 
* [[Metadata]]
 
* [[Metadata]]
 
** [[Compound field]]
 
** [[Compound field]]
Line 9: Line 12:
 
| name || default || description  
 
| name || default || description  
 
|-
 
|-
| '''export_as_xml''' || 1 || ...
+
| '''fields''' || n/a || '''This property is always required.'''
 
|-
 
|-
| '''fields''' || n/a/ || '''This property is always required.'''
+
| '''fields_cache''' || n/a || '''This property is always required.'''
|-
 
| '''fields_cache''' || n/a/ || '''This property is always required.'''
 
 
|-
 
|-
 
| '''show_in_fieldlist''' || 0 || ...
 
| '''show_in_fieldlist''' || 0 || ...
Line 19: Line 20:
  
 
== Required Phrases ==
 
== Required Phrases ==
 +
 +
== Database ==
 +
 +
Each subfield within a compound field has its own table named <dataset>_<fieldname>_<subfieldname>. For example, the related URL for an EPrint (related_url) has a URL and a type, so would have tables named eprint_related_url_url and eprint_related_url_type.
 +
 +
The tables in this instance have the following structure:
 +
 +
eprint_related_url_url: eprintid INT(11), pos INT(11), related_url_url VARCHAR(255)
 +
eprint_related_url_type: eprintid INT(11), pos INT(11), related_url_type VARCHAR(255)
 +
 +
eprintid is the ID of the EPrint to which the field applies, pos contains the position of the entry (starting at 0), and the remaining field uses the appropriate field type for the subfield (in this case VARCHAR(255) for both URL and type).
 +
 +
 +
== API ==

Revision as of 07:43, 4 October 2007

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 - Relation - Search - Secret - Set - Storable - Subject - Subobject - Text - Time - Timestamp - Url - Uuid

Inheritance

Description

Properties

name default description
fields n/a This property is always required.
fields_cache n/a This property is always required.
show_in_fieldlist 0 ...

Required Phrases

Database

Each subfield within a compound field has its own table named <dataset>_<fieldname>_<subfieldname>. For example, the related URL for an EPrint (related_url) has a URL and a type, so would have tables named eprint_related_url_url and eprint_related_url_type.

The tables in this instance have the following structure:

eprint_related_url_url: eprintid INT(11), pos INT(11), related_url_url VARCHAR(255)
eprint_related_url_type: eprintid INT(11), pos INT(11), related_url_type VARCHAR(255)

eprintid is the ID of the EPrint to which the field applies, pos contains the position of the entry (starting at 0), and the remaining field uses the appropriate field type for the subfield (in this case VARCHAR(255) for both URL and type).


API