org.apache.nutch.service.resources

## Class ReaderResouce

- java.lang.Object
- - org.apache.nutch.service.resources.ReaderResouce

-     @Path(value="/reader")
      public class ReaderResouce
      extends java.lang.Object

  The Reader endpoint enables a user to read sequence files, nodes and links from the Nutch webgraph.
  Author:
    Sujen Shah

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReaderResouce()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `linkRead()` Get Link Reader response schema
    `javax.ws.rs.core.Response` | `linkRead(ReaderConfig readerConf, int nrows, int start, int end, boolean count)` Read link object
    `javax.ws.rs.core.Response` | `nodeRead()` Get schema of the Node object
    `javax.ws.rs.core.Response` | `nodeRead(ReaderConfig readerConf, int nrows, int start, int end, boolean count)` Read Node object as stored in the Nutch Webgraph
    `javax.ws.rs.core.Response` | `seqRead(ReaderConfig readerConf, int nrows, int start, int end, boolean count)` Read a sequence file

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ReaderResouce

          public ReaderResouce()

  - ### Method Detail

    - #### seqRead

          @Path(value="/sequence/read")
           @POST
           @Consumes(value="application/json")
           @Produces(value="application/json")
          public javax.ws.rs.core.Response seqRead(ReaderConfig readerConf,
                                                                                                                                                                  @DefaultValue(value="-1") @QueryParam(value="nrows")
                                                                                                                                                                  int nrows,
                                                                                                                                                                  @DefaultValue(value="-1") @QueryParam(value="start")
                                                                                                                                                                  int start,
                                                                                                                                                                  @QueryParam(value="end")
                                                                                                                                                                  int end,
                                                                                                                                                                  @QueryParam(value="count")
                                                                                                                                                                  boolean count)

      Read a sequence file
      Parameters:
        `readerConf` -
        `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(value="/link")
           @GET
           @Produces(value="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(value="/link/read")
           @POST
           @Consumes(value="application/json")
           @Produces(value="application/json")
          public javax.ws.rs.core.Response linkRead(ReaderConfig readerConf,
                                                                                                                                                               @DefaultValue(value="-1") @QueryParam(value="nrows")
                                                                                                                                                               int nrows,
                                                                                                                                                               @DefaultValue(value="-1") @QueryParam(value="start")
                                                                                                                                                               int start,
                                                                                                                                                               @QueryParam(value="end")
                                                                                                                                                               int end,
                                                                                                                                                               @QueryParam(value="count")
                                                                                                                                                               boolean count)

      Read link object
      Parameters:
        `readerConf` -
        `nrows` -
        `start` -
        `end` -
        `count` -
      Returns:

    - #### nodeRead

          @Path(value="/node")
           @GET
           @Produces(value="application/json")
          public javax.ws.rs.core.Response nodeRead()

      Get schema of the Node object
      Returns:

    - #### nodeRead

          @Path(value="/node/read")
           @POST
           @Consumes(value="application/json")
           @Produces(value="application/json")
          public javax.ws.rs.core.Response nodeRead(ReaderConfig readerConf,
                                                                                                                                                               @DefaultValue(value="-1") @QueryParam(value="nrows")
                                                                                                                                                               int nrows,
                                                                                                                                                               @DefaultValue(value="-1") @QueryParam(value="start")
                                                                                                                                                               int start,
                                                                                                                                                               @QueryParam(value="end")
                                                                                                                                                               int end,
                                                                                                                                                               @QueryParam(value="count")
                                                                                                                                                               boolean count)

      Read Node object as stored in the Nutch Webgraph
      Parameters:
        `readerConf` -
        `nrows` -
        `start` -
        `end` -
        `count` -
      Returns:

Copyright © 2019 The Apache Software Foundation