Difference between revisions of "API:EPrints/DataObj/MetaField"
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...) |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<!-- Pod2Wiki=_preamble_ | <!-- Pod2Wiki=_preamble_ | ||
− | This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and ' | + | This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. |
− | -->{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/MetaField.pm|package_name=EPrints::DataObj::MetaField}}[[Category:API| | + | -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/MetaField.pm|package_name=EPrints::DataObj::MetaField}}[[Category:API|METAFIELD]][[Category:API:EPrints/DataObj|METAFIELD]]<div><!-- Edit below this comment --> |
− | <!-- Pod2Wiki=head_name -->=NAME= | + | |
+ | |||
+ | <!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> | ||
+ | ==NAME== | ||
'''EPrints::DataObj::MetaField''' - metadata fields | '''EPrints::DataObj::MetaField''' - metadata fields | ||
− | <!-- | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- Pod2Wiki=head_description -->=DESCRIPTION= | + | <span style='display:none'>User Comments</span> |
− | This is an internal class that | + | <!-- Edit below this comment --> |
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_description --> | ||
+ | ==DESCRIPTION== | ||
+ | This is an internal class that should not be used outside [[API:EPrints/Database|EPrints::Database]]. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_core_metadata_fields --> | ||
+ | ==CORE METADATA FIELDS== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_metafieldid --> | ||
+ | ===metafieldid (counter)=== | ||
+ | |||
+ | The unique identifer for the metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_mfdatasetid --> | ||
+ | ===mfdatasetid (set)=== | ||
+ | |||
+ | The dataset two which this metafield belongs. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_name --> | ||
+ | ===name (text)=== | ||
+ | |||
+ | The name of this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_type --> | ||
+ | ===type (set)=== | ||
+ | |||
+ | The type of this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_provenance --> | ||
+ | ===provenance (set)=== | ||
+ | |||
+ | The provenance of this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_phrase_name --> | ||
+ | ===phrase_name (multilang, multiple)=== | ||
+ | |||
+ | The phrase name(s)(labels) potentially in multiple languages for this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_phrase_help --> | ||
+ | ===phrase_help (multilang, multiple)=== | ||
+ | |||
+ | The phrase help text(s) potentially in multiple languages for this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_required --> | ||
+ | ===required (boolean)=== | ||
+ | |||
+ | Whether this metafield is required for the dataset. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_multiple --> | ||
+ | ===multiple (boolean)=== | ||
+ | |||
+ | Whether this metafield can have multiple values for a data object. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_allow_null --> | ||
+ | ===allow_null (boolean)=== | ||
+ | |||
+ | Whether this metafield can have a null value. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_export_as_xml --> | ||
+ | ===export_as_xml (boolean)=== | ||
+ | |||
+ | Whether this metafield can be exported in XML. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_volatile --> | ||
+ | ===volatile (boolean)=== | ||
+ | |||
+ | Whether this metafield stores a volatile data. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_min_resolution --> | ||
+ | ===min_resolution (set)=== | ||
+ | |||
+ | The minimum time resolution (second, minute, hour, day, month or year) for this metafield if it is a timestamp/datestamp. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_sql_index --> | ||
+ | ===sql_index (boolean)=== | ||
+ | |||
+ | Whether an SQL index should be created for this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_render_input --> | ||
+ | ===render_input (text)=== | ||
+ | |||
+ | A different or bespoke function to render the input field for this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_render_value --> | ||
+ | ===render_value (text)=== | ||
+ | |||
+ | A different or bespoke function to render the value for this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_input_ordered --> | ||
+ | ===input_ordered (boolean)=== | ||
+ | |||
+ | Whether the input for this metafield is ordered. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_maxlength --> | ||
+ | ===maxlength (int)=== | ||
+ | |||
+ | The maximum length for this metafield if it is a text or subclass of a text field. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_browse_link --> | ||
+ | ===browse_link (boolean)=== | ||
+ | |||
+ | The link to a browse view for this metafield if it is a subject metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_top --> | ||
+ | ===top (text)=== | ||
+ | |||
+ | The top subject in the subject tree that should be used as options for this subject metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_datasetid --> | ||
+ | ===datasetid (text)=== | ||
+ | |||
+ | The dataset ID for this metafield, if it is a search, subobject, dataobjref, fields, itemref or file field. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_set_name --> | ||
+ | ===set_name (text)=== | ||
+ | |||
+ | The name of the file that contains the options for this namedset metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_options --> | ||
+ | ===options (text)=== | ||
+ | |||
+ | The commas separated list of options for this set metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
− | <!-- | + | <!-- Pod2Wiki= --> |
− | < | + | </div> |
− | <!-- | + | <!-- Pod2Wiki=item_render_order --> |
− | + | ===render_order (set)=== | |
− | + | The order to render a name if this metafield is for a name. | |
− | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
− | |||
− | |||
− | |||
− | |||
− | + | <!-- Pod2Wiki= --> | |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_hide_honourific --> | ||
+ | ===hide_honourific (boolean)=== | ||
− | + | Whether to hide the honourfic sub-field if this is a name metafield. | |
− | < | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- | + | <span style='display:none'>User Comments</span> |
+ | <!-- Edit below this comment --> | ||
− | |||
− | + | <!-- Pod2Wiki= --> | |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_hide_lineage --> | ||
+ | ===hide_lineage (boolean)=== | ||
− | + | Whether to hide the lineage sub-field if this is a name metafield. | |
− | |||
− | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
− | |||
− | + | <!-- Pod2Wiki= --> | |
− | <!-- Pod2Wiki= | + | </div> |
− | < | + | <!-- Pod2Wiki=item_family_first --> |
− | <!-- Pod2Wiki= | + | ===family_first (boolean)=== |
− | + | Whether to render the family name sub-field before the given name if this is a name metafield. | |
− | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
− | |||
− | |||
− | + | <!-- Pod2Wiki= --> | |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_input_style --> | ||
+ | ===input_style (set)=== | ||
− | + | A particular style for displaying the input form element for this metafield. | |
− | < | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | < | + | <span style='display:none'>User Comments</span> |
− | < | + | <!-- Edit below this comment --> |
− | <!-- | ||
− | |||
− | + | <!-- Pod2Wiki= --> | |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_input_rows --> | ||
+ | ===input_rows (int)=== | ||
− | + | The number of input rows for this metafield. | |
− | |||
− | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
− | |||
− | <!-- | + | <!-- Pod2Wiki= --> |
− | <!-- Pod2Wiki= | + | </div> |
− | [[API:EPrints/DataObj|EPrints::DataObj]] | + | <!-- Pod2Wiki=item_input_cols --> |
+ | ===input_cols (int)=== | ||
+ | |||
+ | The number of input columns for this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_input_boxes --> | ||
+ | ===input_boxes (int)=== | ||
+ | |||
+ | The number of input boxes for this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_sql_counter --> | ||
+ | ===sql_counter (text)=== | ||
+ | |||
+ | The name to give to the sql counter for this counter metafield. Typically the same as the metafield's name. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_default_value --> | ||
+ | ===default_value (text)=== | ||
+ | |||
+ | The default value for this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_references_and_related_objects --> | ||
+ | ==REFERENCES AND RELATED OBJECTS== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_parent --> | ||
+ | ===parent (itemref)=== | ||
+ | |||
+ | The parent metafield this metafield belongs to, if it is a sub-field. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_fields --> | ||
+ | ===fields (subobject, multiple)=== | ||
+ | |||
+ | Sub-fields of this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_instance_variables --> | ||
+ | ==INSTANCE VARIABLES== | ||
+ | See [[API:EPrints/DataObj#INSTANCE_VARIABLES|EPrints::DataObj]]. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_methods --> | ||
+ | ==METHODS== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_utility_methods --> | ||
+ | ===Utility Methods=== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_dataset_ids --> | ||
+ | ====dataset_ids==== | ||
+ | |||
+ | @ids = EPrints::DataObj::MetaField::dataset_ids( $repo ) | ||
+ | Returns array of all dataset IDs for non-virtual datasets in <tt>$repo</tt>. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_render_dataset_id --> | ||
+ | ====render_dataset_id==== | ||
+ | |||
+ | $dataset_label = EPrints::DataObj::MetaField::render_dataset_id( $repo, $id ) | ||
+ | Returns XHTML DOM rendering of phrase for dataset with <tt>$id</tt>. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_options_fromform --> | ||
+ | ====options_fromform==== | ||
+ | |||
+ | $options = EPrints::DataObj::MetaField::options_fromform( $value ) | ||
+ | Returns an array reference of options from the comma-separated <tt>$value</tt> provided. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_options_toform --> | ||
+ | ====options_toform==== | ||
+ | |||
+ | $options_str = EPrints::DataObj::MetaField::options_toform( $value ) | ||
+ | Returns a comma-separated string of options from the array reference <tt>$value</tt> provided. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_boolean_fromform --> | ||
+ | ====boolean_fromform==== | ||
+ | |||
+ | $boolean = EPrints::DataObj::MetaField::boolean_fromform( $value ) | ||
+ | Returns <tt>true</tt> or <tt>false</tt>, (literally <tt>1</tt> or <tt>0</tt>) depending on the <tt>$value</tt> representation of a boolean in a form. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_boolean_toform --> | ||
+ | ====boolean_toform==== | ||
+ | |||
+ | $boolean_str = EPrints::DataObj::MetaField::boolean_toform( $value ) | ||
+ | Returns a string representation of a boolean (<tt>"TRUE"</tt>, <tt>"FALSE"</tt> or <tt>undef</tt>) depending on the to form <tt>$value</tt> provided. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_constructor_methods --> | ||
+ | ===Constructor Methods=== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_new_from_field --> | ||
+ | ====new_from_field==== | ||
+ | |||
+ | $metafield = EPrints::DataObj::MetaField->new_from_field( $repo, $field, [ $dataset ] ) | ||
+ | Returns a new metafield data object based on <tt>$field</tt>. | ||
+ | |||
+ | <tt>$dataset</tt> is determined from dataset ID of class (i.e. <tt>metafield</tt>) if unset. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_class_methods --> | ||
+ | ===Class Methods=== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_system_field_info --> | ||
+ | ====get_system_field_info==== | ||
+ | |||
+ | $thing = EPrints::DataObj::MetaField->get_system_field_info | ||
+ | Returns an array describing the system metadata fields of the metafield dataset. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_dataset_id --> | ||
+ | ====get_dataset_id==== | ||
+ | |||
+ | $dataset = EPrints::DataObj::MetaField->get_dataset_id | ||
+ | Returns the ID of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_parent_dataset_id --> | ||
+ | ====get_parent_dataset_id==== | ||
+ | |||
+ | $dataset = EPrints::DataObj::MetaField->get_parent_dataset_id | ||
+ | Returns the ID of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record's parent belongs. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_defaults --> | ||
+ | ====get_defaults==== | ||
+ | |||
+ | $defaults = EPrints::DataObj::MetaField->get_defaults( $repo, $data, [ $dataset ] ) | ||
+ | Returns default values for this object based on the starting <tt>$data</tt>. | ||
+ | |||
+ | Get <tt>$dataset</tt> from class if not defined. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_object_methods --> | ||
+ | ===Object Methods=== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_property_defaults --> | ||
+ | ====get_property_defaults==== | ||
+ | |||
+ | $defaults = $metafield->get_property_defaults( $repo, $type ) | ||
+ | Gets the property defaults for metafield <tt>$type</tt>. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_dump --> | ||
+ | ====dump==== | ||
+ | |||
+ | $str = $metafield->dump | ||
+ | Dump the fields configuration as used in <tt>cfg.d</tt>. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_parent_id --> | ||
+ | ====get_parent_id==== | ||
+ | |||
+ | $parent = $metafield->get_parent_id | ||
+ | Returns the parent ID for this metafield. | ||
+ | |||
+ | Alias for: | ||
+ | |||
+ | $metafield->value( "parent" ); | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_remove --> | ||
+ | ====remove==== | ||
+ | |||
+ | $ok = $metafield->remove | ||
+ | Remove the field and any sub-fields from the database. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_config_path --> | ||
+ | ====config_path==== | ||
+ | |||
+ | $path = $metafield->config_path | ||
+ | Returns the root directory of the repository configuration path. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_config_filename --> | ||
+ | ====config_filename==== | ||
+ | |||
+ | $filename = $metafield->config_filename( $dataset ) | ||
+ | Returns the location of the cfg.d config file for the provided <tt>$dataset</tt>. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_phrases_filename --> | ||
+ | ====phrases_filename==== | ||
+ | |||
+ | $filename = $metafield->phrases_filename( $langid ) | ||
+ | Returns the location of the XML phrases file for provided <tt>$lang</tt>. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_workflow_filename --> | ||
+ | ====workflow_filename==== | ||
+ | |||
+ | $filename = $metafield->workflow_filename( $dataset ) | ||
+ | Returns the location of the workflow file for the provided <tt>$dataset</tt>. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_add_to_phrases --> | ||
+ | ====add_to_phrases==== | ||
+ | |||
+ | $ok = $metafield->add_to_phrases | ||
+ | Adds the phrases defined by this metafield to the system. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_remove_from_dataset --> | ||
+ | ====remove_from_dataset==== | ||
+ | |||
+ | $ok = $metafield->remove_from_dataset | ||
+ | Remove this metafield from the dataset specified by its <tt>mfdatasetid</tt> value. | ||
+ | |||
+ | Returns boolean dependent on success removing from the dataset. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_add_to_database --> | ||
+ | ====add_to_database==== | ||
+ | |||
+ | $ok = $metafield->add_to_database | ||
+ | Add this metafield to the database. | ||
+ | |||
+ | Returns boolean dependent on success adding to the database. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_remove_from_database --> | ||
+ | ====remove_from_database==== | ||
+ | |||
+ | $ok = $metafield->remove_from_database | ||
+ | Remove this field from the database. | ||
+ | |||
+ | Returns boolean dependent on success removing from the database. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_add_to_workflow --> | ||
+ | ====add_to_workflow==== | ||
+ | |||
+ | $ok = $metafield->add_to_workflow | ||
+ | Add this metafield to the workflow in the <tt>Misc.</tt> section. | ||
+ | |||
+ | Returns boolean dependent on success adding to the workflow. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_remove_from_workflow --> | ||
+ | ====remove_from_workflow==== | ||
+ | |||
+ | $ok = $metafield->remove_from_workflow | ||
+ | Remove all occurrences of this field from the workflow. Will remove the <tt>local</tt> stage if it is empty. | ||
+ | |||
+ | Returns boolean dependent on success removing from the workflow. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_perl_struct --> | ||
+ | ====perl_struct==== | ||
+ | |||
+ | $data = $metafield->perl_struct( $prefix ) | ||
+ | Returns the Perl data structure representation of this field, as you would find defined in the configuration or [[API:EPrints/DataObj|EPrints::DataObj]] classes. | ||
+ | |||
+ | If <tt>$prefix</tt> is defined returns the Perl data structure for the fields property, where <tt>$prefix</tt> is the fieldname of the parent field. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_make_field_object --> | ||
+ | ====make_field_object==== | ||
+ | |||
+ | $field = $metafield->make_field_object | ||
+ | Makes and returns a new field object based on this metafield. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_add_to_repository --> | ||
+ | ====add_to_repository==== | ||
+ | |||
+ | $ok = $metafield->add_to_repository | ||
+ | Adds this field to the repository. | ||
+ | |||
+ | Returns boolean dependent on success adding to the repository. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_remove_from_repository --> | ||
+ | ====remove_from_repository==== | ||
− | + | $ok = $mf->remove_from_repository | |
− | + | Remove this field from the repository. | |
− | |||
− | |||
− | + | Returns boolean dependent on success removing from the repository. | |
− | |||
− | < | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- | + | <span style='display:none'>User Comments</span> |
+ | <!-- Edit below this comment --> | ||
− | |||
− | |||
− | <!-- | + | <!-- Pod2Wiki= --> |
− | <!-- Pod2Wiki= | + | </div> |
+ | <!-- Pod2Wiki=item_validate --> | ||
+ | ====validate==== | ||
− | + | $problems = $metafield->validate( $repository ) | |
− | + | Returns any problems associated with this metafield as an array reference. | |
− | < | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- | + | <span style='display:none'>User Comments</span> |
+ | <!-- Edit below this comment --> | ||
− | |||
− | |||
− | <!-- | + | <!-- Pod2Wiki= --> |
− | <!-- Pod2Wiki= | + | </div> |
+ | <!-- Pod2Wiki=item_render_citation --> | ||
+ | ====render_citation==== | ||
− | < | + | $xhtml = $metafield->render_citation( [ $type, %params ] ) |
− | < | + | Returns a XHTML DOM rendering of the metafield using citation <tt>$type</tt> (of <tt>default</tt> if not provided) an specified <tt>%params</tt>. |
− | < | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- | + | <span style='display:none'>User Comments</span> |
+ | <!-- Edit below this comment --> | ||
− | |||
− | |||
− | <!-- | + | <!-- Pod2Wiki= --> |
− | <!-- Pod2Wiki= | + | </div> |
+ | <!-- Pod2Wiki=head_see_also --> | ||
+ | ==SEE ALSO== | ||
+ | [[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]]. | ||
− | < | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- | + | <span style='display:none'>User Comments</span> |
+ | <!-- Edit below this comment --> | ||
− | |||
− | |||
− | <!-- | + | <!-- Pod2Wiki= --> |
− | <!-- Pod2Wiki= | + | </div> |
+ | <!-- Pod2Wiki=head_copyright --> | ||
+ | ==COPYRIGHT== | ||
+ | {{API:Copyright}} | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
− | |||
− | |||
− | <!-- | + | <!-- Pod2Wiki= --> |
− | <!-- Pod2Wiki=_postamble_ --><!-- | + | </div> |
+ | <!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment --> |
Latest revision as of 17:12, 10 January 2022
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
- 1 NAME
- 2 DESCRIPTION
- 3 CORE METADATA FIELDS
- 3.1 metafieldid (counter)
- 3.2 mfdatasetid (set)
- 3.3 name (text)
- 3.4 type (set)
- 3.5 provenance (set)
- 3.6 phrase_name (multilang, multiple)
- 3.7 phrase_help (multilang, multiple)
- 3.8 required (boolean)
- 3.9 multiple (boolean)
- 3.10 allow_null (boolean)
- 3.11 export_as_xml (boolean)
- 3.12 volatile (boolean)
- 3.13 min_resolution (set)
- 3.14 sql_index (boolean)
- 3.15 render_input (text)
- 3.16 render_value (text)
- 3.17 input_ordered (boolean)
- 3.18 maxlength (int)
- 3.19 browse_link (boolean)
- 3.20 top (text)
- 3.21 datasetid (text)
- 3.22 set_name (text)
- 3.23 options (text)
- 3.24 render_order (set)
- 3.25 hide_honourific (boolean)
- 3.26 hide_lineage (boolean)
- 3.27 family_first (boolean)
- 3.28 input_style (set)
- 3.29 input_rows (int)
- 3.30 input_cols (int)
- 3.31 input_boxes (int)
- 3.32 sql_counter (text)
- 3.33 default_value (text)
- 4 REFERENCES AND RELATED OBJECTS
- 5 INSTANCE VARIABLES
- 6 METHODS
- 6.1 Utility Methods
- 6.2 Constructor Methods
- 6.3 Class Methods
- 6.4 Object Methods
- 6.4.1 get_property_defaults
- 6.4.2 dump
- 6.4.3 get_parent_id
- 6.4.4 remove
- 6.4.5 config_path
- 6.4.6 config_filename
- 6.4.7 phrases_filename
- 6.4.8 workflow_filename
- 6.4.9 add_to_phrases
- 6.4.10 remove_from_dataset
- 6.4.11 add_to_database
- 6.4.12 remove_from_database
- 6.4.13 add_to_workflow
- 6.4.14 remove_from_workflow
- 6.4.15 perl_struct
- 6.4.16 make_field_object
- 6.4.17 add_to_repository
- 6.4.18 remove_from_repository
- 6.4.19 validate
- 6.4.20 render_citation
- 7 SEE ALSO
- 8 COPYRIGHT
NAME
EPrints::DataObj::MetaField - metadata fields
DESCRIPTION
This is an internal class that should not be used outside EPrints::Database.
CORE METADATA FIELDS
metafieldid (counter)
The unique identifer for the metafield.
mfdatasetid (set)
The dataset two which this metafield belongs.
name (text)
The name of this metafield.
type (set)
The type of this metafield.
provenance (set)
The provenance of this metafield.
phrase_name (multilang, multiple)
The phrase name(s)(labels) potentially in multiple languages for this metafield.
phrase_help (multilang, multiple)
The phrase help text(s) potentially in multiple languages for this metafield.
required (boolean)
Whether this metafield is required for the dataset.
multiple (boolean)
Whether this metafield can have multiple values for a data object.
allow_null (boolean)
Whether this metafield can have a null value.
export_as_xml (boolean)
Whether this metafield can be exported in XML.
volatile (boolean)
Whether this metafield stores a volatile data.
min_resolution (set)
The minimum time resolution (second, minute, hour, day, month or year) for this metafield if it is a timestamp/datestamp.
sql_index (boolean)
Whether an SQL index should be created for this metafield.
render_input (text)
A different or bespoke function to render the input field for this metafield.
render_value (text)
A different or bespoke function to render the value for this metafield.
input_ordered (boolean)
Whether the input for this metafield is ordered.
maxlength (int)
The maximum length for this metafield if it is a text or subclass of a text field.
browse_link (boolean)
The link to a browse view for this metafield if it is a subject metafield.
top (text)
The top subject in the subject tree that should be used as options for this subject metafield.
datasetid (text)
The dataset ID for this metafield, if it is a search, subobject, dataobjref, fields, itemref or file field.
set_name (text)
The name of the file that contains the options for this namedset metafield.
options (text)
The commas separated list of options for this set metafield.
render_order (set)
The order to render a name if this metafield is for a name.
hide_honourific (boolean)
Whether to hide the honourfic sub-field if this is a name metafield.
hide_lineage (boolean)
Whether to hide the lineage sub-field if this is a name metafield.
family_first (boolean)
Whether to render the family name sub-field before the given name if this is a name metafield.
input_style (set)
A particular style for displaying the input form element for this metafield.
input_rows (int)
The number of input rows for this metafield.
input_cols (int)
The number of input columns for this metafield.
input_boxes (int)
The number of input boxes for this metafield.
sql_counter (text)
The name to give to the sql counter for this counter metafield. Typically the same as the metafield's name.
default_value (text)
The default value for this metafield.
REFERENCES AND RELATED OBJECTS
parent (itemref)
The parent metafield this metafield belongs to, if it is a sub-field.
fields (subobject, multiple)
Sub-fields of this metafield.
INSTANCE VARIABLES
See EPrints::DataObj.
METHODS
Utility Methods
dataset_ids
@ids = EPrints::DataObj::MetaField::dataset_ids( $repo )
Returns array of all dataset IDs for non-virtual datasets in $repo.
render_dataset_id
$dataset_label = EPrints::DataObj::MetaField::render_dataset_id( $repo, $id )
Returns XHTML DOM rendering of phrase for dataset with $id.
options_fromform
$options = EPrints::DataObj::MetaField::options_fromform( $value )
Returns an array reference of options from the comma-separated $value provided.
options_toform
$options_str = EPrints::DataObj::MetaField::options_toform( $value )
Returns a comma-separated string of options from the array reference $value provided.
boolean_fromform
$boolean = EPrints::DataObj::MetaField::boolean_fromform( $value )
Returns true or false, (literally 1 or 0) depending on the $value representation of a boolean in a form.
boolean_toform
$boolean_str = EPrints::DataObj::MetaField::boolean_toform( $value )
Returns a string representation of a boolean ("TRUE", "FALSE" or undef) depending on the to form $value provided.
Constructor Methods
new_from_field
$metafield = EPrints::DataObj::MetaField->new_from_field( $repo, $field, [ $dataset ] )
Returns a new metafield data object based on $field.
$dataset is determined from dataset ID of class (i.e. metafield) if unset.
Class Methods
get_system_field_info
$thing = EPrints::DataObj::MetaField->get_system_field_info
Returns an array describing the system metadata fields of the metafield dataset.
get_dataset_id
$dataset = EPrints::DataObj::MetaField->get_dataset_id
Returns the ID of the EPrints::DataSet object to which this record belongs.
get_parent_dataset_id
$dataset = EPrints::DataObj::MetaField->get_parent_dataset_id
Returns the ID of the EPrints::DataSet object to which this record's parent belongs.
get_defaults
$defaults = EPrints::DataObj::MetaField->get_defaults( $repo, $data, [ $dataset ] )
Returns default values for this object based on the starting $data.
Get $dataset from class if not defined.
Object Methods
get_property_defaults
$defaults = $metafield->get_property_defaults( $repo, $type )
Gets the property defaults for metafield $type.
dump
$str = $metafield->dump
Dump the fields configuration as used in cfg.d.
get_parent_id
$parent = $metafield->get_parent_id
Returns the parent ID for this metafield.
Alias for:
$metafield->value( "parent" );
remove
$ok = $metafield->remove
Remove the field and any sub-fields from the database.
config_path
$path = $metafield->config_path
Returns the root directory of the repository configuration path.
config_filename
$filename = $metafield->config_filename( $dataset )
Returns the location of the cfg.d config file for the provided $dataset.
phrases_filename
$filename = $metafield->phrases_filename( $langid )
Returns the location of the XML phrases file for provided $lang.
workflow_filename
$filename = $metafield->workflow_filename( $dataset )
Returns the location of the workflow file for the provided $dataset.
add_to_phrases
$ok = $metafield->add_to_phrases
Adds the phrases defined by this metafield to the system.
remove_from_dataset
$ok = $metafield->remove_from_dataset
Remove this metafield from the dataset specified by its mfdatasetid value.
Returns boolean dependent on success removing from the dataset.
add_to_database
$ok = $metafield->add_to_database
Add this metafield to the database.
Returns boolean dependent on success adding to the database.
remove_from_database
$ok = $metafield->remove_from_database
Remove this field from the database.
Returns boolean dependent on success removing from the database.
add_to_workflow
$ok = $metafield->add_to_workflow
Add this metafield to the workflow in the Misc. section.
Returns boolean dependent on success adding to the workflow.
remove_from_workflow
$ok = $metafield->remove_from_workflow
Remove all occurrences of this field from the workflow. Will remove the local stage if it is empty.
Returns boolean dependent on success removing from the workflow.
perl_struct
$data = $metafield->perl_struct( $prefix )
Returns the Perl data structure representation of this field, as you would find defined in the configuration or EPrints::DataObj classes.
If $prefix is defined returns the Perl data structure for the fields property, where $prefix is the fieldname of the parent field.
make_field_object
$field = $metafield->make_field_object
Makes and returns a new field object based on this metafield.
add_to_repository
$ok = $metafield->add_to_repository
Adds this field to the repository.
Returns boolean dependent on success adding to the repository.
remove_from_repository
$ok = $mf->remove_from_repository
Remove this field from the repository.
Returns boolean dependent on success removing from the repository.
validate
$problems = $metafield->validate( $repository )
Returns any problems associated with this metafield as an array reference.
render_citation
$xhtml = $metafield->render_citation( [ $type, %params ] )
Returns a XHTML DOM rendering of the metafield using citation $type (of default if not provided) an specified %params.
SEE ALSO
EPrints::DataObj and EPrints::DataSet.
COPYRIGHT
© Copyright 2000-2024 University of Southampton.
EPrints 3.4 is supplied by EPrints Services.
http://www.eprints.org/eprints-3.4/
LICENSE
This file is part of EPrints 3.4 http://www.eprints.org/.
EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.
EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.