Importer 4

Importer: Importing Feeds

The import process: How to import XML feeds.

The importer is able to poll feeds and import new feed items into Sophora. The feeds to import are managed in the Administration section of the Sophora Deskclient.

Preconditions

To be able to use this feature the Feed-Manager addon of the Sophora Deskclient is required. It registers the necessary node types and configurations for managing feeds. To install the feature, open the Feeds view within the Deskclient (Window >> Views >> Feeds) and confirm the emerging dialog that asks for permission to register the required node types. After registration, (re-)open the Administration view which then contains the entries: XML Feed Importer Configurations, XML Feeds and XSL.

Configuring XML Feeds and Importers

The feeds to import by the Importer can be configured in a similar way to the feed configuration of the Feed-Manager. One difference is that the configured XSL transformation document is ignored. Instead the transformation of feed items into Sophora XML is performed by the Importer itself. This is done the same way as importing any non-Sophora-XML file given to the importer (see Import Via Watchfolder).

The regarded fields of the feed document are the Name, URL, Item Xpath, Date XPath and Details Xpath. Additionally, the fields ID Stem (as parameter idStem) and Structure Node (its full path as parameter structureNodePath) and all parameters of the dynamic table XSL Parameters are given as XSL parameters to the XSL transformation process.

After the feeds are defined, an XML feed importer configuration document is needed to assign the feeds to importer instances.

To create a new XML feed importer configuration, open the context menu of the XML Feed Importer Configuration entry and select New: XML Feed Importer Configuration.
Now enter the configuration:

  • Configuration Name: A user-defined custom name.
  • Importer Name: Set the name of the importer that should import the feeds. This is the importer.name configuration option from the application.yml of the importer.
  • Importer Instance Name: This is the key from the instance configuration options from the application.yml. Due to backwards compatibility, this can also be the name of the instance. But it is recommended to use the key for referencing the importer instance.
  • Polling Frequency: Define the poll frequency as cron expression here.
  • Feeds: Add the feed documents of the feeds to import in the feeds list.

Polling and Importing Feeds

If the configuration option importer.feedPollingEnabled has been set to true in the application.yml, the importer reads the feed importer configurations at the start and begins polling the feeds with the configured poll frequency. Data regarding the polling of feeds (e.g. last processed feed item per feed) are saved in a folder which is specified via the importer base configuration option importer.folders.feedPollingData. If this property is not specified, a folder named feedpolling is created in the working directory of the importer.

Last modified on 10/16/20

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon