org.deepamehta.plugins.wikidata.service
Interface WikidataSearchService

Show UML class diagram
All Superinterfaces:
PluginService
All Known Implementing Classes:
WikidataSearchPlugin

public interface WikidataSearchService
extends PluginService

A very basic plugin to search and explore wikidata. Creates \"Wikidata Search Result Entity\"-Topics. Corresponding to the type of wikidata-entity found via a search these topics have either the child-type ("org.deepamehta.wikidata.search_entity_type") set to the value "property or the value "item".

Version:
0.0.3-SNAPSHOT
Author:
Malte Reißig ()

Method Summary
 Topic createWikidataAssociationType(long entityTopicId, ClientState clientState)
          This method creates a DeepaMehta Association Type given a \"Wikidata Search Entity\" (of type=property).
 Topic getOrCreateWikidataEntity(String wikidataEntityId, String iso_language_code, ClientState clientState)
          This method gets (or creates) a \"Wikidata Search Entity\" (in DeepaMehta 4) by its ID (wikidata).
 List<RelatedAssociation> getTopicRelatedAssociations(long topicId)
          This method retrieves all associated associations of type "Wikidata Claim" for any given \"Wikidata Search Entity\" (of type=property).
 Topic loadClaimsAndRelatedWikidataItems(long entityTopicId, String iso_language_code, ClientState clientState)
          This method loads all claims (with language specific values) for a wikidata-entity into DeepaMehta 4.
 Topic searchWikidataEntity(String query, String iso_language_code, ClientState clientstate, String entityType)
          This method searches all wikidata entities by text and the given language code.
 

Method Detail

searchWikidataEntity

Topic searchWikidataEntity(String query,
                           String iso_language_code,
                           ClientState clientstate,
                           String entityType)
This method searches all wikidata entities by text and the given language code.

Parameters:
{entity} - entity-type (can be of entity-type "item" or "property")
{query} - name of wikidata property in search
{language_code} - ISO 639-1 language code (must exist in DM installation)

getOrCreateWikidataEntity

Topic getOrCreateWikidataEntity(String wikidataEntityId,
                                String iso_language_code,
                                ClientState clientState)
This method gets (or creates) a \"Wikidata Search Entity\" (in DeepaMehta 4) by its ID (wikidata). Updates values of the given topic if this wikidata-entity was already imported before.

Parameters:
{entityId} - wikidataId

loadClaimsAndRelatedWikidataItems

Topic loadClaimsAndRelatedWikidataItems(long entityTopicId,
                                        String iso_language_code,
                                        ClientState clientState)
This method loads all claims (with language specific values) for a wikidata-entity into DeepaMehta 4.

Parameters:
{id} - \"Wikidata Search Entity\"-Topic ID

createWikidataAssociationType

Topic createWikidataAssociationType(long entityTopicId,
                                    ClientState clientState)
This method creates a DeepaMehta Association Type given a \"Wikidata Search Entity\" (of type=property).

Parameters:
{id} - \"Wikidata Search Entity\"-Topic ID (entity-type must be of value "property")

getTopicRelatedAssociations

List<RelatedAssociation> getTopicRelatedAssociations(long topicId)
This method retrieves all associated associations of type "Wikidata Claim" for any given \"Wikidata Search Entity\" (of type=property).

Parameters:
{id} - \"Wikidata Search Entity\"-Topic ID (entity-type must be of value "property")


Copyright © 2014. All Rights Reserved.