From 088419520adde93d66e6c32d44e63ec5ef353183 Mon Sep 17 00:00:00 2001 From: Nick Molcanov <32801560+nck-mlcnv@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:05:25 +0100 Subject: [PATCH] Add more javadocs --- .../java/org/aksw/iguana/cc/query/QueryData.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/aksw/iguana/cc/query/QueryData.java b/src/main/java/org/aksw/iguana/cc/query/QueryData.java index 617e8981b..70ecce540 100644 --- a/src/main/java/org/aksw/iguana/cc/query/QueryData.java +++ b/src/main/java/org/aksw/iguana/cc/query/QueryData.java @@ -22,6 +22,14 @@ public enum QueryType { TEMPLATE_INSTANCE } + /** + * Generates a list of QueryData objects for a collection of queries. + * The method uses the Jena library to check if the query is an update query. + * It only checks if the query is an update query or not and sets their index in the order they were given. + * + * @param queries collection of input streams of queries + * @return list of QueryData objects + */ public static List generate(Collection queries) { final var queryData = new ArrayList(); int i = 0; @@ -40,7 +48,13 @@ public static List generate(Collection queries) { return queryData; } - public static boolean checkUpdate(InputStream query) { + /** + * Checks if the given query is an update query. + * The method uses the Jena library to check if the query is an update query. + * + * @param query input stream of the query + * @return true if the query is an update query, false otherwise + */ public static boolean checkIfUpdate(InputStream query) { try { UpdateFactory.read(query); // Throws an exception if the query is not an update query