Importer 3

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 Adminstration 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 than 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 of importing any Non-Sophora XML file, which is given to the importer (see XSL Transformation Before Importing).

The regarded fields of the feed document are the Name, URL, Item Xpath, Date XPath and Details Xpath. Additionally, the fields ID Stem (as paramater 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: An user-defined custom name.
  • Importer Name: Set the name of the importer that should import the feeds. This is the name configured at sophora.importer.name of the sophora-importer.properties.
  • Importer Instance Name: Set the name of the importer instance of the importer above. This is the name configured at sophora.importer.instance.name of the sophora-importer_instance-NNN.properties.
  • 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 property sophora.importer.feedpolling.active has been set to true in the properties-file, the importer reads the feed importer configurations at start and begins polling the feeds with the set 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 property sophora.importer.directory.feedpolling.data. If this property is not specified, a folder named feedpolling is created next to the properties-file of the importer.

Last modified on 3/9/20

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

Icon