@NotNull @Override public DeleteInputsBatchRequest deleteInputsBatch() { return new DeleteInputsBatchRequest(this); }
@NotNull @Override public DeleteAllInputsRequest deleteAllInputs() { return new DeleteAllInputsRequest(this); }
@NotNull @Override protected String subUrl(final int page) { return buildURL("/v2/searches", page); }
@NotNull @Override public PatchInputRequest removeConceptsForInput(@NotNull String inputID) { return new PatchInputRequest(this, inputID, "remove"); }
/** * A search clause that will match inputs that the user explicitly tagged with the given concept * <p> * Both this method and the related {@link #matchConcept(Concept)} will match inputs that * the user explicitly tagged with these concepts when uploading the input, but * {@link #matchConcept(Concept)} will also match inputs that the API predicted to * contain these concepts. * * @param concept the concept to search by * @return a {@link SearchClause} to be given to a search endpoint */ @NotNull public static SearchClause matchUserTaggedConcept(@NotNull Concept concept) { return new SearchConcept("input", concept); }
@NotNull @Override public GetInputsStatusRequest getInputsStatus() { return new GetInputsStatusRequest(this); }
@NotNull @Override public GetInputsRequest getInputs() { return new GetInputsRequest(this); }
@NotNull @Override protected String subUrl(final int page) { return buildURL("/v2/inputs", page); }
@NotNull @Override public AddInputsRequest addInputs() { return new AddInputsRequest(this); }
/** * A search clause that will match inputs that had metadata that matches the given metadata * * @param metadata the metadata to search by * @return a {@link SearchClause} to be given to a search endpoint */ @NotNull public static SearchClause matchMetadata(@NotNull JsonObject metadata) { return new Metadata(metadata); }
/** * A search clause that will match inputs that had images with the given URL * <p> * This is NOT a visual similarity search. This is a simple string-search for the given image's URL. For visual * similarity, please use {@link #matchImageVisually(ClarifaiImage)}. * * @param image the URL of the image to search by * @return a {@link SearchClause} to be given to a search endpoint */ @NotNull public static SearchClause matchImageURL(@NotNull ClarifaiURLImage image) { return new InputImage(image); }
/** * A search clause that will match inputs that are visually similar to the image with the given URL. * <p> * This method is different from {@link #matchImageURL(ClarifaiURLImage)}, which also takes an image, * but matches inputs that share that image's URL. * * @param image the URL of the image to search by * @return a {@link SearchClause} to be given to a search endpoint */ @NotNull public static SearchClause matchImageVisually(@NotNull ClarifaiImage image) { return new OutputImage(image); }
@NotNull @Override public GetInputRequest getInputByID(@NotNull final String inputID) { return new GetInputRequest(this, inputID); }
@NotNull @Override public SearchInputsRequest searchInputs(@NotNull List<SearchClause> searchClauses) { return new SearchInputsRequest(this, searchClauses); }
@NotNull @Override public DeleteInputRequest deleteInput(@NotNull String inputID) { return new DeleteInputRequest(this, inputID); }
@NotNull @Override public PatchInputMetadataRequest addMetadataForInput(@NotNull String inputID, @NotNull JsonObject metadata) { return new PatchInputMetadataRequest(this, inputID, metadata); }
@NotNull public static SearchClause matchGeo(@NotNull final PointF topLeft, @NotNull final PointF bottomRight) { return new GeoRect(topLeft, bottomRight); }
@NotNull @Override public PatchInputRequest mergeConceptsForInput(@NotNull String inputID) { return new PatchInputRequest(this, inputID, "merge"); }
/** * A search clause that will match inputs both by concepts that the user tagged them with explicitly, and by concepts * that the API predicted upon the inputs. * <p> * This is similar to {@link #matchUserTaggedConcept(Concept)} in that both will match * images that the user explicitly tagged with these concepts when uploading the input, but this method will also * match inputs that the API predicted to contain these concepts. * * @param concept the concept to search by * @return a {@link SearchClause} to be given to a search endpoint */ @NotNull public static SearchClause matchConcept(@NotNull Concept concept) { return new SearchConcept("output", concept); }
@NotNull @Override public PatchInputRequest setConceptsForInput(@NotNull String inputID) { return new PatchInputRequest(this, inputID, "overwrite"); }