Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple example that shows how to access the DB
- Loading branch information
1 parent
dd50b09
commit 54bfb03
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
wdtk-examples/src/main/java/org/wikidata/wdtk/examples/DbQueryExample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.wikidata.wdtk.examples; | ||
|
||
import org.wikidata.wdtk.datamodel.helpers.Datamodel; | ||
import org.wikidata.wdtk.storage.wdtkbindings.WdtkDatabaseManager; | ||
|
||
public class DbQueryExample { | ||
|
||
final static String dbName = "wdtkDatabaseFull-20141013"; | ||
final static WdtkDatabaseManager wdtkDatabaseManager = new WdtkDatabaseManager( | ||
dbName); | ||
|
||
public static void main(String[] args) { | ||
System.out.println(wdtkDatabaseManager.getEntityDocument(Datamodel | ||
.makeWikidataItemIdValue("Q42"))); | ||
} | ||
|
||
} |