public class WikibaseRepository extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WikibaseRepository.Uris
URIs used for accessing wikibase.
|
| Constructor and Description |
|---|
WikibaseRepository(String scheme,
String host) |
| Modifier and Type | Method and Description |
|---|---|
Collection<org.openrdf.model.Statement> |
fetchRdfForEntity(String entityId)
Fetch the RDF for some entity.
|
org.json.simple.JSONObject |
fetchRecentChanges(Date nextStartTime,
org.json.simple.JSONObject lastContinue,
int batchSize)
Fetch recent changes starting from nextStartTime or continuing from
lastContinue depending on the contents of lastContinue way to use
MediaWiki.
|
String |
firstEntityIdForLabelStartingWith(String label,
String language,
String type)
Get the first id with the provided label in the provided language.
|
org.json.simple.JSONObject |
getContinueObject(Change lastChange)
Create JSON change description for continuing.
|
static DateFormat |
inputDateFormat()
Create a new DateFormat object that parses from and formats to the date
in the format that wikibase returns.
|
static DateFormat |
outputDateFormat()
Create a new DateFormat object that parses from and formats to the date
in the format that wikibase wants as input.
|
String |
setLabel(String entityId,
String type,
String label,
String language)
Edits or creates a page by setting a label.
|
public org.json.simple.JSONObject fetchRecentChanges(Date nextStartTime, org.json.simple.JSONObject lastContinue, int batchSize) throws RetryableException
nextStartTime - if lastContinue is null then this is the start time
of the querylastContinue - continuation point if not nullbatchSize - the number of recent changes to fetchRetryableException - thrown if there is an error communicating with
wikibasepublic Collection<org.openrdf.model.Statement> fetchRdfForEntity(String entityId) throws RetryableException
RetryableException - thrown if there is an error communicating with
wikibasepublic String firstEntityIdForLabelStartingWith(String label, String language, String type) throws RetryableException
RetryableException - thrown if there is an error communicating with
wikibasepublic String setLabel(String entityId, String type, String label, String language) throws RetryableException
entityId - id of the entity - if null then the entity will be
created newtype - type of entity to create or editlabel - label of the page to createlanguage - language of the label to addRetryableException - thrown if there is an error communicating with
wikibasepublic static DateFormat outputDateFormat()
public static DateFormat inputDateFormat()
public org.json.simple.JSONObject getContinueObject(Change lastChange)
lastChange - Copyright © 2016. All rights reserved.