public interface WikidataDao extends Dao<WikidataStatement>
| Modifier and Type | Method and Description |
|---|---|
Set<Integer> |
conceptsWithValue(String propertyName,
WikidataValue value) |
Iterable<WikidataStatement> |
get(WikidataFilter filter)
Returns all statements that meet some sort of criterion.
|
Iterable<WikidataStatement> |
getByValue(String propertyName,
WikidataValue value) |
Iterable<WikidataStatement> |
getByValue(WikidataEntity property,
WikidataValue value) |
WikidataEntity |
getItem(int id)
Returns the item associated with the particular id
|
Integer |
getItemId(LocalId localId) |
Integer |
getItemId(LocalPage page)
Gets the item id for a given LocalPage (the number after "Q")
|
LocalWikidataStatement |
getLocalStatement(Language language,
WikidataStatement statement)
Translates a single language-agnostic statement into a human interpretable
statement in that particular language.
|
Map<String,List<LocalWikidataStatement>> |
getLocalStatements(Language lang,
WikidataEntity.Type type,
int id)
Returns all statements for the specified concept id.
|
Map<String,List<LocalWikidataStatement>> |
getLocalStatements(LocalPage page)
Returns human-understandable interpretations of statements for a particular page.
|
Map<Integer,WikidataEntity> |
getProperties()
Returns all known properties.
|
WikidataEntity |
getProperty(int id)
Fetches the property associated with an id.
|
WikidataEntity |
getProperty(Language language,
String name)
Gets a property by a name in some language.
|
List<WikidataStatement> |
getStatements(LocalPage page)
Returns all statements for a particular page.
|
UniversalPage |
getUniversalPage(int itemId)
Gets the LocalPage for the input itemId (the number after "Q") and language (if it exists)
|
Set<LocalId> |
pagesWithValue(String propertyName,
WikidataValue value,
Language language) |
void |
save(WikidataEntity entity)
Saves the specified entity
|
WikidataEntity getProperty(Language language, String name) throws DaoException
DaoExceptionWikidataEntity getProperty(int id) throws DaoException
id - The numeric number appearing after the "P" in the Wikimedia Foundation ids.DaoExceptionWikidataEntity getItem(int id) throws DaoException
id - The numeric number appearing after the "Q" in the Wikimedia Foundation ids.DaoExceptionMap<Integer,WikidataEntity> getProperties() throws DaoException
DaoExceptionList<WikidataStatement> getStatements(LocalPage page) throws DaoException
page - DaoExceptionUniversalPage getUniversalPage(int itemId) throws DaoException
itemId - DaoExceptionInteger getItemId(LocalPage page) throws DaoException
page - DaoExceptionInteger getItemId(LocalId localId) throws DaoException
DaoExceptionvoid save(WikidataEntity entity) throws DaoException
entity - DaoExceptionMap<String,List<LocalWikidataStatement>> getLocalStatements(LocalPage page) throws DaoException
page - DaoExceptionMap<String,List<LocalWikidataStatement>> getLocalStatements(Language lang, WikidataEntity.Type type, int id) throws DaoException
lang - Language for local statementstype - Type of entity (item or property)id - numeric id (i.e. suffix after "Q" or "P")DaoExceptionLocalWikidataStatement getLocalStatement(Language language, WikidataStatement statement) throws DaoException
language - statement - DaoExceptionIterable<WikidataStatement> getByValue(WikidataEntity property, WikidataValue value) throws DaoException
DaoExceptionIterable<WikidataStatement> getByValue(String propertyName, WikidataValue value) throws DaoException
DaoExceptionSet<Integer> conceptsWithValue(String propertyName, WikidataValue value) throws DaoException
DaoExceptionSet<LocalId> pagesWithValue(String propertyName, WikidataValue value, Language language) throws DaoException
DaoExceptionIterable<WikidataStatement> get(WikidataFilter filter) throws DaoException
filter - DaoExceptionCopyright © 2014. All rights reserved.