Package xyz.euclia.jaqpotj
Class JaqpotImplementation
java.lang.Object
xyz.euclia.jaqpotj.JaqpotImplementation
- All Implemented Interfaces:
Closeable,AutoCloseable,Jaqpot
public class JaqpotImplementation extends Object implements Jaqpot
-
Constructor Summary
Constructors Constructor Description JaqpotImplementation(org.asynchttpclient.AsyncHttpClient client, Serializer serializer, ModelConsumer modelConsumer, FeatureConsumer featureConsumer, DatasetConsumer datasetConsumer, TaskConsumer taskConsumer) -
Method Summary
Modifier and Type Method Description voidclose()Future<Dataset>GetDatasetById(String datasetId, String token)Get a datasetFuture<Feature>GetFeatureById(String featId, String token)Get a feature by it's idFuture<Model>GetModelById(String id, String token)Get a model by it's idpFuture<Models>GetOrgsModels(String orgId, Number start, Number max, String token)Get an organizations modelsFuture<Models>GetOrgsTagModels(String orgId, String tag, Number start, Number max, String token)Get an organizations models by tagFuture<Models>GetUsersModels(Number start, Number max, String token)Get the users modelsFuture<Prediction>Predict(String modelId, List<Map<String,Object>> data, String token)Get a dataset
-
Constructor Details
-
JaqpotImplementation
public JaqpotImplementation(org.asynchttpclient.AsyncHttpClient client, Serializer serializer, ModelConsumer modelConsumer, FeatureConsumer featureConsumer, DatasetConsumer datasetConsumer, TaskConsumer taskConsumer)
-
-
Method Details
-
GetModelById
Description copied from interface:JaqpotGet a model by it's idp- Specified by:
GetModelByIdin interfaceJaqpot- Parameters:
id- is the models id- Returns:
- Future Response get the response when finished. If 200 status you get the model. Other you get an ErrorReport.
- Throws:
JaqpotException
-
GetUsersModels
public Future<Models> GetUsersModels(Number start, Number max, String token) throws JaqpotExceptionDescription copied from interface:JaqpotGet the users models- Specified by:
GetUsersModelsin interfaceJaqpot- Returns:
- Future Response get the response when finished. If 200 status you get the model. Other you get an ErrorReport.
- Throws:
JaqpotException
-
GetOrgsModels
public Future<Models> GetOrgsModels(String orgId, Number start, Number max, String token) throws JaqpotExceptionDescription copied from interface:JaqpotGet an organizations models- Specified by:
GetOrgsModelsin interfaceJaqpot- Parameters:
orgId- is the organizations id- Returns:
- Future Response get the response when finished. If 200 status you get the model. Other you get an ErrorReport.
- Throws:
JaqpotException
-
GetOrgsTagModels
public Future<Models> GetOrgsTagModels(String orgId, String tag, Number start, Number max, String token) throws JaqpotExceptionDescription copied from interface:JaqpotGet an organizations models by tag- Specified by:
GetOrgsTagModelsin interfaceJaqpot- Parameters:
orgId- is the organizations idtag- is a tag- Returns:
- Future Response get the response when finished. If 200 status you get the model. Other you get an ErrorReport.
- Throws:
JaqpotException
-
GetFeatureById
Description copied from interface:JaqpotGet a feature by it's id- Specified by:
GetFeatureByIdin interfaceJaqpot- Parameters:
featId- is the organizations i- Returns:
- Future Response get the response when finished. If 200 status you get the model. Other you get an ErrorReport.
- Throws:
JaqpotException
-
GetDatasetById
Description copied from interface:JaqpotGet a dataset- Specified by:
GetDatasetByIdin interfaceJaqpot- Parameters:
datasetId- is the dataset's id- Returns:
- Future Response get the response when finished. If 200 status you get the model. Other you get an ErrorReport.
- Throws:
JaqpotException
-
Predict
public Future<Prediction> Predict(String modelId, List<Map<String,Object>> data, String token) throws JaqpotException, ExecutionException, InterruptedExceptionDescription copied from interface:JaqpotGet a dataset- Specified by:
Predictin interfaceJaqpot- Parameters:
modelId- is the models iddata- is a Map with keys the feature names and Object the data values- Returns:
- Future Response get the response when finished. If 200 status you get the model. Other you get an ErrorReport.
- Throws:
JaqpotExceptionExecutionExceptionInterruptedException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-