public class CasSerializerSupport.CasDocSerializer extends Object
| Modifier and Type | Field and Description | 
|---|---|
| CASImpl | cas | 
| TypeSystemImpl | filterTypeSystem_inner | 
| List<TOP>[] | indexedFSsArray of Lists of all FS that are indexed in some view (other than sofas). | 
| boolean | isDeltaWhether the serializer needs to serialize only the deltas, that is, new FSs created after
 mark represented by Marker object and preexisting FSs and Views that have been modified. | 
| boolean | isDynamicMultiRefSet to true for JSON configuration of using dynamic multi-ref detection for arrays and lists | 
| boolean | isFilteringWhether the serializer needs to check for filtered-out types/features. | 
| boolean | isFormattedOutput_inner | 
| MarkerImpl | markerUsed to tell if a FS was created before or after mark. | 
| List<TOP> | modifiedEmbeddedValueFSs | 
| Set<TOP> | multiRefFSsSet of FSs that have multiple references
 Has an entry for each FS (not just array or list FSs) which is (from some point on) being serialized as a multi-ref,
   that is, is **not** being serialized (any more) using the special notation for arrays and lists
   or, for JSON, **not** being serialized using the embedded notation
 This is for JSON which is computing the multi-refs, not depending on the setting in a feature. | 
| boolean | needNameSpaces | 
| Set<String> | nsPrefixesUsedthe set of all namespace prefixes used, to disallow some if they are in use already in
 set-aside data (xmi serialization) being merged back in | 
| Map<String,String> | nsUriToPrefixMapmap from a namespace expanded form to the namespace prefix, to identify potential collisions
 when generating a namespace string | 
| List<TOP> | previouslySerializedFSs | 
| XmiSerializationSharedData | sharedDatafor Delta serialization, holds the info gathered from deserialization needed for delta
 serialization and for handling out-of-type-system data for both plain and delta serialization | 
| Comparator<TOP> | sortFssByTypeCalled for JSon Serialization Sort a view, by type and then by begin/end asc/des for subtypes
 of Annotation, then by id | 
| TypeSystemImpl | tsi | 
| org.apache.uima.internal.util.XmlElementName[] | typeCode2namespaceNames | 
| Set<TOP> | visited_not_yet_writtenset of FSs that have been visited and enqueued to be serialized
   - exception: arrays and lists which are "inline" are put into this set,
     but are not enqueued to be serialized. | 
| Constructor and Description | 
|---|
| CasDocSerializer(ContentHandler ch,
                CASImpl cas,
                XmiSerializationSharedData sharedData,
                MarkerImpl marker,
                CasSerializerSupport.CasSerializerSupportSerialize csss) | 
| CasDocSerializer(ContentHandler ch,
                CASImpl cas,
                XmiSerializationSharedData sharedData,
                MarkerImpl marker,
                CasSerializerSupport.CasSerializerSupportSerialize csss,
                boolean trackMultiRefs) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | encodeFS(TOP fs)Encode an individual FS. | 
| void | encodeIndexed() | 
| void | encodeQueued() | 
| String | getNameSpacePrefix(String uimaTypeName,
                  String nsUri,
                  int lastDotIndex) | 
| Sofa | getSofa(int sofaNum) | 
| TypeImpl[] | getSortedUsedTypes() | 
| String | getTypeNameFromXmlElementName(org.apache.uima.internal.util.XmlElementName xe) | 
| String | getUniqueString(String s) | 
| String | getXmiId(TOP fs)Get the XMI ID to use for an FS. | 
| int | getXmiIdAsInt(TOP fs) | 
| boolean | isStaticMultiRef(FeatureImpl fi) | 
| void | serialize()Starts serialization | 
| void | writeViewsCommons() | 
public final CASImpl cas
public final TypeSystemImpl tsi
public final Set<TOP> visited_not_yet_written
public final Set<TOP> multiRefFSs
public final boolean isDynamicMultiRef
public final List<TOP>[] indexedFSs
public org.apache.uima.internal.util.XmlElementName[] typeCode2namespaceNames
public boolean needNameSpaces
public final Map<String,String> nsUriToPrefixMap
public final Set<String> nsPrefixesUsed
public final MarkerImpl marker
public final XmiSerializationSharedData sharedData
public final boolean isDelta
public final boolean isFiltering
public TypeSystemImpl filterTypeSystem_inner
public final boolean isFormattedOutput_inner
public final Comparator<TOP> sortFssByType
public CasDocSerializer(ContentHandler ch, CASImpl cas, XmiSerializationSharedData sharedData, MarkerImpl marker, CasSerializerSupport.CasSerializerSupportSerialize csss)
ch - -cas - -sharedData - -marker - -csss - -public CasDocSerializer(ContentHandler ch, CASImpl cas, XmiSerializationSharedData sharedData, MarkerImpl marker, CasSerializerSupport.CasSerializerSupportSerialize csss, boolean trackMultiRefs)
public Sofa getSofa(int sofaNum)
sofaNum - - starts at 1public TypeImpl[] getSortedUsedTypes()
public void encodeFS(TOP fs) throws Exception
fs - the FS to be encoded.SAXException - passthruExceptionpublic String getXmiId(TOP fs)
fs - the FSpublic int getXmiIdAsInt(TOP fs)
public String getNameSpacePrefix(String uimaTypeName, String nsUri, int lastDotIndex)
public String getTypeNameFromXmlElementName(org.apache.uima.internal.util.XmlElementName xe)
public boolean isStaticMultiRef(FeatureImpl fi)
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.