|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.cas.impl.XmiCasDeserializer
public class XmiCasDeserializer
XMI CAS deserializer. Used to read in a CAS from XML Metadata Interchange (XMI) format.
Constructor Summary | |
---|---|
XmiCasDeserializer(TypeSystem ts)
|
|
XmiCasDeserializer(TypeSystem ts,
UimaContext uimaContext)
Create a new deserializer from a type system. |
Method Summary | |
---|---|
static void |
deserialize(InputStream aStream,
CAS aCAS)
Deserializes a CAS from XMI. |
static void |
deserialize(InputStream aStream,
CAS aCAS,
boolean aLenient)
Deserializes a CAS from XMI. |
DefaultHandler |
getXmiCasHandler(CAS cas)
Create a default handler for deserializing a CAS from XMI. |
DefaultHandler |
getXmiCasHandler(CAS cas,
boolean lenient)
Create a default handler for deserializing a CAS from XMI. |
DefaultHandler |
getXmiCasHandler(CAS cas,
boolean lenient,
XmiSerializationSharedData sharedData)
Create a default handler for deserializing a CAS from XMI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmiCasDeserializer(TypeSystem ts, UimaContext uimaContext)
getXCASHandler()
must have this type system as their type system.
ts
- The type system of the CASes to be deserialized.public XmiCasDeserializer(TypeSystem ts)
Method Detail |
---|
public DefaultHandler getXmiCasHandler(CAS cas)
cas
- This CAS will be used to hold the data deserialized from the XMI
DefaultHandler
to pass to the SAX parser.public DefaultHandler getXmiCasHandler(CAS cas, boolean lenient)
getXmiCasHandler(CAS,boolean)
to turn on lenient mode
and ignore any unknown types.
cas
- This CAS will be used to hold the data deserialized from the XMIlenient
- if true, unknown Types will be ignored. If false, unknown Types will cause an
exception. The default is false.
DefaultHandler
to pass to the SAX parser.public DefaultHandler getXmiCasHandler(CAS cas, boolean lenient, XmiSerializationSharedData sharedData)
getXmiCasHandler(CAS,boolean)
to turn on lenient mode
and ignore any unknown types.
cas
- This CAS will be used to hold the data deserialized from the XMIlenient
- if true, unknown Types will be ignored. If false, unknown Types will cause an
exception. The default is false.sharedData
- data structure used to allow the XmiCasSerializer and XmiCasDeserializer to share
information.
DefaultHandler
to pass to the SAX parser.public static void deserialize(InputStream aStream, CAS aCAS) throws SAXException, IOException
aStream
- input stream from which to read the XMI documentaCAS
- CAS into which to deserialize. This CAS must be set up with a type system that is
compatible with that in the XMI
SAXException
- if an XML Parsing error occurs
IOException
- if an I/O failure occurspublic static void deserialize(InputStream aStream, CAS aCAS, boolean aLenient) throws SAXException, IOException
aStream
- input stream from which to read the XCMI documentaCAS
- CAS into which to deserialize. This CAS must be set up with a type system that is
compatible with that in the XMIaLenient
- if true, unknown Types will be ignored. If false, unknown Types will cause an
exception. The default is false.
SAXException
- if an XML Parsing error occurs
IOException
- if an I/O failure occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |