Package de.undercouch.citeproc
Class CompoundItemDataProvider
- java.lang.Object
-
- de.undercouch.citeproc.CompoundItemDataProvider
-
- All Implemented Interfaces:
ItemDataProvider
public class CompoundItemDataProvider extends java.lang.Object implements ItemDataProvider
Retrieves citation items from a list of other
ItemDataProviders.Calls each
ItemDataProviderin the order they have been added to the list and returns the first citation item retrieved. Returnsnullif no provider returned a result.Does not check for duplicate items or item IDs.
- Since:
- 1.1.0
- Author:
- Michel Kraemer
-
-
Constructor Summary
Constructors Constructor Description CompoundItemDataProvider(java.util.List<ItemDataProvider> providers)Creates a new compound provider
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<java.lang.String>getIds()CSLItemDataretrieveItem(java.lang.String id)Retrieve a citation item with a given ID
-
-
-
Constructor Detail
-
CompoundItemDataProvider
public CompoundItemDataProvider(java.util.List<ItemDataProvider> providers)
Creates a new compound provider- Parameters:
providers- the list of other providers to query for citation items
-
-
Method Detail
-
retrieveItem
public CSLItemData retrieveItem(java.lang.String id)
Description copied from interface:ItemDataProviderRetrieve a citation item with a given ID- Specified by:
retrieveItemin interfaceItemDataProvider- Parameters:
id- the item's unique ID- Returns:
- the item
-
getIds
public java.util.Collection<java.lang.String> getIds()
- Specified by:
getIdsin interfaceItemDataProvider- Returns:
- all item IDs this provider can serve
-
-