Package org.apache.uima.adapter.vinci
Class CASTransportable
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.uima.adapter.vinci.CASTransportable
- All Implemented Interfaces:
- Transportable,- ContentHandler,- DTDHandler,- EntityResolver,- ErrorHandler
- 
Field SummaryFieldsModifier and TypeFieldDescriptionbooleanboolean
- 
Constructor SummaryConstructorsConstructorDescriptionCASTransportable(CAS cas, OutOfTypeSystemData outOfTypeSystemData, UimaContext uimaContext, boolean includeDocText) This constructor is used on the client side, where we have a dedicated CAS instance for the request.CASTransportable(CasPool casPool, OutOfTypeSystemData outOfTypeSystemData, UimaContext uimaContext, boolean includeDocText) This constructor is used on the service side - a CAS Pool reference is provided.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidcleanup()voidvoidendElement(String uri, String name, String qName) protected voidfinalize()Read the object from the input stream.getCas()Gets the cas.Gets the command.Gets the extra data frame.Gets the out of type system data.voidsetCommand(String command) Sets the command.voidvoidstartElement(String uri, String name, String qName, Attributes atts) voidtoStream(OutputStream os) Serialize the CAS to the stream in XTalk format.Create a SAXException that wraps the given IOException.Methods inherited from class org.xml.sax.helpers.DefaultHandlerendPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandlerdeclaration
- 
Field Details- 
uimaContext
- 
includeDocTextpublic boolean includeDocText
- 
ignoreResponsepublic boolean ignoreResponse
 
- 
- 
Constructor Details- 
CASTransportablepublic CASTransportable(CasPool casPool, OutOfTypeSystemData outOfTypeSystemData, UimaContext uimaContext, boolean includeDocText) This constructor is used on the service side - a CAS Pool reference is provided. We don't check a CAS out of the pool until we get a request.- Parameters:
- casPool- the cas pool
- outOfTypeSystemData- the out of type system data
- uimaContext- the uima context
- includeDocText- the include doc text
 
- 
CASTransportablepublic CASTransportable(CAS cas, OutOfTypeSystemData outOfTypeSystemData, UimaContext uimaContext, boolean includeDocText) This constructor is used on the client side, where we have a dedicated CAS instance for the request.- Parameters:
- cas- the cas
- outOfTypeSystemData- the out of type system data
- uimaContext- the uima context
- includeDocText- the include doc text
 
 
- 
- 
Method Details- 
getExtraDataFrameGets the extra data frame.- Returns:
- the extra data frame
 
- 
getOutOfTypeSystemDataGets the out of type system data.- Returns:
- the out of type system data
 
- 
getCommandGets the command.- Returns:
- the command
 
- 
setCommandSets the command.- Parameters:
- command- the new command
 
- 
getCasGets the cas.- Returns:
- the cas
 
- 
fromStreamDescription copied from interface:TransportableRead the object from the input stream.- Specified by:
- fromStreamin interface- Transportable
- Parameters:
- is- The stream to read from.
- Returns:
- -
- Throws:
- IOException- -
 
- 
toStreamSerialize the CAS to the stream in XTalk format. After serialization is complete the cas is returned to the pool (if it was allocated from a pool.)- Specified by:
- toStreamin interface- Transportable
- Parameters:
- os- the os
- Throws:
- IOException- Signals that an I/O exception has occurred.
 
- 
cleanuppublic void cleanup()
- 
finalizeprotected void finalize()
- 
startElementpublic void startElement(String uri, String name, String qName, Attributes atts) throws SAXException - Specified by:
- startElementin interface- ContentHandler
- Overrides:
- startElementin class- DefaultHandler
- Throws:
- SAXException
 
- 
endElement- Specified by:
- endElementin interface- ContentHandler
- Overrides:
- endElementin class- DefaultHandler
- Throws:
- SAXException
 
- 
characters- Specified by:
- charactersin interface- ContentHandler
- Overrides:
- charactersin class- DefaultHandler
- Throws:
- SAXException
 
- 
startDocument- Specified by:
- startDocumentin interface- ContentHandler
- Overrides:
- startDocumentin class- DefaultHandler
- Throws:
- SAXException
 
- 
endDocument- Specified by:
- endDocumentin interface- ContentHandler
- Overrides:
- endDocumentin class- DefaultHandler
- Throws:
- SAXException
 
- 
wrapAsSAXExceptionCreate a SAXException that wraps the given IOException. The wrapping is done using the standard Java 1.4 mechanism, so that getCause() will work. Note that new SAXException(Exception) does NOT work.- Parameters:
- e- an IOException to wrap
- Returns:
- a SAX exception for which getCause()will returne.
 
 
-