Class ReaderResouce


  • @Path("/reader")
    public class ReaderResouce
    extends Object
    The Reader endpoint enables a user to read sequence files, nodes and links from the Nutch webgraph.
    Author:
    Sujen Shah
    • Constructor Detail

      • ReaderResouce

        public ReaderResouce()
    • Method Detail

      • seqRead

        @Path("/sequence/read")
        @POST
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response seqRead​(ReaderConfig readerConf,
                                                 @DefaultValue("-1") @QueryParam("nrows")
                                                 int nrows,
                                                 @DefaultValue("-1") @QueryParam("start")
                                                 int start,
                                                 @QueryParam("end")
                                                 int end,
                                                 @QueryParam("count")
                                                 boolean count)
        Read a sequence file
        Parameters:
        readerConf - A initialized ReaderConfig
        nrows - Number of rows to read. If not specified all rows will be read
        start - Specify a starting line number to read the file from
        end - The line number to read the file till
        count - Boolean value. If true, this endpoint will return the number of lines in the line
        Returns:
        Appropriate HTTP response based on the query
      • linkRead

        @Path("/link")
        @GET
        @Produces("application/json")
        public javax.ws.rs.core.Response linkRead()
        Get Link Reader response schema
        Returns:
        JSON object specifying the schema of the responses returned by the Link Reader
      • linkRead

        @Path("/link/read")
        @POST
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response linkRead​(ReaderConfig readerConf,
                                                  @DefaultValue("-1") @QueryParam("nrows")
                                                  int nrows,
                                                  @DefaultValue("-1") @QueryParam("start")
                                                  int start,
                                                  @QueryParam("end")
                                                  int end,
                                                  @QueryParam("count")
                                                  boolean count)
        Read link object
        Parameters:
        readerConf - A initialized ReaderConfig
        nrows - Number of rows to read. If not specified all rows will be read
        start - Specify a starting line number to read the file from
        end - The line number to read the file till
        count - Boolean value. If true, this endpoint will return the number of lines in the line
        Returns:
        Appropriate HTTP response based on the query
      • nodeRead

        @Path("/node")
        @GET
        @Produces("application/json")
        public javax.ws.rs.core.Response nodeRead()
        Get schema of the Node object
        Returns:
        JSON object specifying the schema of the responses returned by the Node Reader
      • nodeRead

        @Path("/node/read")
        @POST
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response nodeRead​(ReaderConfig readerConf,
                                                  @DefaultValue("-1") @QueryParam("nrows")
                                                  int nrows,
                                                  @DefaultValue("-1") @QueryParam("start")
                                                  int start,
                                                  @QueryParam("end")
                                                  int end,
                                                  @QueryParam("count")
                                                  boolean count)
        Read Node object as stored in the Nutch Webgraph
        Parameters:
        readerConf - A initialized ReaderConfig
        nrows - Number of rows to read. If not specified all rows will be read
        start - Specify a starting line number to read the file from
        end - The line number to read the file till
        count - Boolean value. If true, this endpoint will return the number of lines in the line
        Returns:
        Appropriate HTTP response based on the query