Difference between revisions of "Document fields.pl"
m |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{{cfgd}} | {{cfgd}} | ||
− | + | '''document_fields.pl''' defines all the optional fields which an Document object has. These fields all have mappings to the database. There are a variety of field types which you can see here [[:Category:EPrints_Metadata_Fields|here]]. | |
− | document_fields.pl defines all the optional fields which an Document object has. These fields all have mappings to the database. There are a variety of field types which you can see here [[:Category:EPrints_Metadata_Fields|here]]. | ||
Note removing fields from document_field.pl does not usually cause data to be deleted from the database. To add or remove fields from eprint_fields.pl you must run: | Note removing fields from document_field.pl does not usually cause data to be deleted from the database. To add or remove fields from eprint_fields.pl you must run: | ||
− | EPRINTS_PATH/bin/epadmin update_database_structure | + | EPRINTS_PATH/bin/epadmin update_database_structure ARCHIVEID |
and then reload your configuration (or restart the webserver). | and then reload your configuration (or restart the webserver). | ||
Latest revision as of 00:38, 6 March 2022
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
document_fields.pl defines all the optional fields which an Document object has. These fields all have mappings to the database. There are a variety of field types which you can see here here.
Note removing fields from document_field.pl does not usually cause data to be deleted from the database. To add or remove fields from eprint_fields.pl you must run:
EPRINTS_PATH/bin/epadmin update_database_structure ARCHIVEID
and then reload your configuration (or restart the webserver).
Field Definition
The field list is represented by an arrayref of hashrefs. Each hashref has at minimum a name
, which is the field name used when referring to the field (e.g. in search) and a type
, which describes the type of data the field will hold. Depending on a field's type there may also be other compulsory fields and some optional ones. See the details of field definition on the page for that type
.
$c->{fields}->{document} = [ { name => "application", type => "set", options => [ 'msword95', 'msword2000', 'msword2007', ], }, ];