Package org.mycore.mods.rss
Class MCRRSSFeedImporter
java.lang.Object
org.mycore.mods.rss.MCRRSSFeedImporter
Reads an RSS feed referencing new publications and imports those publications that are not stored yet.
Usage:
MCRRSSFeedImporter.importFromFeed( [sourceSystemID], [targetProjectID] );
where targetProjectID is the target project ID to import mods objects to, e.g. "mir".
Reads the RSS feed configured via
MCR.MODS.RSSFeedImporter.[sourceSystemID].FeedURL=[http(s) URL of remote RSS feed to read]
For each entry,
1. Gets the link given in that entry (assuming it points to the publications) and
extracts the publication ID from the link, using a regular expression configured via
MCR.MODS.RSSFeedImporter.[sourceSystemID].Pattern2FindID=
2. Queries the SOLR index to check if this publication isn't already stored. The field to query is
MCR.MODS.RSSFeedImporter.[sourceSystemID].Field2QueryID=[SOLR field name]
3. Retrieves the publication metadata from the remote system and converts it to <mycoreobject /> XML.
MCR.MODS.RSSFeedImporter.[sourceSystemID].PublicationURI=xslStyle:...:http://...{0}...
where the remote publication ID will be replaced in Java message format syntax as {0}.
4. Saves the publication in persistent store, with the given projectID and object type "mods".
When the total number of publications imported is > 0 AND the property
MCR.MODS.RSSFeedImporter.[sourceSystemID].XSL2BuildNotificationMail=foo.xsl
is set, builds and sends a notification mail via MCRMailer.
- Author:
- Frank Lützenkirchen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
importFromFeed
(String sourceSystemID, String projectID) void
importPublications
(String projectID)