|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.languagecomputer.api.BaseWebClient<DocumentWebService> com.languagecomputer.api.DocumentServiceWebClient
public class DocumentServiceWebClient
Web service client wrapper for the DocumentService
. Handles all the
web service interaction code. Combined with the DocumentService
class, this provides a java-to-java interaction that masks the web service
functionality.
For the methods process(URL)
, process(URI)
, and
process(File)
, the file must be accessible from the server. If this
is not possible, the method process(InputStream)
should be used to
send the content as part of the process message.
Constructor Summary | |
---|---|
DocumentServiceWebClient(ServiceConfig serviceConfig)
Creates a new DocumentServiceWebClient with the given
ServiceConfig . |
Method Summary | |
---|---|
String |
getName()
Returns the name of the service to use for URL lookup. |
protected Class<DocumentWebService> |
getWebServiceClass()
Returns the BaseWebService class this BaseWebClient
wraps. |
Document |
process(File file)
Processes the given File , placing the processed contents into
the returned Document . |
Document |
process(File file,
String fileType)
Processes the given File , placing the processed contents into
the returned Document . |
Document |
process(InputStream stream)
Processes the given InputStream , placing the processed
contents into the returned Document . |
Document |
process(InputStream stream,
String fileType)
Processes the given InputStream , placing the processed
contents into the returned Document . |
Document |
process(URI uri)
Processes the given URI , placing the processed contents into
the returned Document . |
Document |
process(URI uri,
String fileType)
Processes the given URI , placing the processed contents into
the returned Document . |
Document |
process(URL url)
Processes the given URL , placing the processed contents into
the returned Document . |
Document |
process(URL url,
String fileType)
Processes the given URL , placing the processed contents into
the returned Document . |
Methods inherited from class com.languagecomputer.api.BaseWebClient |
---|
disconnect, getSessionID, getWebService, registerSession, sessionRegistered, setSession, setSessionID, unregisterSession |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.languagecomputer.api.Service |
---|
setSession |
Constructor Detail |
---|
public DocumentServiceWebClient(ServiceConfig serviceConfig)
DocumentServiceWebClient
with the given
ServiceConfig
.
Method Detail |
---|
public String getName()
getName
in interface Service
getName
in class BaseWebClient<DocumentWebService>
protected Class<DocumentWebService> getWebServiceClass()
BaseWebService
class this BaseWebClient
wraps.
getWebServiceClass
in class BaseWebClient<DocumentWebService>
public Document process(URL url) throws IOException
URL
, placing the processed contents into
the returned Document
. Automatically detects the file type.
process
in interface DocumentService
url
- java.net.URL
of the file to process.
Document
corresponding to the given
url.
IOException
- If there was a problem reading the URL
.public Document process(URL url, String fileType) throws IOException
URL
, placing the processed contents into
the returned Document
. Forces the document processor to use the
given fileType.
process
in interface DocumentService
url
- java.net.URL
of the file to process.fileType
- (Advanced Users) Optional file type to force.
Document
corresponding to the given
url.
IOException
- If there was a problem reading the URL
.public Document process(URI uri) throws IOException
URI
, placing the processed contents into
the returned Document
. Automatically detects the file type.
process
in interface DocumentService
uri
- java.net.URI
of the file to process.
Document
corresponding to the given
uri.
IOException
- If there was a problem reading the URI
.public Document process(URI uri, String fileType) throws IOException
URI
, placing the processed contents into
the returned Document
. Forces the document processor to use the
given fileType.
process
in interface DocumentService
uri
- java.net.URI
of the file to process.fileType
- (Advanced Users) Optional file type to force.
Document
corresponding to the given
uri.
IOException
- If there was a problem reading the URI
.public Document process(File file) throws IOException
File
, placing the processed contents into
the returned Document
. Automatically detects the file type.
process
in interface DocumentService
file
- java.io.File
of the file to process.
Document
corresponding to the given
file.
IOException
- If there was a problem reading the File
.public Document process(File file, String fileType) throws IOException
File
, placing the processed contents into
the returned Document
. Forces the document processor to use the
given fileType.
process
in interface DocumentService
file
- java.io.File
of the file to process.fileType
- (Advanced Users) Optional file type to force.
Document
corresponding to the given
file.
IOException
- If there was a problem reading the File
.public Document process(InputStream stream) throws IOException
InputStream
, placing the processed
contents into the returned Document
. Automatically detects the
file type.
process
in interface DocumentService
stream
- java.io.InputStream
of the file to process.
Document
corresponding to the given
stream.
IOException
- If there was a problem reading the
InputStream
.public Document process(InputStream stream, String fileType) throws IOException
InputStream
, placing the processed
contents into the returned Document
. Forces the document processor
to use the given fileType.
process
in interface DocumentService
stream
- java.io.InputStream
of the file to process.fileType
- (Advanced Users) Optional file type to force.
Document
corresponding to the given
stream.
IOException
- If there was a problem reading the
InputStream
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |