public class XmiSerializationSharedData extends Object
XmiCasSerializer and the XmiCasDeserializer.
 This has a number of uses:
 XmiSerializationSharedData
       instance to the deserializer, the deserializer will store information about the incoming xmi:id values.  If you then pass
       the same XmiSerializationSharedData object to the serializer when you attempt to serialize the same CAS,
       all of the incoming FS will be serialized using the same xmi:id value that they had when they were deserialized.lenient parameter set to true,
       whenever it encounters an XMI element that doesn't correspond to a type in the type system, it will populate the
       XmiSerializationSharedData with information about these elements.  If you then pass the same 
       XmiSerializationSharedData object to the serializer when you attempt to serialize the same CAS, these
       out-of-typesystem FS will be reserialized without loss of information.  
       References between in-typesystem and out-of-typesystem
       FS (in either direction) are maintained as well.XmiSerializationSharedData, you can call the
       getMaxXmiId() method to get the maximum xmi:id value in the serialized CAS.  This feature, along with the consistency of
       xmi:id values, allows merging multiple XMI documents into a single CAS.  See TODO.| Modifier and Type | Class and Description | 
|---|---|
| static class  | XmiSerializationSharedData.XmiArrayElementData structure holding the index and the xmi:id of an array or list element that
 is a reference to an out-of-typesystem FS. | 
| Constructor and Description | 
|---|
| XmiSerializationSharedData() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addNonsharedRefToFSMapping(int nonsharedFSAddr,
                          int fsAddr)Add mapping between the address of FS that is the value of a non-shared multi-valued
 feature of a FeatureStructure. | 
| void | addOutOfTypeSystemArrayElement(int addr,
                              int index,
                              int xmiId)Records an out-of-typesystem array element in the XmiSerializationSharedData. | 
| void | addOutOfTypeSystemAttribute(int addr,
                           String featName,
                           String featVal)Records an out-of-typesystem attribute that belongs to an in-typesystem FS. | 
| void | addOutOfTypeSystemChildElements(int addr,
                               String featName,
                               List<String> featVals)Records out-of-typesystem child elements that belong to an in-typesystem FS. | 
| void | addOutOfTypeSystemElement(org.apache.uima.cas.impl.XmiSerializationSharedData.OotsElementData elemData)Records information about an XMI element that was not an instance of any type in the type system. | 
| void | addOutOfTypeSystemViewMember(String sofaXmiId,
                            String memberXmiId)Records that an out-of-typesystem XMI element should be a member of the
 specified view. | 
| void | clearIdMap()Clears the ID mapping information that was populated in
 previous serializations or deserializations. | 
| int[] | getAllFsAddressesInIdMap()Get all FS Addresses that have been added to the id map. | 
| int | getEncompassingFS(int nonsharedFS) | 
| int | getFsAddrForXmiId(int xmiId)Gets the FS address that corresponds to the given xmi:id, in the most
 recent serialization or deserialization. | 
| int | getMaxXmiId()Gets the maximum xmi:id that has been generated or read so far. | 
| int[] | getNonsharedMulitValuedFSs() | 
| List<XmiSerializationSharedData.XmiArrayElement> | getOutOfTypeSystemArrayElements(int addr)Gets information about out-of-typesystem array elements. | 
| List<org.apache.uima.cas.impl.XmiSerializationSharedData.OotsElementData> | getOutOfTypeSystemElements()Gets a List of  XmiSerializationSharedData.OotsElementDataobjects, each of which describes an
 incoming XMI element that did not correspond to a Type in the TypeSystem. | 
| org.apache.uima.cas.impl.XmiSerializationSharedData.OotsElementData | getOutOfTypeSystemFeatures(int addr)Gets information about out-of-typesystem features that belong to an
 in-typesystem FS. | 
| List<String> | getOutOfTypeSystemViewMembers(String sofaXmiId)Gets a List of xmi:id's (Strings) of all out-of-typesystem XMI elements
 that are members of the view with the given id. | 
| boolean | hasOutOfTypeSystemArrayElements() | 
| String | toString()For debugging purposes only. | 
public int getMaxXmiId()
public int getFsAddrForXmiId(int xmiId)
xmiId - an xmi:id from the most recent XMI CAS that was serialized
   or deserialized.public void clearIdMap()
public void addOutOfTypeSystemElement(org.apache.uima.cas.impl.XmiSerializationSharedData.OotsElementData elemData)
elemData - information about the out-of-typesystem XMI elementpublic List<org.apache.uima.cas.impl.XmiSerializationSharedData.OotsElementData> getOutOfTypeSystemElements()
XmiSerializationSharedData.OotsElementData objects, each of which describes an
 incoming XMI element that did not correspond to a Type in the TypeSystem.XmiSerializationSharedData.OotsElementData objectspublic void addOutOfTypeSystemViewMember(String sofaXmiId, String memberXmiId)
sofaXmiId - xmi:id of a SofamemberXmiId - xmi:id of an out-of-typesystem element that should be
   a member of the view for the given Sofapublic List<String> getOutOfTypeSystemViewMembers(String sofaXmiId)
sofaXmiId - xmi:id of a Sofapublic void addOutOfTypeSystemAttribute(int addr,
                                        String featName,
                                        String featVal)
addr - CAS address of the FSfeatName - name of the featurefeatVal - value of the feature, as a stringpublic void addOutOfTypeSystemChildElements(int addr,
                                            String featName,
                                            List<String> featVals)
addr - CAS address of the FSfeatName - name of the feature (element tag name)featVals - values of the feature, as a List of stringspublic org.apache.uima.cas.impl.XmiSerializationSharedData.OotsElementData getOutOfTypeSystemFeatures(int addr)
addr - CAS address of the FSpublic int[] getAllFsAddressesInIdMap()
public List<XmiSerializationSharedData.XmiArrayElement> getOutOfTypeSystemArrayElements(int addr)
addr - the CAS address of an FSArrayXmiSerializationSharedData.XmiArrayElement objects, each of which
   holds the index and xmi:id of an array element that is a
   reference to an out-of-typesystem FS.public boolean hasOutOfTypeSystemArrayElements()
public void addOutOfTypeSystemArrayElement(int addr,
                                           int index,
                                           int xmiId)
addr - CAS address of FSArrayindex - index into arrayxmiId - xmi:id of the out-of-typesystem element that is the value at the given indexpublic void addNonsharedRefToFSMapping(int nonsharedFSAddr,
                                       int fsAddr)
nonsharedFSAddr - - fs address of non-shared multi-valued feature valuefsAddr - - fs address of encompassing featurestructurepublic int[] getNonsharedMulitValuedFSs()
public int getEncompassingFS(int nonsharedFS)
nonsharedFS - an id of a nonsharedFSCopyright © 2006–2017 The Apache Software Foundation. All rights reserved.