Package com.semedy.reasoner.app
Class APIMethods
java.lang.Object
com.semedy.reasoner.app.APIMethods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleancreateJson(String jsonS) create a new json objectbooleandeleteJson(String id) delete json with idfind jsons with a OO-logic query
Variable ?org.json.JSONObjectget json with idvoidload file from path if path is an url the file is stored in the archive directory and then loadedqueryJsons(String ooquery) query for jsons
In contrast to find jsons, query jsons combines jsons from triples.voidsetBulk(int count) set ulk modevoidbooleanupdateJson(String jsonS) update an existing json with same identifier @id
-
Constructor Details
-
APIMethods
public APIMethods()
-
-
Method Details
-
setCore
- Throws:
IOException
-
close
- Throws:
IOException
-
setBulk
set ulk mode- Parameters:
b-- Throws:
Exception
-
createJson
public boolean createJson(String jsonS) throws SemReasonerException, IOException, EDBException, org.json.JSONException, InterruptedException create a new json object- Parameters:
jsonS-core-- Returns:
- Throws:
SemReasonerExceptionIOExceptionEDBExceptionInterruptedExceptionorg.json.JSONException
-
findJsons
public String findJsons(String ooquery) throws IOException, InterruptedException, SemReasonerException find jsons with a OO-logic query
Variable ?Id must be used as identifier for the json- Parameters:
ooquery-core-- Returns:
- Throws:
IOExceptionInterruptedExceptionSemReasonerException
-
queryJsons
public String queryJsons(String ooquery) throws IOException, ReasoningException, InterruptedException, SemReasonerException query for jsons
In contrast to find jsons, query jsons combines jsons from triples.
By that way rules can create new jsons, or properties of jsons- Parameters:
ooquery-_core-- Returns:
- Throws:
IOExceptionReasoningExceptionInterruptedExceptionSemReasonerException
-
updateJson
public boolean updateJson(String jsonS) throws InterruptedException, IOException, SemReasonerException update an existing json with same identifier @id- Parameters:
jsonS-_core-- Returns:
- Throws:
InterruptedExceptionIOExceptionSemReasonerException
-
deleteJson
delete json with id- Parameters:
id-core-- Returns:
- Throws:
InterruptedExceptionIOExceptionSemReasonerException
-
getJson
public org.json.JSONObject getJson(String id) throws InterruptedException, IOException, SemReasonerException get json with id- Parameters:
id-core-- Returns:
- Throws:
InterruptedExceptionIOExceptionSemReasonerException
-
loadJsons
public void loadJsons(String path) throws IOException, SymboltableException, SimpleParseException, SemReasonerException, InterruptedException load file from path if path is an url the file is stored in the archive directory and then loaded- Parameters:
path-core-- Throws:
IOExceptionSymboltableExceptionSimpleParseExceptionSemReasonerExceptionInterruptedException
-