Package com.semedy.reasoner.app
Class APIMethods
java.lang.Object
com.semedy.reasoner.app.APIMethods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
createJson
(String jsonS) create a new json objectboolean
deleteJson
(String id) delete json with idfind jsons with a OO-logic query
Variable ?org.json.JSONObject
get json with idvoid
load 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.void
setBulk
(int count) set ulk modevoid
boolean
updateJson
(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:
SemReasonerException
IOException
EDBException
InterruptedException
org.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:
IOException
InterruptedException
SemReasonerException
-
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:
IOException
ReasoningException
InterruptedException
SemReasonerException
-
updateJson
public boolean updateJson(String jsonS) throws InterruptedException, IOException, SemReasonerException update an existing json with same identifier @id- Parameters:
jsonS
-_core
-- Returns:
- Throws:
InterruptedException
IOException
SemReasonerException
-
deleteJson
delete json with id- Parameters:
id
-core
-- Returns:
- Throws:
InterruptedException
IOException
SemReasonerException
-
getJson
public org.json.JSONObject getJson(String id) throws InterruptedException, IOException, SemReasonerException get json with id- Parameters:
id
-core
-- Returns:
- Throws:
InterruptedException
IOException
SemReasonerException
-
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:
IOException
SymboltableException
SimpleParseException
SemReasonerException
InterruptedException
-