Skip to main content
Skip table of contents

Portal & Registry Overview

As discussed in earlier sections, the RDA Registry is used to store, create and manage metadata records. These metadata records are then indexed in Solr and exposed to end users via the Discovery Portal. The RDA Registry has two main methods for exposing and exchanging metadata records with the Discovery Portal; the Registry Object API and the Syncing Process.

 Registry Object API

The Registry Object API is provided as one of the RDA Registry services and it allows the Discovery Portal to request information about registry objects which match a query or specific registry object ID. The portal utilises this API for the detailed display of records and to retrieve any additional metadata that the display logic requires.

This API is designed in much of a REST-ful interface where GET statement refers to a collection.

The Registry Object API is available via registry/services/registry_objects

The API has been developed in a way which allows the Portal to request specific metadata items to prevent the need to retrieve the whole metadata record each request. As of release 15, the Registry Object API offers the following handlers:

  • <blank>: returns everything
  • Core: returns the basic metadata of the registry object, eg (id, key, title, group,...)
  • Descriptions: returns the list of descriptions and descriptions type
  • Relationships: A list of all the related objects group by class (limit of 5 by default, overwrite with related_object_limit), and a total count of each relationship class.
  • Subjects: A list of subjects, in resolved form, unresolved form and type
  • Spatial: A list of spatial objects that the registry object contain.
  • Temporal: A list of temporal range that the registry object contain. Limited by year.
  • Citations: Citation information of the registry object
  • Dates: A list of available date and date type
  • Connection Tree: Data for the display of connection tree graph use for SOLR
  • RelatedInfo: Metadata that is located in the relatedInfo RIFCS section
  • Identifiers: A list of identifiers, type and their resolved form.
  • Rights: A list of rights element that the registry object contain
  • Contact: Contact information for the registry object.
  • Direct Access: whether the registry object has any downloadable for direct access portal.
  • Suggest: A suggestion list of registry objects that closely related to this registry object.
  • Logo: A determined logo for the registry object, normally this is found in description[type=logo]
  • Tags: A list of registry object internal/social tags for the registry object
  • Existence Dates: A list of specialised dates field for the registry object
  • Identifier Match: A list of records that shares the same identifier as the registry object.

For eg

GET registry/services/registry_objects?q=fish&limit=10&offset=0
returns 10 registry objects that matches the search term of fish

GET registry/services/registry_objects/16572
returns the JSON form of the API response for registry object 16572

GET registry/services/registry_objects.xml/16572
returns the XML from of the same request

GET registry/services/registry_objects/16572/relationships
returns just the relationships of the given registry object. By default, if there’s no handler passed in to the URL, the registry object API will return all available handler.


Viewing a registry object

The portal will use all of the information available in the Registry Object API in order to display the registry object accordingly. For more information on how to write a new registry object handler, please refer to the guide.

The portal default display and search model is registry_object, this is defined in applications/portal/core/config/config.php. For more information on how to use a different display and search model (that is used to customise the Portal for different type of data), please refer to the guide.

The portal registry_object model has an internal registry object called _ro.php (applications/portal/registry_object/models/_ro.php) that is encapsulated by the registry_objects model (applications/portal/registry_object/models/registry_objects.php).

Everytime an object of _ro is initialised, portal requests the registry for all the information regarding this given registry object id and build an object of its own.

For eg

$ro = new_ro(12765); //this will instantiate a new object with all the available resource from the registry object API
echo $ro->core[’title’]; //this will return the title for the registry object
var_dump($ro->descriptions); //this will give us a list of all the descriptions and their type for this registry object

The process is simplified with the registry_objects model. We can simply instantiate a new object by

$this->load->model('registry_objects', 'ro');
$ro = $this->ro->getByID(12765); //returns the _ro object with ID 12765
$ro = $this->ro->getByKey(‘abc’); //returns the _ro object by key
$ro = $this->ro->getBySlug(‘fish’); //returns the _ro object by the URL friendly slug

Searching for registry objects

The portal make extensive use of the solr.php library located at engine/libraries/Solr.php for searching. The portal delivers a search page that is powered by AJAX and the AngularJS framework to interact with SOLR and deliver search results.

Example: a simple search

$this->load->library('solr'); # loading the SOLR library for use
$this->solr->setOpt('q', 'fish'); # setting the parameter of q to fish
$result = $this->solr->executeSearch(); # $result now contains the SOLR search result of fish

Example: a simple facet

$this->solr->setOpt('q', 'fish');
$this->setFacetOpt('field', 'class'); # translates to facet.field=class in SOLR
$this->setFacetOpt('field', 'type'); # translates to facet.field=type in SOLR
$result = $this->solr->executeSearch(); # $result now contains the SOLR search result of fish
$facets = $this->solr->getFacet(); # $facets now contains the facet_counts return value of the SOLR search, this will contain both class facet and type facet
$class_facets = $this->solr->getFacetResult('class'); # $class_facets will only contain the facet counts for the class facet

Searching and Facetting functionality is made available via the SOLR indexed fields. The indexed fields are found at the our solr schema file, the latest is located at etc/misc/solrschema_r15.xml

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.