public class RedLinkAnalysisImpl extends RedLinkAbstractImpl implements RedLink.Analysis
Analysis Service Client implementation. The implementation follows a basic workflow: using the user
Credentials and an AnalysisRequest object, build the endpoint URI, add the parameters of the service and
inject the content to be analyzed and, finally, make the request to RedLink platform. The response of the service is parsed
using the proper parser for the AnalysisRequest.OutputFormat selected by the userRedLink.Analysis, RedLink.DataCONFIDENCE, DEREF_FIELDS, ENHANCE, LDPATH, PATH, SUMMARY, THUMBNAIL| Constructor and Description |
|---|
RedLinkAnalysisImpl(Credentials credentials) |
| Modifier and Type | Method and Description |
|---|---|
Enhancements |
enhance(AnalysisRequest request)
Performs an analysis of the content included in the request, getting a
Enhancements object as result
The analysis result will depend on the configured in the configured application within the used Credentials |
<T> T |
enhance(AnalysisRequest request,
Class<T> responseType)
Performs an analysis of the content included in the request getting as response an instance of the
Class
passed by parameter. |
public RedLinkAnalysisImpl(Credentials credentials)
public Enhancements enhance(AnalysisRequest request)
RedLink.AnalysisEnhancements object as result
The analysis result will depend on the configured in the configured application within the used Credentialsenhance in interface RedLink.Analysisrequest - AnalysisRequest containing the request parameters and the content to be enhancedpublic <T> T enhance(AnalysisRequest request, Class<T> responseType)
RedLink.AnalysisClass
passed by parameter. Current implementation supports String
InputStream - make sure to close the
stream after reading the contents from the response
Enhancements
Enhancements is passed, the request will assume RDF+XML as response format, and will parse the response
to create the Enhancements object. If String is passed as response type, the method will return
the RAW response in the format specified at the AnalysisRequest request parameterenhance in interface RedLink.Analysisrequest - AnalysisRequest containing the request parameters and the content to be enhancedresponseType - Class of the response. Only Enhancements and String are supportedCopyright © 2018 Redlink GmbH. All rights reserved.