Initial OSF for Drupal Configuration

From OSF Wiki
Jump to: navigation, search


Screencast Tutorial


The OSF for Drupal Configuration manual will drives you all the initial OSF for Drupal configuration steps that you have to do in order to connect it to an operational OSF Web Services instance. It assumes that you just finished to install OSF for Drupal using the OSF Installer and that the OSF instance is running on the same instance (but it can be running from anywhere, as long as the Drupal server as access to it).

The first time you will get to you newly installed Drupal portal, you will see that page appearing:

Initial Drupal page after an installation of OSF for Drupal

Registering the Initial OSF Web Services Endpoint

To register a new OSF Web Services endpoint, you have to click on the top Configuration menu item. Note that this page is the main Drupal page where you can configure all the enabled modules. Then, you have to click the Configure OSF for Drupal modules.

OSF for Drupal configurations

Now you get to the main OSF for Drupal configuration page. All the configurations for all the OSF modules are accessible from that page. What you want to make sure is that the DATASET & NETWORKS tab is selected. Then you have to click on the OSF API Endpoints link to get to the page where you will register your new endpoint.

OSF for Drupal main configurations page

Then you get to the form where you have to specify all the information that is required to register a new OSF Web Services endpoint to the OSF for Drupal module. The information you have to provide is:

  • Administrative title
    • This is the title that will be use to refere to this endpoint in the user interface across Drupal
  • URI
    • This is the base URL of the OSF Web Services endpoint. It usally ends with /ws/
  • Application ID
    • This is the application ID that will be used by Drupal to communicate with the OSF instance. If you don't use a default one, you will have to check with the OSF instance administrator such that he can provide one to you.
  • API Key
    • This is the API Key that is linked with the Application ID you provided above. This is required such that the Drupal instance can authenticate all the web service queries that it sends to the OSF instance.
  • Color
    • This is the color that is used to highligth that network in the user interface
  • Default
    • This is used to specify if this OSF endpoint instance is the default one. Depending on the OSF for Drupal module, some of them are only using with the default endpoin, others will all the endpoints. For example, the Search module only works with the default endpoint.

Then you have to click the Save button to register that new endpoint.

Registering the initial OSF Web Services endpoint

Once you saved the OSF Web Services to register, you will see it appearing in the list of available OSF endpoints to that Drupal instance. From that OSF API Endpoints section, you will be able to edit, modify, create and delete all the endpoints.

The newly registered endpoint is now displayed in the list of registered endpoints

Importing a Custom Ontology

Before importing a custom dataset into OSF, you should import all the ontologies that are used to describe the content of these datasets.

To import a new ontology, click the top Ontologies menu item.

Osf ontologies menu.PNG

You will get to the OSF Ontology module page. From there, you can import a new ontology by clicking the Import button. A new importation section will appear at the bottom of the ontologies list. Click the Browse button, select the ontology file to import and click the Import Ontology button.

Osf ontology import.PNG

Importing and Exposing an Initial Dataset

Now that we have successfully registered a OSF instance, the next step is to import a new dataset to test this new installation. What you have to do is to click the + Import Dataset link on the DATASETS & NETWORKS tab.

Import a new dataset

The Import Dataset page will let you import a dataset serialized in one of the following formats:

What you have to specify to import a new dataset is:

  • Dataset file to import
    • Select the RDF file you want to import from your local computer
  • Content type
    • Select the type of RDF file you are trying to import
  • Dataset name
    • Define the name of the Dataset you are importing
  • Dataset description (Optional)
    • Optionally define the description of that dataset
  • Custom Dataset URI (Optional)
    • Define the URI of the dataset. If you don't provide any URI, then OSF for Drupal will create one for you
  • Save dataset on this network
    • Choose on which OSF Web Services endpoint you want to import that dataset
  • Which role should have full permissions on this dataset
Note: you may be limited in term of the size of the dataset file you may want to import. If you want to use the Datasets Management Tool if you want to import bigger datasets into the system.

What you can do to test importing a new dataset, is to use this testing dataset that is composed of a list of Schools that exists in the City of Iowa. You can download it from here directly on your desktop. And then select it for importation. If you use this dataset file, you will have to select the Content type RDF+N3

Then you only have to click the Import button to start the dataset importation process.

Form for importing a new dataset

At this point, the dataset got created into the OSF instance. Then all the content of the dataset file you imported as been indexed in that newly created dataset.

Once the dataset is imported, you will get redirected to a new page. If you checked the Check attributes and types existence option, then you would be seeing the possible warnings on that page. If you didn't, then the user interface is asking you to click the Expose Imported Dataset button. The only thing you have to do is to click on that button to get redirected to the form you have to fill to expose the dataset to Drupal.

Exposing the newly imported dataset in Drupal

The last step is to expose the dataset you just imported into the OSF instance to Drupal. If you skip this step, then the dataset will be on the OSF instance, but it won't be usable to any OSF for Drupal module.

  • Administrative title
    • This is the name you want to give to this dataset. This name is local to this Drupal instance. It will be used to refer to the dataset within the user interface of this Drupal portal
  • Dataset is searchable
    • This specifies if you want to have this dataset searchable by the OSF SearchAPI module. If this option is unchecked then the content of this dataset won't participate into the seaches performed by the OSF SearchAPI module

Once you are done, you simply have to click the Save button to expose this newly imported dataset to Drupal.

Form for exposing the new dataset

Now you can see the newly imported dataset in the list of accessible datasets.

The new dataset appears into the list of available datasets

Changing Permissions for the Initial Dataset

One of the last thing you may want to do is to properly setup the permissions of the dataset you just imported. You can read more about the dataset permissions on the Manage Permissions page that explains everything related to these dataset permissions.

If you want to make the content of that new dataset readable by everybody, then you first have to get to the page where you can setup these permissions. On the page that list all the datasets, click the Edit link. Then click the Permissions link.

Then you will get to the page where you can change the permissions of the dataset. Since we want to make the dataset readable to everybody, then we will make sure that all the checkboxes of the Read line are checked. What we are specifying here is that we want all these roles (which includes anonymous users) to be able to read content from that dataset.

Finally you have to scroll down that permissions page, and click the Save button to save the newly configured permissions.

Changing the role permissions for that dataset

Finally, let's browse and search for the records we just imported. You can access an administrative browse & search tool by clicking on the top Resources menu item. Once you click on that menu item, you will get redirected to the page below.

From that page, you can browse the entire content of the datasets that have been exposed to Drupal. You can also search & filter by datasets and types. Additionally, you will be able to perform different operations such as editing, deleting and viewing these records.

If you want to know how this tool work, you can refer you to the Using OSF Entities and Resource Types page.

Browsing the records in that dataset
Finally you should read the OSF for Drupal User Manual to be aware of all the features proposed by the complete set of modules.