Skip to content

Commit

Permalink
Add more javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
nck-mlcnv committed Nov 6, 2024
1 parent c93768d commit 0884195
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/main/java/org/aksw/iguana/cc/query/QueryData.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<QueryData> generate(Collection<InputStream> queries) {
final var queryData = new ArrayList<QueryData>();
int i = 0;
Expand All @@ -40,7 +48,13 @@ public static List<QueryData> generate(Collection<InputStream> 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
Expand Down

0 comments on commit 0884195

Please sign in to comment.