/** * Returns a newly-created {@link Query} that retrieves the textual content as it is. * * @param path the path of a file being queried on */ static Query<String> ofText(String path) { return new IdentityQuery<>(path); }
/** * Returns a newly-created {@link Query} that retrieves the textual content as it is. * * @param path the path of a file being queried on */ static Query<String> ofText(String path) { return new IdentityQuery<>(path); }
/** * Returns a newly-created {@link Query} that retrieves the textual content as it is. * * @param path the path of a file being queried on */ static Query<String> ofText(String path) { return new IdentityQuery<>(path); }
/** * Returns a newly-created {@link Query} that retrieves the JSON content as it is. * * @param path the path of a file being queried on */ static Query<JsonNode> ofJson(String path) { return new IdentityQuery<>(path); }
/** * Returns a newly-created {@link Query} that retrieves the JSON content as it is. * * @param path the path of a file being queried on */ static Query<JsonNode> ofJson(String path) { return new IdentityQuery<>(path); }
/** * Returns a newly-created {@link Query} that retrieves the JSON content as it is. * * @param path the path of a file being queried on */ static Query<JsonNode> ofJson(String path) { return new IdentityQuery<>(path); }
/** * Returns a newly-created {@link Query} that retrieves the content as it is. * * @param path the path of a file being queried on * * @deprecated Use {@link #ofText(String)} or {@link #ofJson(String)}. */ @Deprecated static Query<Object> identity(String path) { return new IdentityQuery<>(path); }
/** * Returns a newly-created {@link Query} that retrieves the content as it is. * * @param path the path of a file being queried on * * @deprecated Use {@link #ofText(String)} or {@link #ofJson(String)}. */ @Deprecated static Query<Object> identity(String path) { return new IdentityQuery<>(path); }
/** * Returns a newly-created {@link Query} that retrieves the content as it is. * * @param path the path of a file being queried on * * @deprecated Use {@link #ofText(String)} or {@link #ofJson(String)}. */ @Deprecated static Query<Object> identity(String path) { return new IdentityQuery<>(path); }
/** * Returns a newly-created {@link Query} that applies a series of expressions to the content. * * @param type the type of the {@link Query} * @param path the path of a file being queried on * @param expressions the expressions to apply */ static Query<?> of(QueryType type, String path, @Nullable String... expressions) { requireNonNull(type, "type"); switch (type) { case IDENTITY: return new IdentityQuery<>(path); case JSON_PATH: requireNonNull(expressions, "expressions"); return ofJsonPath(path, expressions); default: throw new IllegalArgumentException("Illegal query type: " + type.name()); } }
/** * Returns a newly-created {@link Query} that applies a series of expressions to the content. * * @param type the type of the {@link Query} * @param path the path of a file being queried on * @param expressions the expressions to apply */ static Query<?> of(QueryType type, String path, @Nullable String... expressions) { requireNonNull(type, "type"); switch (type) { case IDENTITY: return new IdentityQuery<>(path); case JSON_PATH: requireNonNull(expressions, "expressions"); return ofJsonPath(path, expressions); default: throw new IllegalArgumentException("Illegal query type: " + type.name()); } }
/** * Returns a newly-created {@link Query} that applies a series of expressions to the content. * * @param type the type of the {@link Query} * @param path the path of a file being queried on * @param expressions the expressions to apply */ static Query<?> of(QueryType type, String path, @Nullable String... expressions) { requireNonNull(type, "type"); switch (type) { case IDENTITY: return new IdentityQuery<>(path); case JSON_PATH: requireNonNull(expressions, "expressions"); return ofJsonPath(path, expressions); default: throw new IllegalArgumentException("Illegal query type: " + type.name()); } }