Skip to content

Commit

Permalink
Merge pull request #1470 from tripal/tv4g1-issue1468-standard-naming-…
Browse files Browse the repository at this point in the history
…for-tripal-fields

Tripal 4 issue1468 standard naming for tripal fields
  • Loading branch information
laceysanderson committed May 9, 2023
2 parents f64788d + 4d2f0e3 commit 39ca564
Show file tree
Hide file tree
Showing 15 changed files with 424 additions and 274 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getTypes();
*
* @param array $values
* Associative array 5-levels deep.
* The 1st level is the field name (e.g. obi__organism).
* The 1st level is the field name (e.g. ChadoOrganismDefault).
* The 2nd level is the delta value (e.g. 0).
* The 3rd level is a field key name (i.e. record_id + value).
* The 4th level must contain the following three keys/value pairs
Expand All @@ -63,7 +63,7 @@ public function insertValues(&$values) : bool;
*
* @param array $values
* Associative array 5-levels deep.
* The 1st level is the field name (e.g. obi__organism).
* The 1st level is the field name (e.g. ChadoOrganismDefault).
* The 2nd level is the delta value (e.g. 0).
* The 3rd level is a field key name (i.e. record_id + value).
* The 4th level must contain the following three keys/value pairs
Expand All @@ -83,7 +83,7 @@ public function updateValues(&$values) : bool;
*
* @param array $values
* Associative array 5-levels deep.
* The 1st level is the field name (e.g. obi__organism).
* The 1st level is the field name (e.g. ChadoOrganismDefault).
* The 2nd level is the delta value (e.g. 0).
* The 3rd level is a field key name (i.e. record_id + value).
* The 4th level must contain the following three keys/value pairs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ fields:
- name: organism_infraspecific_type
content_type: bio_data_1
label: Infraspecific Type
type: schema__additional_type
type: chado_additional_type_default
description: The connector type (e.g. subspecies, varietas, forma, etc.) for the infraspecific name.
cardinality: 1
required: false
Expand Down Expand Up @@ -568,7 +568,7 @@ fields:
- name: contact_type
content_type: bio_data_5
label: Contact Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: false
Expand Down Expand Up @@ -725,7 +725,7 @@ fields:
- name: protocol_type
content_type: bio_data_7
label: Protocol Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -857,7 +857,7 @@ fields:
- name: gene_organism
content_type: bio_data_8
label: Organism
type: obi__organism
type: chado_organism_default
description: A material entity that is an individual living system, such as animal, plant, bacteria or virus, that is capable of replicating or reproducing, growth and maintenance in the right environment. An organism may be unicellular or made up, like humans, of many billions of cells divided into specialized tissues and organs.
cardinality: 1
required: true
Expand All @@ -882,7 +882,7 @@ fields:
- name: gene_type
content_type: bio_data_8
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -1015,7 +1015,7 @@ fields:
- name: mrna_type
content_type: bio_data_9
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -1096,7 +1096,7 @@ fields:
- name: pylotree_type
content_type: bio_data_10
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: false
Expand Down Expand Up @@ -1177,7 +1177,7 @@ fields:
- name: physical_map_unit_type
content_type: bio_data_11
label: Unit Type
type: schema__additional_type
type: chado_additional_type_default
description: A unit of measurement is a standardized quantity of a physical quality.
cardinality: 1
required: false
Expand Down Expand Up @@ -1257,7 +1257,7 @@ fields:
- name: dna_library_type
content_type: bio_data_12
label: Library Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -1473,7 +1473,7 @@ fields:
- name: genome_assembly_type
content_type: bio_data_13
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -1688,7 +1688,7 @@ fields:
- name: genome_annotation_type
content_type: bio_data_14
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -1769,7 +1769,7 @@ fields:
- name: genome_project_type
content_type: bio_data_15
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -1850,7 +1850,7 @@ fields:
- name: genetic_map_unit_type
content_type: bio_data_16
label: Unit Type
type: schema__additional_type
type: chado_additional_type_default
description: A unit of measurement is a standardized quantity of a physical quality.
cardinality: 1
required: false
Expand Down Expand Up @@ -1982,7 +1982,7 @@ fields:
- name: qtl_type
content_type: bio_data_17
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -2115,7 +2115,7 @@ fields:
- name: sequence_variant_type
content_type: bio_data_18
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -2248,7 +2248,7 @@ fields:
- name: genetic_marker_type
content_type: bio_data_19
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -2381,7 +2381,7 @@ fields:
- name: phenotypic_marker_type
content_type: bio_data_20
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -2488,7 +2488,7 @@ fields:
- name: germplasm_type
content_type: bio_data_21
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -2596,7 +2596,7 @@ fields:
- name: breeding_cross_type
content_type: bio_data_22
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -2703,7 +2703,7 @@ fields:
- name: germplasm_variety_type
content_type: bio_data_23
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -2810,7 +2810,7 @@ fields:
- name: ril_type
content_type: bio_data_24
label: Type
type: schema__additional_type
type: chado_additional_type_default
description: An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in.
cardinality: 1
required: true
Expand Down Expand Up @@ -3125,7 +3125,7 @@ fields:
- name: array_design_substrate_type
content_type: bio_data_27
label: Substrate Type
type: schema__additional_type
type: chado_additional_type_default
description: Controlled terms for descriptors of types of array substrates.
cardinality: 1
required: false
Expand All @@ -3152,7 +3152,7 @@ fields:
- name: array_design_platform_type
content_type: bio_data_27
label: Platform Type
type: schema__additional_type
type: chado_additional_type_default
description: The specific version (manufacturer, model, etc.) of a technology that is used to carry out a laboratory or computational experiment.
cardinality: 1
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
use Drupal\tripal_chado\TripalField\ChadoFormatterBase;

