Difference between revisions of "Eprint fields.pl"

From EPrints Documentation
Jump to: navigation, search
(Properties)
Line 1: Line 1:
 
= EPrint Fields =
 
= EPrint Fields =
eprint_fields.pl defines all the optional fields which an EPrint object has. These fields all have mappings to the database. There are a variety of field types which you can see here [EPrints_Metadata_fields].  
+
eprint_fields.pl defines all the optional fields which an EPrint object has. These fields all have mappings to the database. There are a variety of field types which you can see here [[EPrints_Metadata_fields|here]].  
  
 
EPrints have a broad range of field types which enforce various constraints. Each field type has it's own method of storing in the database, retriving the value from the database, rendering the value in HTML, and rendering the input component HTML for use in workflows etc.
 
EPrints have a broad range of field types which enforce various constraints. Each field type has it's own method of storing in the database, retriving the value from the database, rendering the value in HTML, and rendering the input component HTML for use in workflows etc.

Revision as of 23:36, 17 July 2010

EPrint Fields

eprint_fields.pl defines all the optional fields which an EPrint object has. These fields all have mappings to the database. There are a variety of field types which you can see here here.

EPrints have a broad range of field types which enforce various constraints. Each field type has it's own method of storing in the database, retriving the value from the database, rendering the value in HTML, and rendering the input component HTML for use in workflows etc.

EPrints also has compound fields. This is a field made up of compound field definations. This allows you to make very powerful data structures without having to worry about the complexities of how they are stored in the database.

Note removing fields from eprint_fields.pl does not usually cause data to be deleted from the database. To add or remove fields from eprint_fields.pl you must run <eprintsroot>/bin/epadmin update_database_structure <repo_id> and then reload you configuration (or restart the webserver).

Properties

name The identifier used for this field in EPrints. The name used to refer to a field whe you $eprint->value(), as part of a search, in citations etc.
type The type of the field. Different types of field can result in different data structures begin returned when $eprint->value() is called. Types also enforce some basic validation again what is entered into them. Types include: text, longtext, name, email, compound, int, set, namedset, subject and so on. For a full list of possible field types you can see a full list of types Category:EPrints_Metadata_Fields