* @author Vasilis Georgoudis * @author Corentin Perrot */ class Pressbooks_Metadata_Dataset extends Pressbooks_Metadata_Type { /** * The variable that holds all parent required properties * * @since 0.x * @access public */ static $required_parent_props = array( ); /** * The variable that holds the values for the settings for this schema type * * @since 0.x * @access public */ static $type_setting = array('dataset_type' => array('Dataset Type','http://schema.org/Dataset')); /** * The variable that holds the parents for the type * * @since 0.x * @access public */ static $type_parents = array( 'schemaTypes\Pressbooks_Metadata_Thing', 'schemaTypes\Pressbooks_Metadata_CreativeWork' ); /** * The variable that holds the properties of this schema type * * @since 0.x * @access public */ static $type_properties = array( 'distribution' => array(false,'Distribution','A downloadable form of this dataset, at a specific location, in a specific format.'), 'includedInDataCatalog' => array(false,'Included In Data Catalog','A data catalog which contains this dataset. Supersedes catalog, includedDataCatalog. Inverse property: dataset.'), 'issn' => array(false,'ISSN','The International Standard Serial Number (ISSN) that identifies this serial publication. You can repeat this property to identify different formats of, or the linking ISSN (ISSN-L) for, this serial publication.'), 'measurementTechnique' => array(false,'Measurement Technique',' A technique or technology used in a Dataset (or DataDownload, DataCatalog), corresponding to the method used for measuring the corresponding variable(s) (described using variableMeasured). This is oriented towards scientific and scholarly dataset publication but may have broader applicability; it is not intended as a full representation of measurement, but rather as a high level summary for dataset discovery. For example, if variableMeasured is: molecule concentration, measurementTechnique could be: "mass spectrometry" or "nmr spectroscopy" or "colorimetry" or "immunofluorescence". If the variableMeasured is "depression rating", the measurementTechnique could be "Zung Scale" or "HAM-D" or "Beck Depression Inventory". If there are several variableMeasured properties recorded for some given data object, use a PropertyValue for each variableMeasured and attach the corresponding measurementTechnique.'), 'variableMeasured' => array(false,'Variable Measured','The variableMeasured property can indicate (repeated as necessary) the variables that are measured in some dataset, either described as text or as pairs of identifier and description using PropertyValue.') ); public function __construct($type_level_input) { parent::__construct($type_level_input); $this->type_fields = $this->get_all_properties(); $this->class_name = __CLASS__ .'_'. $this->type_level; $this->pmdt_populate_names(self::$type_setting); $this->pmdt_add_metabox($this->type_level); } /** * Function used for combining the current types properties with its parents fields * * @since 0.x * @access public */ public function get_all_properties() { $properties = self::$type_properties; foreach(self::$type_parents as $parentType){ $properties = array_merge($properties,$parentType::type_properties); } return $properties; } /** * Function used for comparing the instances of the schema types * * @since 0.x * @access public */ public function __toString() { return $this->class_name; } }