Package org.apache.uima.util
Class XmlCasDeserializer
- java.lang.Object
-
- org.apache.uima.util.XmlCasDeserializer
-
public abstract class XmlCasDeserializer extends java.lang.Object
Deserializes a CAS from a standoff-XML format. This class can read the XMI format introduced in UIMA v1.4 as well as the XCAS format from previous versions. This class is abstract, because it only has static methods and should never be instantiated
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
XmlCasDeserializer.XmlCasDeserializerHandler
-
Constructor Summary
Constructors Constructor Description XmlCasDeserializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
deserialize(java.io.InputStream aStream, CAS aCAS)
Deserializes a CAS from a standoff-XML format.static void
deserialize(java.io.InputStream aStream, CAS aCAS, boolean aLenient)
Deserializes a CAS from XMI or XCAS.(package private) static SerialFormat
deserializeR(java.io.InputStream aStream, CAS aCAS, boolean aLenient)
Deserializes a CAS from XMI or XCAS, version returning the SerialFormat
-
-
-
Method Detail
-
deserialize
public static void deserialize(java.io.InputStream aStream, CAS aCAS) throws org.xml.sax.SAXException, java.io.IOException
Deserializes a CAS from a standoff-XML format.- Parameters:
aStream
- input stream from which to read the XML documentaCAS
- CAS into which to deserialize. This CAS must be set up with a type system that is compatible with that in the XML.- Throws:
org.xml.sax.SAXException
- if an XML Parsing error occursjava.io.IOException
- if an I/O failure occurs
-
deserialize
public static void deserialize(java.io.InputStream aStream, CAS aCAS, boolean aLenient) throws org.xml.sax.SAXException, java.io.IOException
Deserializes a CAS from XMI or XCAS.- Parameters:
aStream
- input stream from which to read the XML documentaCAS
- CAS into which to deserialize. This CAS must be set up with a type system that is compatible with that in the XMLaLenient
- if true, unknown Types will be ignored. If false, unknown Types will cause an exception. The default is false.- Throws:
org.xml.sax.SAXException
- if an XML Parsing error occursjava.io.IOException
- if an I/O failure occurs
-
deserializeR
static SerialFormat deserializeR(java.io.InputStream aStream, CAS aCAS, boolean aLenient) throws org.xml.sax.SAXException, java.io.IOException
Deserializes a CAS from XMI or XCAS, version returning the SerialFormat- Parameters:
aStream
- input stream from which to read the XML documentaCAS
- CAS into which to deserialize. This CAS must be set up with a type system that is compatible with that in the XMLaLenient
- if true, unknown Types will be ignored. If false, unknown Types will cause an exception. The default is false.- Returns:
- the format of the data
- Throws:
org.xml.sax.SAXException
- if an XML Parsing error occursjava.io.IOException
- if an I/O failure occurs
-
-