protected function getTermContextFromField($field_type) {
    // Be aware that drupal field definitions can be complex.
    // e.g text_with_summary has a text, a summary, a number of lines, etc
    // we are only dealing with the resulting ->value() of all this separate
    // pieces and mapping only that as a whole.
    // Default mapping to return in case no $field_type matches
    // field_mappings array keys.
    $default_mapping = [
      "@type" => "xsd:string",
    ];

    // Only load mappings from hooks if we haven't done it
    // yet for this instance.
    if (empty($this->fieldMappings)) {
      // Cribbed from rdf module's rdf_get_namespaces.
      foreach (\Drupal::moduleHandler()->getImplementations(self::FIELD_MAPPPINGS_HOOK) as $module) {
        $function = $module . '_' . self::FIELD_MAPPPINGS_HOOK;
        foreach ($function() as $field => $mapping) {
          if (array_key_exists($field, $this->fieldMappings)) {
            $this->logger->warning(
              t('Tried to map @field_type to @new_type, but @field_type is already mapped to @orig_type.', [
                '@field_type' => $field,
                '@new_type' => $mapping['@type'],
                '@orig_type' => $this->fieldMappings[$field]['@type'],
              ])
            );
          }
          else {
            $this->fieldMappings[$field] = $mapping;
          }
        }
      }
    }
    return array_key_exists($field_type, $this->fieldMappings) ? $this->fieldMappings[$field_type] : $default_mapping;
  }