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 classBasicBasServiceClient.ServerCaps-
Nested classes/interfaces inherited from interface ips.annot.autoannotator.AutoAnnotator
AutoAnnotator.AnnotationRequest
-
-
Field Summary
Fields Modifier and Type Field Description protected AutoAnnotator.AnnotationRequestannotationRequestprotected static java.lang.StringBASE_URLprotected static java.lang.StringCMDI_URLprotected static java.nio.charset.CharsetDEFAULT_CHARSETprotected static org.apache.http.entity.ContentTypeDEFAULT_TEXT_CONTENT_TYPEprotected javax.xml.parsers.DocumentBuilderFactorydocBuilderFactorystatic java.lang.StringRESPONSE_XML_DOWNLOAD_ELEMstatic java.lang.StringRESPONSE_XML_OUTPUT_ELEMstatic java.lang.StringRESPONSE_XML_SUCCESS_ELEMstatic java.lang.StringRESPONSE_XML_TOP_ELEMstatic java.lang.StringRESPONSE_XML_WARNINGS_ELEMprotected BasicBasServiceClient.ServerCapsserverCaps
-
Constructor Summary
Constructors Constructor Description BasicBasServiceClient()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AutoAnnotationcall()voidclose()protected java.net.URLdownloadLinkFromResponse(java.io.InputStream response)protected voidgetServerCaps()abstract AutoAnnotationServiceDescriptorgetServiceDescriptor()booleanisBundleSupported(Bundle bundle)protected booleanisLanguageSupported(java.util.Locale reqLocale)protected booleanisMediafileSupported(java.io.File mediaFile)protected java.io.FilemasterSignalFile(Bundle bundle)booleanneedsWorker()voidopen()protected java.lang.StringorthoGraphyTextFromTemplateLevel(Bundle bundle)protected voidparseResponseHeader(org.apache.http.HttpEntity resEntity)voidsetAnnotationRequest(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.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
open
public void open()
- Specified by:
openin interfaceAutoAnnotator
-
close
public void close()
- Specified by:
closein interfaceAutoAnnotator
-
setAnnotationRequest
public void setAnnotationRequest(AutoAnnotator.AnnotationRequest ar)
- Specified by:
setAnnotationRequestin 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:
isBundleSupportedin 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:
needsWorkerin interfaceAutoAnnotator
-
call
public abstract AutoAnnotation call() throws java.lang.Exception
- Specified by:
callin interfacejava.util.concurrent.Callable<AutoAnnotation>- Throws:
java.lang.Exception
-
getServiceDescriptor
public abstract AutoAnnotationServiceDescriptor getServiceDescriptor()
- Specified by:
getServiceDescriptorin interfaceServiceDescriptorProvider<AutoAnnotationServiceDescriptor>
-
-