Difference between revisions of "API:EPrints/DataObj/MetaField"

From EPrints Documentation
Jump to: navigation, search
(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 'End of Pod2Wiki' comments will be lost.
+
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|MetaField]]<!-- End of Pod2Wiki -->
+
  -->{{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
  
<!-- End of Pod2Wiki -->
+
<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 shouldn't be used outside [[API:EPrints/Database|EPrints::Database]].
+
<!-- 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 -->
 +
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_methods -->=METHODS=
+
</div>
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_render_order -->
<!-- Pod2Wiki=item_get_system_field_info -->==get_system_field_info==
+
===render_order (set)===
  
  $thing = EPrints::DataObj::MetaField-&gt;get_system_field_info
+
The order to render a name if this metafield is for a name.
  
Core 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 -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_constructor_methods -->==Constructor Methods==
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_new -->===new===
 
  
  $thing = EPrints::DataObj::MetaField-&gt;new( $session, $metafieldid )
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_hide_honourific -->
 +
===hide_honourific (boolean)===
  
The data object identified by $metafieldid.
+
Whether to hide the honourfic sub-field if this is a name  metafield.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_new_from_data -->===new_from_data===
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  $thing = EPrints::DataObj::MetaField-&gt;new_from_data( $session, $known )
 
  
A new <tt>EPrints::DataObj::MetaField</tt> object containing data $known (a hash reference).
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_hide_lineage -->
 +
===hide_lineage (boolean)===
  
<!-- End of Pod2Wiki -->
+
Whether to hide the lineage sub-field if this is a name metafield.
<!-- Pod2Wiki=item_get_perl_struct -->===get_perl_struct===
 
  
  $data = EPrints::DataObj::MetaField-&gt;get_perl_struct
+
<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 -->
  
Returns the Perl data structure representation of this field, as you would find defined in the configuration or DataObj classes.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_class_methods -->==Class Methods==
+
</div>
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_family_first -->
<!-- Pod2Wiki=item_remove_all -->===remove_all===
+
===family_first (boolean)===
  
  EPrints::DataObj::MetaField::remove_all( $session )
+
Whether to render the family name sub-field before the given name if this is a name metafield.
  
Remove all records from 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 -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_defaults -->===get_defaults===
 
  
  $defaults = EPrints::DataObj::MetaField-&gt;get_defaults( $session, $data )
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_input_style -->
 +
===input_style (set)===
  
Return default values for this object based on the starting data.
+
A particular style for displaying the input form element for this metafield.
  
<!-- End of Pod2Wiki -->
+
<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_object_methods -->==Object Methods==
+
<span style='display:none'>User Comments</span>
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_remove -->===remove===
 
  
  $foo = $thing-&gt;remove()
 
  
Remove this record from the data set (see [[API:EPrints/Database|EPrints::Database]]).
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_input_rows -->
 +
===input_rows (int)===
  
<!-- End of Pod2Wiki -->
+
The number of input rows for this metafield.
<!-- Pod2Wiki=item_remove_from_workflow -->===remove_from_workflow===
 
  
  $ok = $mf-&gt;remove_from_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 -->
  
Remove all occurrences of this field from the workflow. Will remove the "local" stage if it is empty.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_see_also -->=SEE ALSO=
+
</div>
[[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]].
+
<!-- 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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;get_parent_id
 +
Returns the parent ID for this metafield.
 +
 
 +
Alias for:
 +
 
 +
$metafield-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;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====
  
<!-- End of Pod2Wiki -->
+
$ok = $mf-&gt;remove_from_repository
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
+
Remove this field from the repository.
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_add_to_phrases -->==add_to_phrases==
 
  
<!-- End of Pod2Wiki -->
+
Returns boolean dependent on success removing from the repository.
<!-- Pod2Wiki=item_add_to_workflow -->==add_to_workflow==
 
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_commit -->==commit==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_destroy_field -->==destroy_field==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_config_file -->==get_config_file==
+
</div>
 +
<!-- Pod2Wiki=item_validate -->
 +
====validate====
  
<!-- End of Pod2Wiki -->
+
$problems = $metafield-&gt;validate( $repository )
<!-- Pod2Wiki=item_get_config_path -->==get_config_path==
+
Returns any problems associated with this metafield as an array  reference.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_get_field -->==get_field==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_perl_file_config -->==get_perl_file_config==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_valid_datasets -->==get_valid_datasets==
+
</div>
 +
<!-- Pod2Wiki=item_render_citation -->
 +
====render_citation====
  
<!-- End of Pod2Wiki -->
+
$xhtml = $metafield-&gt;render_citation( [ $type, %params ] )
<!-- Pod2Wiki=item_get_warnings -->==get_warnings==
+
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>.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_get_xml_file_config -->==get_xml_file_config==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_load_all -->==load_all==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_move_to_archive -->==move_to_archive==
+
</div>
 +
<!-- Pod2Wiki=head_see_also -->
 +
==SEE ALSO==
 +
[[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]].
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_move_to_deletion -->==move_to_deletion==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_move_to_inbox -->==move_to_inbox==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_save_all -->==save_all==
+
</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 -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_validate -->==validate==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
+
</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


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


Contents

NAME

EPrints::DataObj::MetaField - metadata fields

User Comments


DESCRIPTION

This is an internal class that should not be used outside EPrints::Database.

User Comments


CORE METADATA FIELDS

User Comments


metafieldid (counter)

The unique identifer for the metafield.

User Comments


mfdatasetid (set)

The dataset two which this metafield belongs.

User Comments


name (text)

The name of this metafield.

User Comments


type (set)

The type of this metafield.

User Comments


provenance (set)

The provenance of this metafield.

User Comments


phrase_name (multilang, multiple)

The phrase name(s)(labels) potentially in multiple languages for this metafield.

User Comments


phrase_help (multilang, multiple)

The phrase help text(s) potentially in multiple languages for this metafield.

User Comments


required (boolean)

Whether this metafield is required for the dataset.

User Comments


multiple (boolean)

Whether this metafield can have multiple values for a data object.

User Comments


allow_null (boolean)

Whether this metafield can have a null value.

User Comments


export_as_xml (boolean)

Whether this metafield can be exported in XML.

User Comments


volatile (boolean)

Whether this metafield stores a volatile data.

User Comments


min_resolution (set)

The minimum time resolution (second, minute, hour, day, month or year) for this metafield if it is a timestamp/datestamp.

User Comments


sql_index (boolean)

Whether an SQL index should be created for this metafield.

User Comments


render_input (text)

A different or bespoke function to render the input field for this metafield.

User Comments


render_value (text)

A different or bespoke function to render the value for this metafield.

User Comments


input_ordered (boolean)

Whether the input for this metafield is ordered.

User Comments


maxlength (int)

The maximum length for this metafield if it is a text or subclass of a text field.

User Comments


browse_link (boolean)

The link to a browse view for this metafield if it is a subject metafield.

User Comments


top (text)

The top subject in the subject tree that should be used as options for this subject metafield.

User Comments


datasetid (text)

The dataset ID for this metafield, if it is a search, subobject, dataobjref, fields, itemref or file field.

User Comments


set_name (text)

The name of the file that contains the options for this namedset metafield.

User Comments


options (text)

The commas separated list of options for this set metafield.

User Comments


render_order (set)

The order to render a name if this metafield is for a name.

User Comments


hide_honourific (boolean)

Whether to hide the honourfic sub-field if this is a name metafield.

User Comments


hide_lineage (boolean)

Whether to hide the lineage sub-field if this is a name metafield.

User Comments


family_first (boolean)

Whether to render the family name sub-field before the given name if this is a name metafield.

User Comments


input_style (set)

A particular style for displaying the input form element for this metafield.

User Comments


input_rows (int)

The number of input rows for this metafield.

User Comments


input_cols (int)

The number of input columns for this metafield.

User Comments


input_boxes (int)

The number of input boxes for this metafield.

User Comments


sql_counter (text)

The name to give to the sql counter for this counter metafield. Typically the same as the metafield's name.

User Comments


default_value (text)

The default value for this metafield.

User Comments


REFERENCES AND RELATED OBJECTS

User Comments


parent (itemref)

The parent metafield this metafield belongs to, if it is a sub-field.

User Comments


fields (subobject, multiple)

Sub-fields of this metafield.

User Comments


INSTANCE VARIABLES

See EPrints::DataObj.

User Comments


METHODS

User Comments


Utility Methods

User Comments


dataset_ids

@ids = EPrints::DataObj::MetaField::dataset_ids( $repo )

Returns array of all dataset IDs for non-virtual datasets in $repo.

User Comments


render_dataset_id

$dataset_label = EPrints::DataObj::MetaField::render_dataset_id( $repo, $id )

Returns XHTML DOM rendering of phrase for dataset with $id.

User Comments


options_fromform

$options = EPrints::DataObj::MetaField::options_fromform( $value )

Returns an array reference of options from the comma-separated $value provided.

User Comments


options_toform

$options_str = EPrints::DataObj::MetaField::options_toform( $value )

Returns a comma-separated string of options from the array reference $value provided.

User Comments


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.

User Comments


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.

User Comments


Constructor Methods

User Comments


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.

User Comments


Class Methods

User Comments


get_system_field_info

$thing = EPrints::DataObj::MetaField->get_system_field_info

Returns an array describing the system metadata fields of the metafield dataset.

User Comments


get_dataset_id

$dataset = EPrints::DataObj::MetaField->get_dataset_id

Returns the ID of the EPrints::DataSet object to which this record belongs.

User Comments


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.

User Comments


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.

User Comments


Object Methods

User Comments


get_property_defaults

$defaults = $metafield->get_property_defaults( $repo, $type )

Gets the property defaults for metafield $type.

User Comments


dump

$str = $metafield->dump

Dump the fields configuration as used in cfg.d.

User Comments


get_parent_id

$parent = $metafield->get_parent_id

Returns the parent ID for this metafield.

Alias for:

$metafield->value( "parent" );
 

User Comments


remove

$ok = $metafield->remove

Remove the field and any sub-fields from the database.

User Comments


config_path

$path = $metafield->config_path

Returns the root directory of the repository configuration path.

User Comments


config_filename

$filename = $metafield->config_filename( $dataset )

Returns the location of the cfg.d config file for the provided $dataset.

User Comments


phrases_filename

$filename = $metafield->phrases_filename( $langid )

Returns the location of the XML phrases file for provided $lang.

User Comments


workflow_filename

$filename = $metafield->workflow_filename( $dataset )

Returns the location of the workflow file for the provided $dataset.

User Comments


add_to_phrases

$ok = $metafield->add_to_phrases

Adds the phrases defined by this metafield to the system.

User Comments


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.

User Comments


add_to_database

$ok = $metafield->add_to_database

Add this metafield to the database.

Returns boolean dependent on success adding to the database.

User Comments


remove_from_database

$ok = $metafield->remove_from_database

Remove this field from the database.

Returns boolean dependent on success removing from the database.

User Comments


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.

User Comments


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.

User Comments


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.

User Comments


make_field_object

$field = $metafield->make_field_object

Makes and returns a new field object based on this metafield.

User Comments


add_to_repository

$ok = $metafield->add_to_repository

Adds this field to the repository.

Returns boolean dependent on success adding to the repository.

User Comments


remove_from_repository

$ok = $mf->remove_from_repository

Remove this field from the repository.

Returns boolean dependent on success removing from the repository.

User Comments


validate

$problems = $metafield->validate( $repository )

Returns any problems associated with this metafield as an array reference.

User Comments


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.

User Comments


SEE ALSO

EPrints::DataObj and EPrints::DataSet.

User Comments


COPYRIGHT

© Copyright 2023 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/.

User Comments