Class XlayerClient

java.lang.Object
org.restlet.Restlet
org.restlet.Application
org.opensextant.xlayer.XlayerClient
All Implemented Interfaces:
org.restlet.Uniform

public class XlayerClient extends org.restlet.Application
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    protected jodd.json.JsonParser
     
    protected org.slf4j.Logger
     
    static final String
    1 minutes
    protected URL
     
    protected final org.restlet.Context
     
    static final String
    1 minute
  • Constructor Summary

    Constructors
    Constructor
    Description
    XlayerClient(URL serviceAddr)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.opensextant.extraction.TextMatch>
    process(String docid, String text, boolean viewFilteredOut)
     

    Methods inherited from class org.restlet.Application

    createInboundRoot, createOutboundRoot, getConnectorService, getConnegService, getConverterService, getCurrent, getDecoderService, getEncoderService, getInboundRoot, getMetadataService, getOutboundRoot, getRangeService, getRole, getRoles, getServices, getStatusService, getTaskService, getTunnelService, handle, isDebugging, setConnectorService, setConnegService, setContext, setConverterService, setCurrent, setDebugging, setDecoderService, setEncoderService, setInboundRoot, setInboundRoot, setMetadataService, setOutboundRoot, setOutboundRoot, setRangeService, setRoles, setStatusService, setTaskService, setTunnelService, start, stop

    Methods inherited from class org.restlet.Restlet

    createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setDescription, setFinderClass, setName, setOwner

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serviceAddress

      protected URL serviceAddress
    • log

      protected org.slf4j.Logger log
    • serviceContext

      protected final org.restlet.Context serviceContext
    • SO_TIMEOUT_STRING

      public static final String SO_TIMEOUT_STRING
      1 minute
    • READ_TIMEOUT_STRING

      public static final String READ_TIMEOUT_STRING
      1 minutes
    • CONN_TIMEOUT_STRING

      public static final String CONN_TIMEOUT_STRING
    • jsonp

      protected jodd.json.JsonParser jsonp
  • Constructor Details

    • XlayerClient

      public XlayerClient(URL serviceAddr) throws org.opensextant.ConfigException
      Throws:
      org.opensextant.ConfigException
  • Method Details

    • process

      public List<org.opensextant.extraction.TextMatch> process(String docid, String text, boolean viewFilteredOut) throws IOException
      Parameters:
      docid - id
      text - input text
      viewFilteredOut - true if user wants to print filtered out items for diagnostics.
      Returns:
      list of matches
      Throws:
      IOException - on error