Class BasicBasServiceClient
- java.lang.Object
-
- ips.annot.autoannotator.impl.ws.bas.BasicBasServiceClient
-
- All Implemented Interfaces:
AutoAnnotator
,ServiceDescriptorProvider<AutoAnnotationServiceDescriptor>
,java.util.concurrent.Callable<AutoAnnotation>
- Direct Known Subclasses:
BasicMAUSWebServiceClient
,G2PServiceClient
,MAUSServiceClient
public abstract class BasicBasServiceClient extends java.lang.Object implements AutoAnnotator
- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
BasicBasServiceClient.ServerCaps
-
Nested classes/interfaces inherited from interface ips.annot.autoannotator.AutoAnnotator
AutoAnnotator.AnnotationRequest
-
-
Field Summary
Fields Modifier and Type Field Description protected AutoAnnotator.AnnotationRequest
annotationRequest
protected static java.lang.String
BASE_URL
protected static java.lang.String
CMDI_URL
protected static java.nio.charset.Charset
DEFAULT_CHARSET
protected static org.apache.http.entity.ContentType
DEFAULT_TEXT_CONTENT_TYPE
protected javax.xml.parsers.DocumentBuilderFactory
docBuilderFactory
static java.lang.String
RESPONSE_XML_DOWNLOAD_ELEM
static java.lang.String
RESPONSE_XML_OUTPUT_ELEM
static java.lang.String
RESPONSE_XML_SUCCESS_ELEM
static java.lang.String
RESPONSE_XML_TOP_ELEM
static java.lang.String
RESPONSE_XML_WARNINGS_ELEM
protected BasicBasServiceClient.ServerCaps
serverCaps
-
Constructor Summary
Constructors Constructor Description BasicBasServiceClient()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AutoAnnotation
call()
void
close()
protected java.net.URL
downloadLinkFromResponse(java.io.InputStream response)
protected void
getServerCaps()
abstract AutoAnnotationServiceDescriptor
getServiceDescriptor()
boolean
isBundleSupported(Bundle bundle)
protected boolean
isLanguageSupported(java.util.Locale reqLocale)
protected boolean
isMediafileSupported(java.io.File mediaFile)
protected java.io.File
masterSignalFile(Bundle bundle)
boolean
needsWorker()
void
open()
protected java.lang.String
orthoGraphyTextFromTemplateLevel(Bundle bundle)
protected void
parseResponseHeader(org.apache.http.HttpEntity resEntity)
void
setAnnotationRequest(AutoAnnotator.AnnotationRequest ar)
-
-
-
Field Detail
-
BASE_URL
protected static java.lang.String BASE_URL
-
CMDI_URL
protected static java.lang.String CMDI_URL
-
RESPONSE_XML_TOP_ELEM
public static final java.lang.String RESPONSE_XML_TOP_ELEM
- See Also:
- Constant Field Values
-
RESPONSE_XML_DOWNLOAD_ELEM
public static final java.lang.String RESPONSE_XML_DOWNLOAD_ELEM
- See Also:
- Constant Field Values
-
RESPONSE_XML_SUCCESS_ELEM
public static final java.lang.String RESPONSE_XML_SUCCESS_ELEM
- See Also:
- Constant Field Values
-
RESPONSE_XML_OUTPUT_ELEM
public static final java.lang.String RESPONSE_XML_OUTPUT_ELEM
- See Also:
- Constant Field Values
-
RESPONSE_XML_WARNINGS_ELEM
public static final java.lang.String RESPONSE_XML_WARNINGS_ELEM
- See Also:
- Constant Field Values
-
annotationRequest
protected AutoAnnotator.AnnotationRequest annotationRequest
-
serverCaps
protected BasicBasServiceClient.ServerCaps serverCaps
-
DEFAULT_CHARSET
protected static final java.nio.charset.Charset DEFAULT_CHARSET
-
DEFAULT_TEXT_CONTENT_TYPE
protected static final org.apache.http.entity.ContentType DEFAULT_TEXT_CONTENT_TYPE
-
docBuilderFactory
protected javax.xml.parsers.DocumentBuilderFactory docBuilderFactory
-
-
Method Detail
-
getServerCaps
protected void getServerCaps() throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
-
open
public void open()
- Specified by:
open
in interfaceAutoAnnotator
-
close
public void close()
- Specified by:
close
in interfaceAutoAnnotator
-
setAnnotationRequest
public void setAnnotationRequest(AutoAnnotator.AnnotationRequest ar)
- Specified by:
setAnnotationRequest
in interfaceAutoAnnotator
-
isMediafileSupported
protected boolean isMediafileSupported(java.io.File mediaFile) throws java.io.IOException
- Throws:
java.io.IOException
-
isLanguageSupported
protected boolean isLanguageSupported(java.util.Locale reqLocale)
-
isBundleSupported
public boolean isBundleSupported(Bundle bundle) throws java.io.IOException
- Specified by:
isBundleSupported
in interfaceAutoAnnotator
- Throws:
java.io.IOException
-
parseResponseHeader
protected void parseResponseHeader(org.apache.http.HttpEntity resEntity)
-
downloadLinkFromResponse
protected java.net.URL downloadLinkFromResponse(java.io.InputStream response) throws AutoAnnotatorException
- Throws:
AutoAnnotatorException
-
masterSignalFile
protected java.io.File masterSignalFile(Bundle bundle)
-
orthoGraphyTextFromTemplateLevel
protected java.lang.String orthoGraphyTextFromTemplateLevel(Bundle bundle)
-
needsWorker
public boolean needsWorker()
- Specified by:
needsWorker
in interfaceAutoAnnotator
-
call
public abstract AutoAnnotation call() throws java.lang.Exception
- Specified by:
call
in interfacejava.util.concurrent.Callable<AutoAnnotation>
- Throws:
java.lang.Exception
-
getServiceDescriptor
public abstract AutoAnnotationServiceDescriptor getServiceDescriptor()
- Specified by:
getServiceDescriptor
in interfaceServiceDescriptorProvider<AutoAnnotationServiceDescriptor>
-
-