/**
* Plugin implementation of default Tripal string type formatter.
* Plugin implementation of default Tripal additional type formatter.
*
* @FieldFormatter(
* id = "schema__additional_type_formatter",
* id = "chado_additional_type_formatter_default",
* label = @Translation("Chado Type Reference Formatter"),
* description = @Translation("A Chado type reference formatter"),
* field_types = {
* "schema__additional_type"
* "chado_additional_type_default"
* }
* )
*/
class schema__additional_type_formatter extends ChadoFormatterBase {
class ChadoAdditionalTypeFormatterDefault extends ChadoFormatterBase {

/**
* {@inheritDoc}
Expand All @@ -36,4 +36,4 @@ public function viewElements(FieldItemListInterface $items, $langcode) {
return $elements;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
use Drupal\tripal_chado\TripalField\ChadoFormatterBase;

/**
* Plugin implementation of default Tripal string type formatter.
* Plugin implementation of default Tripal linker property formatter.
*
* @FieldFormatter(
* id = "chado_linker__prop_formatter",
* id = "chado_linker_property_formatter_default",
* label = @Translation("Chado Property"),
* description = @Translation("Add a property or attribute to the content type."),
* field_types = {
* "chado_linker__prop"
* "chado_linker_property_default"
* }
* )
*/
class chado_linker__prop_formatter extends ChadoFormatterBase {
class ChadoLinkerPropertyFormatterDefault extends ChadoFormatterBase {

/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
use Drupal\tripal_chado\TripalField\ChadoFormatterBase;

/**
* Plugin implementation of default Tripal string type formatter.
* Plugin implementation of default Tripal organism formatter.
*
* @FieldFormatter(
* id = "obi__organism_formatter",
* id = "chado_organism_formatter_default",
* label = @Translation("Chado Organism Reference Formatter"),
* description = @Translation("A chado organism reference formatter"),
* field_types = {
* "obi__organism"
* "chado_organism_default"
* }
* )
*/
class obi__organism_formatter extends ChadoFormatterBase {
class ChadoOrganismFormatterDefault extends ChadoFormatterBase {

/**
* {@inheritdoc}
Expand Down

0 comments on commit 39ca564

Please sign in to comment.