Skip to content

Commit

Permalink
Added a bit more Wikidata manager JavaDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Sep 21, 2024
1 parent dd99554 commit 07120a0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public WikidataManager(String workspaceRoot) {
* Return true if Wikidata contains a molecule with the given InChI.
*
* @param inchi InChI of the molecule to check if it already exists in Wikidata
* @return true, if there is a Wikidata item for the compound with the given InChI
*/
public boolean hasMolecule(InChI inchi) throws BioclipseException {
if (inchi == null) throw new BioclipseException("You must give an InChI.");
Expand All @@ -69,6 +70,7 @@ public boolean hasMolecule(InChI inchi) throws BioclipseException {
* Returns the Wikidata entity ID for the molecule with the given InChI.
*
* @param inchi InChI of the molecule to return Wikidata ID for
* @return the Wikidata QID
*/
public String getEntityID(InChI inchi) throws BioclipseException {
if (inchi == null) throw new BioclipseException("You must give an InChI.");
Expand All @@ -92,6 +94,7 @@ public String getEntityID(InChI inchi) throws BioclipseException {
* Returns the Wikidata entity IDs for the molecules with the given InChIs.
*
* @param inchis List of InChIs of the molecules to check if they already exists in Wikidata
* @return A list of mappings with the InChIKeys and the matching Wikidata item QIDs
*/
public Map<String,String> getEntityIDs(List<InChI> inchis) throws BioclipseException {
if (inchis == null) throw new BioclipseException("You must give a list of InChIs.");
Expand Down Expand Up @@ -122,6 +125,7 @@ public Map<String,String> getEntityIDs(List<InChI> inchis) throws BioclipseExcep
* when it does not exist.
*
* @param inchi InChI of the molecule to check if it already exists in Wikidata
* @return the IMolecule for the Wikidata item matching the given InChI
*/
public IMolecule getMolecule(InChI inchi) throws BioclipseException {
if (inchi == null) throw new BioclipseException("You must give an InChI.");
Expand Down Expand Up @@ -161,6 +165,7 @@ public String getEntityID(String doi) throws BioclipseException {
* Returns the Wikidata entity IDs for the works with the given DOIs.
*
* @param dois List of DOIs of the works to check if they already exists in Wikidata
* @return A list with mappings of DOIs to the matching Wikidate items
*/
public Map<String,String> getEntityIDsForDOIs(List<String> dois) throws BioclipseException {
if (dois == null) throw new BioclipseException("You must give a list of DOIs.");
Expand Down

0 comments on commit 07120a0

Please sign in to comment.