Configuring and Using the OSF Concept Reference (Tagging) Field Widget

From OSF Wiki
Jump to: navigation, search

The OSF Concept Reference (Tagging) and the field widget is a specialized field widget that is used to reference OSF entities to ontological concepts (so classes defined in loaded ontologies in the Drupal portal). This field widget is normally used for tagging purposes: tagging entities with subject concepts. This field has three ways to let the user tag the entity:

  1. It gives the possibility to the user to search the concept to use as a tag
  2. It gives the possibility to the user to automatically tag the entity using the Scones web service endpoint
  3. It gives the possibility to the user to browse the loaded ontologies and select a class directly from OSF Ontology (the ontology browser)

Configuring the OSF Concept Reference (tagging) Field Widget

To configure the field, you have to click the edit link in the list of fields to manage for an existing content type, or an existing resource type.

Osf field 5.PNG

After clicking the link, you will be redirected to the list of configuration options that are available for this field widget.

The first setting is the Fields to include in SCONES lookup option. This setting let you specify the unstructured text fields that is defined for the entity that uses this field widget that should be used for automatically tagging the entity using the Scones web service endpoint. It is the text values of this/these fields that will be sent to scones.

The second setting is the Max number of suggestions option. This setting let you specify the maximum number of suggestions returned by Scones.

The third setting that is of interest to us is the Ontologies datasets to use when searching for a concept to add option. In that section, you will have a list of all the loaded ontologies currently available to you. Then you will have to select all the ontologies that you want to make available to the field widget. This means that if you select the ontologies A and B, then when the user will try to reference entities using that field widget, he will only search for classes concepts within the ontologies A and B.

Osf field 6.PNG

The fourth setting of interest is the Number of values setting. This setting restrain the number of values (references) that a user can define for that field.

Finally, when you are done configuring the field widget, you have to click the Save settings button to save the settings you just configured.

Osf field 7.PNG

Using the OSF Concept Reference (tagging) Field Widget

Once the OSF Concept Reference (tagging) is configured, you can start using it by editing one of your content type or resource type entity. The field widget looks like this:

Osf field 8.PNG

You have 3 main sections with this widget:

  1. The top Browse & add and Recommend from SCONES links.
  2. The top edit box section that is an autocompletion field what will let you find the entity you want to refer to. Once you start typing a single character, you will start seeing classes results appearing. The search is done on the preferred label of the classes (their names)
  3. The bottom section lists all the classes that have been selected using that field widget. All the blue boxes that are checked will be saved in the system. If a class is unchecked, then it will appear in yellow and it won't be saved into the system.

If the user clicks on the Browse & add button, then the OSF Ontology module (the ontologies browser) will appear in a contextual popup window. The the user will be able to select an ontology and then search the class he wants to add into the field type. Once the user found the class to add, he will be able to add it to the field using the Add to node button.

Osf field 9.PNG

Finally if the user clicks on the Recommend from SCONES link, then a query will be sent in background to the Scones web service endpoint, and will add all the suggestions by the endpoint. Then, the user will have to possibility to unselect some of the results returned by scones before saving the entity.