Package org.openrefine.wikibase.utils
Class EntityCache
- java.lang.Object
-
- org.openrefine.wikibase.utils.EntityCache
-
public class EntityCache extends Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EntityCache(String entityPrefix, String mediaWikiApiEndpoint)
protected
EntityCache(org.wikidata.wdtk.wikibaseapi.WikibaseDataFetcher fetcher)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.wikidata.wdtk.datamodel.interfaces.EntityDocument
get(org.wikidata.wdtk.datamodel.interfaces.EntityIdValue id)
static EntityCache
getEntityCache(String siteIri, String mediaWikiApiEndpoint)
Get an entity cache for a given Wikibase instance.static org.wikidata.wdtk.datamodel.interfaces.EntityDocument
getEntityDocument(String entityPrefix, String mediaWikiApiEndpoint, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue id)
List<org.wikidata.wdtk.datamodel.interfaces.EntityDocument>
getMultipleDocuments(List<org.wikidata.wdtk.datamodel.interfaces.EntityIdValue> entityIds)
static void
removeEntityCache(String siteIri)
static void
setEntityCache(String siteIri, EntityCache cache)
Provided for testability.
-
-
-
Method Detail
-
get
public org.wikidata.wdtk.datamodel.interfaces.EntityDocument get(org.wikidata.wdtk.datamodel.interfaces.EntityIdValue id)
-
getEntityCache
public static EntityCache getEntityCache(String siteIri, String mediaWikiApiEndpoint)
Get an entity cache for a given Wikibase instance.- Parameters:
siteIri
-mediaWikiApiEndpoint
-- Returns:
-
setEntityCache
public static void setEntityCache(String siteIri, EntityCache cache)
Provided for testability.- Parameters:
siteIri
-cache
-
-
getMultipleDocuments
public List<org.wikidata.wdtk.datamodel.interfaces.EntityDocument> getMultipleDocuments(List<org.wikidata.wdtk.datamodel.interfaces.EntityIdValue> entityIds) throws ExecutionException
- Throws:
ExecutionException
-
getEntityDocument
public static org.wikidata.wdtk.datamodel.interfaces.EntityDocument getEntityDocument(String entityPrefix, String mediaWikiApiEndpoint, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue id)
-
removeEntityCache
public static void removeEntityCache(String siteIri)
-
-