Skip to content

Commit

Permalink
Remove Gemini instructions for finding nodes in Fedora (#1901)
Browse files Browse the repository at this point in the history
* Remove Gemini

* Update testing-notes.md

* Computed by Crayfish Commons, not Milliner.
  • Loading branch information
rosiel authored Oct 13, 2021
1 parent 0d5d614 commit 3888382
Showing 1 changed file with 4 additions and 35 deletions.
39 changes: 4 additions & 35 deletions docs/technical-documentation/testing-notes.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,12 @@
## How to find things in Fedora?

The map between Drupal URIs and their corresponding Fedora URIs is stored in a service called Gemini. An Islandora "pseudo-field" can be enabled that will display the corresponding Fedora URI on the page of a node, taxonomy term, or media object. You can also query Gemini directly. Instructions for doing that are provided below.
For any Drupal URI, the corresponding Fedora URIs is computed by the [Crayfish Commons](https://github.com/Islandora/Crayfish-Commons/blob/2.x/src/EntityMapper/EntityMapper.php) library using the Drupal-assigned UUID. In Drupal, a "pseudo-field" is available that will display the corresponding Fedora URI on the page of a node, taxonomy term, or media object. The presence of this URI does NOT guarantee the existence of the corresponding entity in Fedora.

For more information about the Gemini service, see the [Gemini README](https://github.com/Islandora/Crayfish/tree/main/Gemini).
### Enabling the Fedora URI Pseudo-field

## Fedora URI Pseudo-field
To display the Fedora URI pseudo-field on a Drupal node, media, or taxonomy term, go to Manage > Configuration > Islandora and select all the bundles for which you would like the Fedora URI displayed. Once you have selected the bundles, and cleared the cache, the new pseudo-field will appear at the bottom of _all display modes_. You can alter where in the display the Fedora URI field appears, by going to the "Manage Display" page for the bundle. For example, for a Repository Item, you'd go to Manage > Structure > Content Types, and under the dropdown for "Repository Item, select "Manage Display". In that list you should see `Fedora URI` which you can move around (or hide) as desired. This will need to be repeated in each Display mode (tab). Clearing cache may be necessary to refresh the node display.

To display the Fedora URI pseudo-field on a Drupal node, media, or taxonomy term, go to Manage > Configuration > Islandora and select all the bundles for which you would like the Fedora URI displayed. A valid Gemini URL is required. On the [playbook](https://github.com/Islandora-Devops/claw-playbook), Gemini is at http://localhost:8080/gemini. Once you have selected the bundles, and cleared the cache, the new pseudo-field will appear at the bottom of all display modes. You can alter where in the display the Fedora URI field appears, by going to the "Manage Display" page for the bundle. For example, for a Repository Item, you'd go to http://localhost:8000/admin/structure/types/manage/islandora_object/display. In that list you should see `Fedora URI` which you can move around (or hide) as desired. Clearing cache may be necessary to refresh the node display.


## How to look up a Fedora URI through Gemini (nodes and taxonomy terms)

In Gemini, each entry is keyed on the UUID assigned by Drupal (the long one, not the node id). To get the UUID of a node, or taxonomy term in Drupal, you can look in the Devel tab or in the JSON representation, e.g.: `http://localhost:8000/node/2?_format=json`.

Then, query the Gemini REST service (using a REST client such as POSTman, or a command-line tool such as `curl`) for that UUID:

```
curl -H "Authorization:Bearer islandora" http://localhost:8000/gemini/[uuid_value]
```

Alternatively, you can login to SQL, choose the gemini database, and issue a query. With the playbook's default setup:

```
vagrant ssh
mysql -uroot -pislandora gemini
select fedora_uri from Gemini where drupal_uri = 'http://localhost:8000/node/[nid]?_format=jsonld';
```

## How to look up a Fedora URI through Gemini (files)?
Files in Fedora have the file URI in Gemini, and can be queried based on the UUID (accessible from the Media's json) or their URI.

`
select fedora_uri from Gemini where drupal_uri = 'http://localhost:8000/_flysystem/fedora/2019-05/639647.jpg';
`

## Media and Gemini
Media objects aren't indexed in Gemini. Their Fedora counterparts are located at the Fedora URI of the file, appended with `/fcr:metadata`. This is an RDF document in Fedora that describes _the binary file itself_, and it contains all the information describing the file that is present in the fields of the Media.

When you enable the pseudo-field on a media object, you see the URI of its Fedora counterpart, `file_uri + /fcr:metadata`, constructed using the Gemini mapping of its attached file.
Note: This information used to be stored in a service called Gemini, which kept track of corresponding minted Fedora URIs and their minted equivalents. Gemini was removed for Islandora 2.0.0.


## How do I search for a object in the Solr?
Expand Down

0 comments on commit 3888382

Please sign in to comment.