|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.cas.impl.Serialization
public class Serialization
This class has no fields or instance methods, but instead has only static methods. In spite of its name, it has static methods for both serializing and deserializing CASes. It has 2 styles of Serialization / Deserialization - one which makes use of variouscustom binary serialization methods, and - one which just converts CAS and related objects into other objects which in turn are serializable by normal Java Object serialization.
Constructor Summary | |
---|---|
Serialization()
|
Method Summary | |
---|---|
static CAS |
createCAS(CASMgr casMgr,
org.apache.uima.cas.impl.CASSerializer casSer)
Deserialize the data in a CASSerializer into an existing CAS, return the currentview in that Cas. |
static CASMgr |
createCASMgr(org.apache.uima.cas.impl.CASMgrSerializer ser)
Deserialize a type system and index repository definition and use to initialize a new instance of a CAS. |
static SerialFormat |
deserializeCAS(CAS cas,
java.io.InputStream istream)
Deserialize a CAS, in various binary formats, into an existing CAS Note: this form supports deserializing the following binary representations: - plain (uncompressed) - compressed, no type filtering (form 4), Delta and not-delta - compressed, no type filtering (form 6), not-delta only. |
static org.apache.uima.cas.impl.BinaryCasSerDes6 |
deserializeCAS(CAS cas,
java.io.InputStream istream,
TypeSystem tgtTypeSystem,
org.apache.uima.cas.impl.BinaryCasSerDes6.ReuseInfo reuseInfo)
Deserialize a CAS, in various binary formats, into an existing CAS Note: this form supports deserializing the following binary representations: - compressed, type filtering (form 6), delta and not-delta. |
static org.apache.uima.cas.impl.BinaryCasSerDes6 |
deserializeCAS(CAS cas,
java.io.InputStream istream,
TypeSystem tgtTypeSystem,
org.apache.uima.cas.impl.BinaryCasSerDes6.ReuseInfo reuseInfo,
org.apache.uima.cas.impl.AllowPreexistingFS allowPreexisting)
Deserialize a CAS, in various binary formats, into an existing CAS Note: this form supports deserializing the following binary representations: - compressed, type filtering (form 6), delta and not-delta. |
static void |
deserializeCASComplete(org.apache.uima.cas.impl.CASCompleteSerializer casCompSer,
CASMgr casMgr)
Deserialize the data in a CASCompleteSerializer into an existing CAS |
static org.apache.uima.cas.impl.CASSerializer |
serializeCAS(CAS cas)
Convert a CAS to a CASSerializer object. |
static void |
serializeCAS(CAS cas,
java.io.OutputStream ostream)
Serialize a CAS including what's indexed, to an output stream Uses uncompressed binary serialization |
static void |
serializeCAS(CAS cas,
java.io.OutputStream ostream,
Marker mark)
Serializes CAS data added or modified after the tracking Marker was created and writes it to the output stream in Delta CAS format using uncompressed binary format |
static org.apache.uima.cas.impl.CASCompleteSerializer |
serializeCASComplete(CASMgr casMgr)
Convert a CAS + the type system and index definitions into a CASCompleteSerializer object |
static org.apache.uima.cas.impl.CASMgrSerializer |
serializeCASMgr(CASMgr casMgr)
Convert a Type System and Index Repository into a CASMgrSerializer object which can be serialized |
static org.apache.uima.cas.impl.CASSerializer |
serializeNoMetaData(CAS cas)
Convert a CAS to a CASSerializer object. |
static void |
serializeWithCompression(CAS cas,
java.lang.Object out)
Serialize in compressed binary form 4 |
static void |
serializeWithCompression(CAS cas,
java.lang.Object out,
Marker marker)
Serialize in compress binary form 4, only the delta part of a CAS |
static org.apache.uima.cas.impl.BinaryCasSerDes6.ReuseInfo |
serializeWithCompression(CAS cas,
java.lang.Object out,
TypeSystem tgtTypeSystem)
Serialize in compressed binary with type filtering This method can use type filtering to omit sending those types and/or features not present in the target type system. |
static void |
serializeWithCompression(CAS cas,
java.lang.Object out,
TypeSystem tgtTypeSystem,
Marker mark,
org.apache.uima.cas.impl.BinaryCasSerDes6.ReuseInfo reuseInfo)
Delta Serialize in compressed form, with type filtering This method can use type filtering to omit sending those types and/or features not present in the target type system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Serialization()
Method Detail |
---|
public static org.apache.uima.cas.impl.CASSerializer serializeCAS(CAS cas)
cas
- the CAS which serves as the source for a new CASSerializer object
public static org.apache.uima.cas.impl.CASSerializer serializeNoMetaData(CAS cas)
cas
- the source for a new CASSerializer object
public static org.apache.uima.cas.impl.CASMgrSerializer serializeCASMgr(CASMgr casMgr)
casMgr
- the type system and index repo definitions
public static org.apache.uima.cas.impl.CASCompleteSerializer serializeCASComplete(CASMgr casMgr)
casMgr
- the source for a new CASCompleteSerializer object
public static void deserializeCASComplete(org.apache.uima.cas.impl.CASCompleteSerializer casCompSer, CASMgr casMgr)
casCompSer
- the source for deserializationcasMgr
- the CAS to receive the datapublic static CASMgr createCASMgr(org.apache.uima.cas.impl.CASMgrSerializer ser)
ser
- the CAS to receive the type system
public static CAS createCAS(CASMgr casMgr, org.apache.uima.cas.impl.CASSerializer casSer)
casMgr
- the CAS ManagercasSer
- the serializer
public static void serializeCAS(CAS cas, java.io.OutputStream ostream)
cas
- the CAS to serializeostream
- the output streampublic static SerialFormat deserializeCAS(CAS cas, java.io.InputStream istream)
cas
- the CAS to deserialize into. If the incoming representation is a Delta Cas, then the receiving CAS is not reset, but is added to.istream
- the input stream
public static void serializeCAS(CAS cas, java.io.OutputStream ostream, Marker mark)
cas
- the Cas to serializeostream
- the output streammark
- the cas mark (for delta CASes)public static void serializeWithCompression(CAS cas, java.lang.Object out) throws java.io.IOException
cas
- the CAS to serializeout
- - an OutputStream, a DataOutputStream, or a File
java.io.IOException
- if IO exceptionpublic static void serializeWithCompression(CAS cas, java.lang.Object out, Marker marker) throws java.io.IOException
cas
- the CAS to serializeout
- - an OutputStream, a DataOutputStream, or a Filemarker
- identifying where the delta starts
java.io.IOException
- if IO exceptionpublic static org.apache.uima.cas.impl.BinaryCasSerDes6.ReuseInfo serializeWithCompression(CAS cas, java.lang.Object out, TypeSystem tgtTypeSystem) throws java.io.IOException, ResourceInitializationException
cas
- the CAS to serializeout
- an OutputStream, a DataOutputStream, or a FiletgtTypeSystem
- null or a target TypeSystem, which must be mergable with this CAS's type system
java.io.IOException
- if IO exception
ResourceInitializationException
- if target type system is incompatible with this CAS's type systempublic static void serializeWithCompression(CAS cas, java.lang.Object out, TypeSystem tgtTypeSystem, Marker mark, org.apache.uima.cas.impl.BinaryCasSerDes6.ReuseInfo reuseInfo) throws java.io.IOException, ResourceInitializationException
cas
- the CAS to serializeout
- an OutputStream, a DataOutputStream, or a FiletgtTypeSystem
- null or a target TypeSystem, which must be mergable with this CAS's type systemmark
- null or where the mark is in the CAS. If not null, indicates doing a delta CAS serializationreuseInfo
- if mark is not null, this parameter is required
and must have been computed when the original deserialization (of the CAS now being serialized as a delta CAS) was done
java.io.IOException
- if IO exception
ResourceInitializationException
- if the target type system and the CAS's type system can't be mergedpublic static org.apache.uima.cas.impl.BinaryCasSerDes6 deserializeCAS(CAS cas, java.io.InputStream istream, TypeSystem tgtTypeSystem, org.apache.uima.cas.impl.BinaryCasSerDes6.ReuseInfo reuseInfo) throws java.io.IOException, ResourceInitializationException
cas
- the CAS to deserialize into. If the incoming representation is a Delta Cas, then the receiving CAS is not reset, but is added to.istream
- the input streamtgtTypeSystem
- The typeSystem of the serialized form of the CAS; must be compatible with the type system of the receiving cas.reuseInfo
- If delta CAS is being received and form 6 compression is being used, then this must be the reuseInfo captured when the
original CAS (being updated by the delta coming in) was sent out.
java.io.IOException
- if IO exception
ResourceInitializationException
- if the target type system and the CAS's type system can't be mergedpublic static org.apache.uima.cas.impl.BinaryCasSerDes6 deserializeCAS(CAS cas, java.io.InputStream istream, TypeSystem tgtTypeSystem, org.apache.uima.cas.impl.BinaryCasSerDes6.ReuseInfo reuseInfo, org.apache.uima.cas.impl.AllowPreexistingFS allowPreexisting) throws java.io.IOException, ResourceInitializationException
cas
- the CAS to deserialize into. If the incoming representation is a Delta Cas, then the receiving CAS is not reset, but is added to.istream
- the input streamtgtTypeSystem
- The typeSystem of the serialized form of the CAS; must be compatible with the type system of the receiving cas.reuseInfo
- If delta CAS is being received and form 6 compression is being used, then this must be the reuseInfo captured when the
original CAS (being updated by the delta coming in) was sent out.allowPreexisting
- used to control what happens when a delta cas is modifying Feature Structures below the line
java.io.IOException
- if IO exception
ResourceInitializationException
- if the target type system and the CAS's type system can't be merged
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |