Interface Query<T>

Type Parameters:
T - the content type of a file being queried
All Superinterfaces:
Function<T,T>

public interface Query<T> extends Function<T,T>
A query on a file.
  • Method Details

    • identity

      @Deprecated static Query<Object> identity(String path)
      Deprecated.
      Returns a newly-created Query that retrieves the content as it is.
      Parameters:
      path - the path of a file being queried on
    • ofText

      static Query<String> ofText(String path)
      Returns a newly-created Query that retrieves the textual content as it is.
      Parameters:
      path - the path of a file being queried on
    • ofJson

      static Query<JsonNode> ofJson(String path)
      Returns a newly-created Query that retrieves the JSON content as it is.
      Parameters:
      path - the path of a file being queried on
    • ofJsonPath

      static Query<JsonNode> ofJsonPath(String path, String... jsonPaths)
      Returns a newly-created Query that applies a series of JSON path expressions to the content.
      Parameters:
      path - the path of a file being queried on
      jsonPaths - the JSON path expressions to apply
    • ofJsonPath

      static Query<JsonNode> ofJsonPath(String path, Iterable<String> jsonPaths)
      Returns a newly-created Query that applies a series of JSON path expressions to the content.
      Parameters:
      path - the path of a file being queried on
      jsonPaths - the JSON path expressions to apply
    • of

      static Query<?> of(QueryType type, String path, @Nullable String... expressions)
      Returns a newly-created Query that applies a series of expressions to the content.
      Parameters:
      type - the type of the Query
      path - the path of a file being queried on
      expressions - the expressions to apply
    • path

      String path()
      Returns the path of the file being queried on.
    • type

      QueryType type()
      Returns the type of this Query.
    • expressions

      List<String> expressions()
      Returns the list of the query expressions of this Query.