You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2014/09/16 20:17:34 UTC
svn commit: r1625349 - in /uima/uimaj/trunk:
uima-docbook-references/src/docbook/
uimaj-core/src/main/java/org/apache/uima/cas/impl/
uimaj-core/src/main/java/org/apache/uima/internal/util/
uimaj-core/src/test/java/org/apache/uima/cas/impl/ uimaj-core/s...
Author: schor
Date: Tue Sep 16 18:17:33 2014
New Revision: 1625349
URL: http://svn.apache.org/r1625349
Log:
[UIMA-3969] fix byte array support, make namespace additions more selective, by type.
Modified:
uima/uimaj/trunk/uima-docbook-references/src/docbook/ref.json.xml
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CasSerializerSupport.java
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/JsonCasSerializer.java
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XmiCasSerializer.java
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/internal/util/XmlElementName.java
uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/JsonCasSerializerTest.java
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValues.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesByType.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesByTypeOmits.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoIDNoTypes.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoIDs.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoTypes.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesOmits.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/delta.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/delta2.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/multipleViews.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2Omits.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2pp.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2ppOmits.txt
uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollisionOmits.txt
Modified: uima/uimaj/trunk/uima-docbook-references/src/docbook/ref.json.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uima-docbook-references/src/docbook/ref.json.xml?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uima-docbook-references/src/docbook/ref.json.xml (original)
+++ uima/uimaj/trunk/uima-docbook-references/src/docbook/ref.json.xml Tue Sep 16 18:17:33 2014
@@ -207,8 +207,9 @@ BY_TYPE_EMBED_ID:
used in the body of the serialization.</para>
</listitem>
<listitem>
- <para>(optional) feature references: This identifies which features are to be interpreted as references to other
- feature structure instances.</para>
+ <para>(optional) feature context: This identifies which features are to be interpreted as references to other
+ feature structure instances, and/or which features are encoded as binary using base64 encoding
+ (per JSON/Jackson standard convention).</para>
</listitem>
<listitem>
<para>(optional) supertypes: this provides information that can be used by the receiver to contruct the inheritance
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CasSerializerSupport.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CasSerializerSupport.java?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CasSerializerSupport.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CasSerializerSupport.java Tue Sep 16 18:17:33 2014
@@ -207,8 +207,12 @@ class CasSerializerSupport {
abstract protected void initializeNamespaces();
- abstract protected boolean checkForNameCollision(XmlElementName xmlElementName);
+ abstract protected void checkForNameCollision(XmlElementName xmlElementName);
+ abstract protected void addNameSpace(XmlElementName xmlElementName);
+
+ abstract protected XmlElementName uimaTypeName2XmiElementName(String typeName);
+
abstract protected void writeFeatureStructures(int elementCount) throws Exception;
abstract protected void writeViews() throws Exception;
@@ -228,8 +232,6 @@ class CasSerializerSupport {
abstract protected void writeEndOfIndividualFs() throws Exception;
abstract protected void writeEndOfSerialization() throws Exception;
-
- abstract protected XmlElementName uimaTypeName2XmiElementName(String typeName);
}
/**
@@ -267,7 +269,7 @@ class CasSerializerSupport {
XmlElementName[] typeCode2namespaceNames; // array, indexed by type code, giving XMI names for each type
private final BitSet typeUsed; // identifies types being serialized, a subset of all possible types
-
+
boolean needNameSpaces = true; // may be false; currently for JSON only
/**
@@ -581,7 +583,6 @@ class CasSerializerSupport {
return -1;
}
}
-
if (isFiltering) {
String typeName = tsi.ll_getTypeForCode(typeCode).getName();
@@ -591,7 +592,9 @@ class CasSerializerSupport {
}
}
- // We set visited only if we're going to enqueue this. This handles the use case:
+ // We set visited only if we're going to enqueue this.
+ // (In other words, please don't move this up in this method)
+ // This handles the use case:
// delta cas; element is not modified, but at some later point, we determine
// an embedded feature value (array or list) is modified, which requires we serialize out this
// fs as if it was modified.
@@ -607,7 +610,7 @@ class CasSerializerSupport {
XmlElementName newXel = csss.uimaTypeName2XmiElementName(typeName);
if (!needNameSpaces) {
- needNameSpaces = csss.checkForNameCollision(newXel);
+ csss.checkForNameCollision(newXel);
}
typeCode2namespaceNames[typeCode] = newXel;
}
@@ -1013,6 +1016,7 @@ class CasSerializerSupport {
prefix = "noNamespace"; // is correct for older XMI standard too
}
// make sure this prefix hasn't already been used for some other namespace
+ // including out-of-type-system types (for XmiCasSerializer)
if (nsPrefixesUsed.contains(prefix)) {
String basePrefix = prefix;
int num = 2;
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/JsonCasSerializer.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/JsonCasSerializer.java?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/JsonCasSerializer.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/JsonCasSerializer.java Tue Sep 16 18:17:33 2014
@@ -20,11 +20,11 @@
package org.apache.uima.cas.impl;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -36,11 +36,8 @@ import org.apache.uima.cas.Type;
import org.apache.uima.cas.TypeSystem;
import org.apache.uima.cas.impl.CasSerializerSupport.CasDocSerializer;
import org.apache.uima.cas.impl.CasSerializerSupport.CasSerializerSupportSerialize;
-import org.apache.uima.cas.impl.XmiSerializationSharedData.OotsElementData;
import org.apache.uima.cas.impl.XmiSerializationSharedData.XmiArrayElement;
-import org.apache.uima.internal.util.XmlAttribute;
import org.apache.uima.internal.util.XmlElementName;
-import org.apache.uima.internal.util.XmlElementNameAndContents;
import org.apache.uima.util.JsonContentHandlerJacksonWrapper;
import org.xml.sax.ContentHandler;
import org.xml.sax.ErrorHandler;
@@ -98,6 +95,8 @@ public class JsonCasSerializer {
private static final SerializedString FEATURE_REFS_NAME = new SerializedString("@featureRefs");
+ private static final SerializedString FEATURE_BYTE_ARRAY_NAME = new SerializedString("@featureByteArrays");
+
private static final SerializedString SUPER_TYPES_NAME = new SerializedString("@superTypes");
private static final SerializedString JSON_CONTEXT_TAG_LOCAL_NAME = new SerializedString("@context");
@@ -179,7 +178,7 @@ public class JsonCasSerializer {
public enum JsonContextFormat {
omitContext, includeContext,
omitSupertypes, includeSuperTypes,
- omitFeatureRefs, includeFeatureRefs,
+ omitFeatureContext, includeFeatureContext,
omitExpandedTypeNames, includeExpandedTypeNames,
}
@@ -191,7 +190,7 @@ public class JsonCasSerializer {
private boolean isWithContext = true;
private boolean isWithSupertypes = true;
- private boolean isWithFeatureRefs = true;
+ private boolean isWithFeatureContext = true;
private boolean isWithExpandedTypeNames = true;
private boolean isWithViews = true;
private boolean isOmitDefaultValues = true;
@@ -434,12 +433,12 @@ public class JsonCasSerializer {
case omitContext:
isWithContext = false;
isWithSupertypes = false;
- isWithFeatureRefs = false;
+ isWithFeatureContext = false;
isWithExpandedTypeNames = false; break;
case includeContext:
isWithContext = true;
isWithSupertypes = true;
- isWithFeatureRefs = true;
+ isWithFeatureContext = true;
isWithExpandedTypeNames = true; break;
case omitSupertypes:
@@ -449,10 +448,10 @@ public class JsonCasSerializer {
isWithContext = true; break;
- case omitFeatureRefs:
- isWithFeatureRefs = false; break;
- case includeFeatureRefs:
- isWithFeatureRefs = true;
+ case omitFeatureContext:
+ isWithFeatureContext = false; break;
+ case includeFeatureContext:
+ isWithFeatureContext = true;
isWithContext = true; break;
case omitExpandedTypeNames:
@@ -509,7 +508,7 @@ public class JsonCasSerializer {
private final boolean isWithExpandedTypeNames;
- private final boolean isWithFeatureRefs;
+ private final boolean isWithFeatureContext;
private final boolean isWithSupertypes;
@@ -527,12 +526,12 @@ public class JsonCasSerializer {
this.isOmitDefaultValues = JsonCasSerializer.this.isOmitDefaultValues;
boolean tempIsWithContext = JsonCasSerializer.this.isWithContext;
isWithExpandedTypeNames = JsonCasSerializer.this.isWithExpandedTypeNames;
- isWithFeatureRefs = JsonCasSerializer.this.isWithFeatureRefs;
+ isWithFeatureContext = JsonCasSerializer.this.isWithFeatureContext;
isWithSupertypes = JsonCasSerializer.this.isWithSupertypes;
isWithViews = JsonCasSerializer.this.isWithViews;
jch = (JsonContentHandlerJacksonWrapper) ch;
jg = jch.getJsonGenerator();
- isWithContext = (tempIsWithContext && !isWithSupertypes && !isWithFeatureRefs && !isWithExpandedTypeNames) ?
+ isWithContext = (tempIsWithContext && !isWithSupertypes && !isWithFeatureContext && !isWithExpandedTypeNames) ?
false : tempIsWithContext;
isWithContextOrViews = isWithContext || isWithViews;
usedTypeName2XmlElementName = new HashMap<String, XmlElementName>(cds.tsi.getNumberOfTypes());
@@ -691,18 +690,14 @@ public class JsonCasSerializer {
* "@id" : expanded-name-as-IRI,
* "@superTypes" : [xxx, yyy, zzz, uima.cas.TOP],
* "@featureRefs" : [ "featName1", "featName2"],
- * "@featureRefsIfSingle" : [ "featName1", ...] }
+ * "@featureByteArrays" : [ "featName1", "featName2"],
*
* @featureRefs: the named feature values are a number or an array of numbers, all of which
* are to be interpreted as an ID of another serialized Feature Structure (unless 0,
* which is like a null reference)
- * @featureRefsIfSingle: the named feature values, if a single number, are to be interpreted
- * as an ID of another serialized feature (unless 0).
- * If the value is an array, then the array of values is the value of that slot,
- * not (if numbers) references to other Feature Structures.
+ * @featureByteArrays: the named feature values are to be interpreted as base64 encoded byte arrays
*
* superType values are longNames
- * if no featureRefs, omit
* @throws IOException
*/
@@ -725,8 +720,8 @@ public class JsonCasSerializer {
jg.writeFieldName(JSON_ID_ATTR_NAME); // form for using SerializedString
jg.writeString(ti.getName());
}
- if (isWithFeatureRefs) {
- addJsonFeatRefs(ti);
+ if (isWithFeatureContext) {
+ addJsonFeatContext(ti);
}
if (isWithSupertypes) {
addJsonSuperTypes(ti);
@@ -740,13 +735,17 @@ public class JsonCasSerializer {
* Adds the ", @featureRefs" : [ "featName1", "featName2"]
* for features that are being serialized as references.
*
- * @param type the range type of the Feature
+ * Adds the ", @featureByteArrays" : [ "featName1", "featName2"]
+ * for features that are serialized as base64-encoded byte arrays
+ *
+ * @param type the type for which to generate the feature context info
* @throws IOException
*/
- private void addJsonFeatRefs(TypeImpl type) throws IOException {
+ private void addJsonFeatContext(TypeImpl type) throws IOException {
final int typeCode = type.getCode();
final int[] feats = cds.tsi.ll_getAppropriateFeatures(typeCode);
boolean started = false;
+ List<SerializedString> byteArrayFeatures = null;
for (int featCode : feats) {
final int fsClass = cds.classifyType(cds.tsi.range(featCode));
@@ -757,12 +756,35 @@ public class JsonCasSerializer {
jg.writeStartArray();
started = true;
}
- jg.writeString(getSerializedString(cds.tsi.ll_getFeatureForCode(featCode).getShortName()));
- }
+ jg.writeString(getShortFeatureName(featCode));
+ } else if (fsClass == LowLevelCAS.TYPE_CLASS_BYTEARRAY) {
+ if (byteArrayFeatures == null) {
+ byteArrayFeatures = new ArrayList<SerializedString>();
+ }
+ byteArrayFeatures.add(getShortFeatureName(featCode));
+ }
+
}
if (started) {
jg.writeEndArray();
- }
+ }
+ if (byteArrayFeatures != null) {
+ jch.writeNlJustBeforeNext();
+ jg.writeFieldName(FEATURE_BYTE_ARRAY_NAME);
+ jg.writeStartArray();
+ for (SerializedString ss : byteArrayFeatures) {
+ jg.writeString(ss);
+ }
+ jg.writeEndArray();
+ }
+ }
+
+ private SerializedString getShortFeatureName(int featCode) {
+ return getSerializedString(cds.tsi.ll_getFeatureForCode(featCode).getShortName());
+ }
+
+ private boolean isMultRef(int featCode) {
+ return cds.tsi.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed();
}
/**
@@ -800,7 +822,7 @@ public class JsonCasSerializer {
private SerializedString getSerializedTypeName(int typeCode) {
XmlElementName xe = cds.typeCode2namespaceNames[typeCode];
- return getSerializedString(cds.needNameSpaces ? xe.qName : xe.localName);
+ return getSerializedString(xe.qName);
}
private SerializedString getSerializedString(String s) {
@@ -816,18 +838,20 @@ public class JsonCasSerializer {
protected void enqueueNonsharedMultivaluedFS() {}
- protected boolean checkForNameCollision(XmlElementName xmlElementName) {
+ protected void checkForNameCollision(XmlElementName xmlElementName) {
XmlElementName xel = usedTypeName2XmlElementName.get(xmlElementName.localName);
if (xel != null) {
- if (xel.nsUri.equals(xmlElementName.nsUri)) {
- return false; // don't need name spaces yet
+ if (xel.nsUri.equals(xmlElementName.nsUri)) { // nsUri is the fully qualified name
+ return; // don't need name spaces yet
} else {
- usedTypeName2XmlElementName.clear(); // not needed anymore
- return true; // collision - need name space
+ addNameSpace(xel);
+ addNameSpace(xmlElementName);
+// usedTypeName2XmlElementName.clear(); // not needed anymore
+ return;
}
}
usedTypeName2XmlElementName.put(xmlElementName.localName, xmlElementName);
- return false;
+ return;
}
protected void writeFsStart(int addr, int typeCode) throws IOException {
@@ -893,12 +917,12 @@ public class JsonCasSerializer {
}
}
- final String featName = cds.tsi.ll_getFeatureForCode(featCode).getShortName();
+ final SerializedString serializedFeatName = getShortFeatureName(featCode);
final int featAddr = addr + cds.cas.getFeatureOffset(featCode);
final int featValRaw = cds.cas.getHeapValue(featAddr);
final int featureClass = cds.classifyType(cds.tsi.range(featCode));
-// jg.writeFieldName(getSerializedString(featName)); // not done here, because if null feat can be omitted
+// jg.writeFieldName(featName); // not done here, because if null feat can be omitted
switch (featureClass) {
@@ -906,45 +930,45 @@ public class JsonCasSerializer {
case LowLevelCAS.TYPE_CLASS_SHORT:
case LowLevelCAS.TYPE_CLASS_INT:
if (featValRaw == 0 && isOmitDefaultValues) continue;
- jg.writeFieldName(getSerializedString(featName));
+ jg.writeFieldName(serializedFeatName);
jg.writeNumber(featValRaw);
break;
case LowLevelCAS.TYPE_CLASS_FS:
if (featValRaw == 0/* && isOmitDefaultValues*/) continue;
- jg.writeFieldName(getSerializedString(featName));
+ jg.writeFieldName(serializedFeatName);
jg.writeNumber(cds.getXmiIdAsInt(featValRaw));
break;
case LowLevelCAS.TYPE_CLASS_LONG:
final long longVal = cds.cas.ll_getLongValue(featValRaw);
if (longVal == 0L && isOmitDefaultValues) continue;
- jg.writeFieldName(getSerializedString(featName));
+ jg.writeFieldName(serializedFeatName);
jg.writeNumber(longVal);
break;
case LowLevelCAS.TYPE_CLASS_FLOAT:
final float floatVal = CASImpl.int2float(featValRaw);
if (floatVal == 0.F && isOmitDefaultValues) continue;
- jg.writeFieldName(getSerializedString(featName));
+ jg.writeFieldName(serializedFeatName);
jg.writeNumber(floatVal);
break;
case LowLevelCAS.TYPE_CLASS_DOUBLE:
final double doubleVal = cds.cas.ll_getDoubleValue(addr, featCode);
if (doubleVal == 0L && isOmitDefaultValues) continue;
- jg.writeFieldName(getSerializedString(featName));
+ jg.writeFieldName(serializedFeatName);
jg.writeNumber(doubleVal);
break;
case LowLevelCAS.TYPE_CLASS_BOOLEAN:
- jg.writeFieldName(getSerializedString(featName));
+ jg.writeFieldName(serializedFeatName);
jg.writeBoolean(cds.cas.ll_getBooleanValue(addr, featCode));
break;
case LowLevelCAS.TYPE_CLASS_STRING:
if (featValRaw == 0 /*&& isOmitDefaultValues*/) continue;
- jg.writeFieldName(getSerializedString(featName));
+ jg.writeFieldName(serializedFeatName);
jg.writeString(cds.cas.getStringForCode(featValRaw));
break;
@@ -952,7 +976,7 @@ public class JsonCasSerializer {
default:
if (featValRaw != CASImpl.NULL /*|| !isOmitDefaultValues*/) {
- jg.writeFieldName(getSerializedString(featName));
+ jg.writeFieldName(serializedFeatName);
if (featureClass == LowLevelCAS.TYPE_CLASS_INTARRAY ||
featureClass == LowLevelCAS.TYPE_CLASS_FLOATARRAY ||
@@ -964,7 +988,7 @@ public class JsonCasSerializer {
featureClass == LowLevelCAS.TYPE_CLASS_STRINGARRAY ||
featureClass == LowLevelCAS.TYPE_CLASS_FSARRAY) {
- if (cds.tsi.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed()) {
+ if (isMultRef(featCode)) {
jg.writeNumber(cds.getXmiIdAsInt(featValRaw));
} else {
writeJsonArrayValues(featValRaw, featureClass);
@@ -975,7 +999,7 @@ public class JsonCasSerializer {
featureClass == CasSerializerSupport.TYPE_CLASS_STRINGLIST ||
featureClass == CasSerializerSupport.TYPE_CLASS_FSLIST) {
- if (isListAsFSs || cds.tsi.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed()) {
+ if (isListAsFSs || isMultRef(featCode)) {
jg.writeNumber(cds.getXmiIdAsInt(featValRaw));
} else {
writeJsonListValues(featValRaw);
@@ -1011,54 +1035,10 @@ public class JsonCasSerializer {
final int size = cds.cas.ll_getArraySize(addr);
- jg.writeStartArray();
- int pos = cds.cas.getArrayStartAddress(addr);
-
- if (arrayType == LowLevelCAS.TYPE_CLASS_FSARRAY) {
-
- List<XmiArrayElement> ootsArrayElementsList = cds.sharedData == null ? null :
- cds.sharedData.getOutOfTypeSystemArrayElements(addr);
- int ootsIndex = 0;
-
- for (int j = 0; j < size; j++) { // j used to id the oots things
- int heapValue = cds.cas.getHeapValue(pos++);
-
- if (heapValue == CASImpl.NULL) {
- // this null array element might have been a reference to an
- // out-of-typesystem FS, which, when deserialized, was replaced with NULL,
- // so check the ootsArrayElementsList
- boolean found = false;
- if (ootsArrayElementsList != null) {
-
- while (ootsIndex < ootsArrayElementsList.size()) {
- XmiArrayElement arel = ootsArrayElementsList.get(ootsIndex++);
- if (arel.index == j) {
- jg.writeNumber(Integer.parseInt(arel.xmiId));
- found = true;
- break;
- }
- }
- }
- if (!found) {
- jg.writeNumber(0);
- }
-
- // else, not null FS ref
- } else {
- if (cds.isFiltering) { // return as null any references to types not in target TS
- String typeName = cds.tsi.ll_getTypeForCode(cds.cas.getHeapValue(addr)).getName();
- if (cds.filterTypeSystem.getType(typeName) == null) {
- heapValue = CASImpl.NULL;
- }
- }
- jg.writeNumber(cds.getXmiIdAsInt(heapValue));
- }
- } // end of loop over all refs in FS array
-
- } else if (arrayType == LowLevelCAS.TYPE_CLASS_BYTEARRAY) {
+ if (arrayType == LowLevelCAS.TYPE_CLASS_BYTEARRAY) {
// special case for byte arrays:
// serialize using standard JACKSON/JSON binary serialization
- // lazy - doing extra copy to avoid figuring out the impl details
+ // (doing extra copy to avoid figuring out the impl details)
ByteArrayFS byteArrayFS = new ByteArrayFSImpl(addr, cds.cas);
int length = byteArrayFS.size();
byte[] byteArray = new byte[length];
@@ -1067,27 +1047,73 @@ public class JsonCasSerializer {
jg.writeBinary(byteArray);
} else {
- for (int i = 0; i < size; i++) {
- if (arrayType == LowLevelCAS.TYPE_CLASS_BOOLEANARRAY) {
- jg.writeBoolean(cds.cas.ll_getBooleanArrayValue(addr, i));
- } else if (arrayType == LowLevelCAS.TYPE_CLASS_STRINGARRAY) {
- jg.writeString(cds.cas.ll_getStringArrayValue(addr, i));
-// } else if (arrayType == LowLevelCAS.TYPE_CLASS_BYTEARRAY) {
-// jg.writeNumber(cds.cas.ll_getByteArrayValue(addr, i));
- } else if (arrayType == LowLevelCAS.TYPE_CLASS_SHORTARRAY) {
- jg.writeNumber(cds.cas.ll_getShortArrayValue(addr, i));
- } else if (arrayType == LowLevelCAS.TYPE_CLASS_INTARRAY) {
- jg.writeNumber(cds.cas.ll_getIntArrayValue(addr, i));
- } else if (arrayType == LowLevelCAS.TYPE_CLASS_LONGARRAY) {
- jg.writeNumber(cds.cas.ll_getLongArrayValue(addr, i));
- } else if (arrayType == LowLevelCAS.TYPE_CLASS_FLOATARRAY) {
- jg.writeNumber(cds.cas.ll_getFloatArrayValue(addr, i));
- } else {
- jg.writeNumber(cds.cas.ll_getDoubleArrayValue(addr, i));
+ jg.writeStartArray();
+ int pos = cds.cas.getArrayStartAddress(addr);
+
+ if (arrayType == LowLevelCAS.TYPE_CLASS_FSARRAY) {
+
+ List<XmiArrayElement> ootsArrayElementsList = cds.sharedData == null ? null :
+ cds.sharedData.getOutOfTypeSystemArrayElements(addr);
+ int ootsIndex = 0;
+
+ for (int j = 0; j < size; j++) { // j used to id the oots things
+ int heapValue = cds.cas.getHeapValue(pos++);
+
+ if (heapValue == CASImpl.NULL) {
+ // this null array element might have been a reference to an
+ // out-of-typesystem FS, which, when deserialized, was replaced with NULL,
+ // so check the ootsArrayElementsList
+ boolean found = false;
+ if (ootsArrayElementsList != null) {
+
+ while (ootsIndex < ootsArrayElementsList.size()) {
+ XmiArrayElement arel = ootsArrayElementsList.get(ootsIndex++);
+ if (arel.index == j) {
+ jg.writeNumber(Integer.parseInt(arel.xmiId));
+ found = true;
+ break;
+ }
+ }
+ }
+ if (!found) {
+ jg.writeNumber(0);
+ }
+
+ // else, not null FS ref
+ } else {
+ if (cds.isFiltering) { // return as null any references to types not in target TS
+ String typeName = cds.tsi.ll_getTypeForCode(cds.cas.getHeapValue(addr)).getName();
+ if (cds.filterTypeSystem.getType(typeName) == null) {
+ heapValue = CASImpl.NULL;
+ }
+ }
+ jg.writeNumber(cds.getXmiIdAsInt(heapValue));
+ }
+ } // end of loop over all refs in FS array
+
+ } else {
+ for (int i = 0; i < size; i++) {
+ if (arrayType == LowLevelCAS.TYPE_CLASS_BOOLEANARRAY) {
+ jg.writeBoolean(cds.cas.ll_getBooleanArrayValue(addr, i));
+ } else if (arrayType == LowLevelCAS.TYPE_CLASS_STRINGARRAY) {
+ jg.writeString(cds.cas.ll_getStringArrayValue(addr, i));
+ // } else if (arrayType == LowLevelCAS.TYPE_CLASS_BYTEARRAY) {
+ // jg.writeNumber(cds.cas.ll_getByteArrayValue(addr, i));
+ } else if (arrayType == LowLevelCAS.TYPE_CLASS_SHORTARRAY) {
+ jg.writeNumber(cds.cas.ll_getShortArrayValue(addr, i));
+ } else if (arrayType == LowLevelCAS.TYPE_CLASS_INTARRAY) {
+ jg.writeNumber(cds.cas.ll_getIntArrayValue(addr, i));
+ } else if (arrayType == LowLevelCAS.TYPE_CLASS_LONGARRAY) {
+ jg.writeNumber(cds.cas.ll_getLongArrayValue(addr, i));
+ } else if (arrayType == LowLevelCAS.TYPE_CLASS_FLOATARRAY) {
+ jg.writeNumber(cds.cas.ll_getFloatArrayValue(addr, i));
+ } else {
+ jg.writeNumber(cds.cas.ll_getDoubleArrayValue(addr, i));
+ }
}
}
+ jg.writeEndArray();
}
- jg.writeEndArray();
}
// a null ref is written as null
@@ -1173,7 +1199,7 @@ public class JsonCasSerializer {
case CasSerializerSupport.TYPE_CLASS_STRINGLIST:
// we have refs only if the feature has
// multipleReferencesAllowed = true
- return cds.tsi.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed();
+ return isMultRef(featCode);
default: // for primitives
return false;
@@ -1181,7 +1207,7 @@ public class JsonCasSerializer {
}
/**
- * Converts a UIMA-style dotted type name to the element name that should be used in the XMI
+ * Converts a UIMA-style dotted type name to the element name that should be used in the
* serialization. The XMI element name consists of three parts - the Namespace URI, the Local
* Name, and the QName (qualified name).
*
@@ -1201,10 +1227,24 @@ public class JsonCasSerializer {
// convert short name to shared string, without interning, reduce GCs
shortName = cds.getUniqueString(shortName);
- // determine what namespace prefix to use
- String prefix = cds.getNameSpacePrefix(uimaTypeName, uimaTypeName, lastDotIndex);
-
- return new XmlElementName(uimaTypeName, shortName, cds.getUniqueString(prefix + ':' + shortName));
+ return new XmlElementName(uimaTypeName, shortName, shortName); // use short name for qname until namespaces needed
+ }
+
+ /**
+ * Called to generate a new namespace prefix and add it to this element - due to a collision
+ * @param xmlElementName
+ */
+ protected void addNameSpace(XmlElementName xmlElementName) {
+ if (xmlElementName.qName.equals(xmlElementName.localName)) { // may have already had namespace added
+ // split uima type name into namespace and short name
+ String uimaTypeName = xmlElementName.nsUri;
+ String shortName = xmlElementName.localName;
+ final int lastDotIndex = uimaTypeName.lastIndexOf('.');
+
+ // determine what namespace prefix to use
+ String prefix = cds.getNameSpacePrefix(uimaTypeName, uimaTypeName, lastDotIndex);
+ xmlElementName.qName = cds.getUniqueString(prefix + ':' + shortName);
+ }
}
}
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XmiCasSerializer.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XmiCasSerializer.java?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XmiCasSerializer.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/XmiCasSerializer.java Tue Sep 16 18:17:33 2014
@@ -1207,10 +1207,12 @@ public class XmiCasSerializer {
ch.characters(text.toCharArray(), 0, text.length());
}
- protected boolean checkForNameCollision(XmlElementName xmlElementName) {
- return true; // xmi always does namespaces
- }
-
+ @Override
+ protected void checkForNameCollision(XmlElementName xmlElementName) {}
+
+ @Override
+ protected void addNameSpace(XmlElementName xmlElementName) {};
+
protected void writeFsStart(int addr, int typeCode /* ignored */) {
workAttrs.clear();
addAttribute(workAttrs, ID_ATTR_NAME, cds.getXmiId(addr));
@@ -1261,7 +1263,7 @@ public class XmiCasSerializer {
return new XmlElementName(nsUri, shortName, cds.getUniqueString(prefix + ':' + shortName));
}
- protected void writeEndOfIndividualFs() {};
+ protected void writeEndOfIndividualFs() {}
}
// // for testing
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/internal/util/XmlElementName.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/internal/util/XmlElementName.java?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/internal/util/XmlElementName.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/internal/util/XmlElementName.java Tue Sep 16 18:17:33 2014
@@ -30,9 +30,9 @@ public class XmlElementName {
this.qName = qName;
}
- public String nsUri;
+ public String nsUri; // the URI for the type name, or (JSON) the fully-qualified type name
- public String localName;
+ public String localName; // the type name without any package prefix
- public String qName;
+ public String qName; // the type name with its namespace, written as name_space_name:short_type_name
}
\ No newline at end of file
Modified: uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/JsonCasSerializerTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/JsonCasSerializerTest.java?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/JsonCasSerializerTest.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/JsonCasSerializerTest.java Tue Sep 16 18:17:33 2014
@@ -138,7 +138,7 @@ public class JsonCasSerializerTest exten
compareWithExpected("topNoContextNoViews.txt", r);
cas.reset();
- jcs.setJsonContext(JsonContextFormat.includeFeatureRefs);
+ jcs.setJsonContext(JsonContextFormat.includeFeatureContext);
jcs.setJsonContext(JsonContextFormat.includeSuperTypes);
cas.addFsToIndexes(cas.createFS(topType));
r = serialize();
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValues.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValues.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValues.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValues.txt Tue Sep 16 18:17:33 2014
@@ -2,6 +2,7 @@
"AllTypes" : {
"@id" : "org.apache.uima.test.AllTypes",
"@featureRefs" : ["sofa", "aFS", "aArrayMrBoolean", "aArrayMrByte", "aArrayMrShort", "aArrayMrString", "aListMrInteger", "aListMrString", "aListFs", "aListMrFs" ],
+ "@featureByteArrays" : ["aArrayByte" ],
"@superTypes" : ["uima.tcas.Annotation", "uima.cas.AnnotationBase", "uima.cas.TOP" ] },
"BooleanArray" : {
"@id" : "uima.cas.BooleanArray",
@@ -21,10 +22,10 @@
"@superTypes" : ["uima.cas.FSArray" ] } },
"@cas_feature_structures" : {
"28" : {"@id" : 28, "@type" : "Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" },
- "1" : {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aInteger" : 0, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : ["AAA=" ], "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ "1" : {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aInteger" : 0, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : "AAA=", "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
"35" : {"@id" : 35, "@type" : "AllTypes", "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : false, "aByte" : 0, "aShort" : 0, "aInteger" : 0, "aLong" : 0, "aFloat" : 0.0, "aDouble" : 0.0 },
"74" : {"@id" : 74, "@type" : "BooleanArray", "@collection" : [false ] },
- "77" : {"@id" : 77, "@type" : "ByteArray", "@collection" : ["AAA=" ] },
+ "77" : {"@id" : 77, "@type" : "ByteArray", "@collection" : "AAA=" },
"80" : {"@id" : 80, "@type" : "ShortArray", "@collection" : [ ] },
"83" : {"@id" : 83, "@type" : "StringArray", "@collection" : [null ] } },
"@cas_views" : {
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesByType.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesByType.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesByType.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesByType.txt Tue Sep 16 18:17:33 2014
@@ -2,6 +2,7 @@
"AllTypes" : {
"@id" : "org.apache.uima.test.AllTypes",
"@featureRefs" : ["sofa", "aFS", "aArrayMrBoolean", "aArrayMrByte", "aArrayMrShort", "aArrayMrString", "aListMrInteger", "aListMrString", "aListFs", "aListMrFs" ],
+ "@featureByteArrays" : ["aArrayByte" ],
"@superTypes" : ["uima.tcas.Annotation", "uima.cas.AnnotationBase", "uima.cas.TOP" ] },
"BooleanArray" : {
"@id" : "uima.cas.BooleanArray",
@@ -25,13 +26,13 @@
"BooleanArray" : [
{"@id" : 74, "@type" : "BooleanArray", "@collection" : [false ] } ],
"ByteArray" : [
- {"@id" : 77, "@type" : "ByteArray", "@collection" : ["AAA=" ] } ],
+ {"@id" : 77, "@type" : "ByteArray", "@collection" : "AAA=" } ],
"ShortArray" : [
{"@id" : 80, "@type" : "ShortArray", "@collection" : [ ] } ],
"Sofa" : [
{"@id" : 28, "@type" : "Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" } ],
"AllTypes" : [
- {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aInteger" : 0, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : ["AAA=" ], "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aInteger" : 0, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : "AAA=", "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
{"@id" : 35, "@type" : "AllTypes", "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : false, "aByte" : 0, "aShort" : 0, "aInteger" : 0, "aLong" : 0, "aFloat" : 0.0, "aDouble" : 0.0 } ] },
"@cas_views" : {
"28" : [1 ] } }
\ No newline at end of file
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesByTypeOmits.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesByTypeOmits.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesByTypeOmits.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesByTypeOmits.txt Tue Sep 16 18:17:33 2014
@@ -2,6 +2,7 @@
"AllTypes" : {
"@id" : "org.apache.uima.test.AllTypes",
"@featureRefs" : ["sofa", "aFS", "aArrayMrBoolean", "aArrayMrByte", "aArrayMrShort", "aArrayMrString", "aListMrInteger", "aListMrString", "aListFs", "aListMrFs" ],
+ "@featureByteArrays" : ["aArrayByte" ],
"@superTypes" : ["uima.tcas.Annotation", "uima.cas.AnnotationBase", "uima.cas.TOP" ] },
"BooleanArray" : {
"@id" : "uima.cas.BooleanArray",
@@ -25,13 +26,13 @@
"BooleanArray" : [
{"@id" : 74, "@type" : "BooleanArray", "@collection" : [false ] } ],
"ByteArray" : [
- {"@id" : 77, "@type" : "ByteArray", "@collection" : ["AAA=" ] } ],
+ {"@id" : 77, "@type" : "ByteArray", "@collection" : "AAA=" } ],
"ShortArray" : [
{"@id" : 80, "@type" : "ShortArray", "@collection" : [ ] } ],
"Sofa" : [
{"@id" : 28, "@type" : "Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" } ],
"AllTypes" : [
- {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : ["AAA=" ], "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : "AAA=", "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
{"@id" : 35, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false } ] },
"@cas_views" : {
"28" : [1 ] } }
\ No newline at end of file
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoIDNoTypes.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoIDNoTypes.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoIDNoTypes.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoIDNoTypes.txt Tue Sep 16 18:17:33 2014
@@ -2,6 +2,7 @@
"AllTypes" : {
"@id" : "org.apache.uima.test.AllTypes",
"@featureRefs" : ["sofa", "aFS", "aArrayMrBoolean", "aArrayMrByte", "aArrayMrShort", "aArrayMrString", "aListMrInteger", "aListMrString", "aListFs", "aListMrFs" ],
+ "@featureByteArrays" : ["aArrayByte" ],
"@superTypes" : ["uima.tcas.Annotation", "uima.cas.AnnotationBase", "uima.cas.TOP" ] },
"BooleanArray" : {
"@id" : "uima.cas.BooleanArray",
@@ -21,10 +22,10 @@
"@superTypes" : ["uima.cas.FSArray" ] } },
"@cas_feature_structures" : {
"28" : {"sofaNum" : 1, "sofaID" : "_InitialView" },
- "1" : {"sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aInteger" : 0, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : ["AAA=" ], "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ "1" : {"sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aInteger" : 0, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : "AAA=", "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
"35" : {"sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : false, "aByte" : 0, "aShort" : 0, "aInteger" : 0, "aLong" : 0, "aFloat" : 0.0, "aDouble" : 0.0 },
"74" : {"@collection" : [false ] },
- "77" : {"@collection" : ["AAA=" ] },
+ "77" : {"@collection" : "AAA=" },
"80" : {"@collection" : [ ] },
"83" : {"@collection" : [null ] } },
"@cas_views" : {
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoIDs.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoIDs.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoIDs.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoIDs.txt Tue Sep 16 18:17:33 2014
@@ -2,6 +2,7 @@
"AllTypes" : {
"@id" : "org.apache.uima.test.AllTypes",
"@featureRefs" : ["sofa", "aFS", "aArrayMrBoolean", "aArrayMrByte", "aArrayMrShort", "aArrayMrString", "aListMrInteger", "aListMrString", "aListFs", "aListMrFs" ],
+ "@featureByteArrays" : ["aArrayByte" ],
"@superTypes" : ["uima.tcas.Annotation", "uima.cas.AnnotationBase", "uima.cas.TOP" ] },
"BooleanArray" : {
"@id" : "uima.cas.BooleanArray",
@@ -21,10 +22,10 @@
"@superTypes" : ["uima.cas.FSArray" ] } },
"@cas_feature_structures" : {
"28" : {"@type" : "Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" },
- "1" : {"@type" : "AllTypes", "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aInteger" : 0, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : ["AAA=" ], "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ "1" : {"@type" : "AllTypes", "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aInteger" : 0, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : "AAA=", "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
"35" : {"@type" : "AllTypes", "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : false, "aByte" : 0, "aShort" : 0, "aInteger" : 0, "aLong" : 0, "aFloat" : 0.0, "aDouble" : 0.0 },
"74" : {"@type" : "BooleanArray", "@collection" : [false ] },
- "77" : {"@type" : "ByteArray", "@collection" : ["AAA=" ] },
+ "77" : {"@type" : "ByteArray", "@collection" : "AAA=" },
"80" : {"@type" : "ShortArray", "@collection" : [ ] },
"83" : {"@type" : "StringArray", "@collection" : [null ] } },
"@cas_views" : {
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoTypes.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoTypes.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoTypes.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesNoTypes.txt Tue Sep 16 18:17:33 2014
@@ -2,6 +2,7 @@
"AllTypes" : {
"@id" : "org.apache.uima.test.AllTypes",
"@featureRefs" : ["sofa", "aFS", "aArrayMrBoolean", "aArrayMrByte", "aArrayMrShort", "aArrayMrString", "aListMrInteger", "aListMrString", "aListFs", "aListMrFs" ],
+ "@featureByteArrays" : ["aArrayByte" ],
"@superTypes" : ["uima.tcas.Annotation", "uima.cas.AnnotationBase", "uima.cas.TOP" ] },
"BooleanArray" : {
"@id" : "uima.cas.BooleanArray",
@@ -21,10 +22,10 @@
"@superTypes" : ["uima.cas.FSArray" ] } },
"@cas_feature_structures" : {
"28" : {"@id" : 28, "sofaNum" : 1, "sofaID" : "_InitialView" },
- "1" : {"@id" : 1, "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aInteger" : 0, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : ["AAA=" ], "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ "1" : {"@id" : 1, "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aInteger" : 0, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : "AAA=", "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
"35" : {"@id" : 35, "sofa" : 28, "begin" : 0, "end" : 0, "aBoolean" : false, "aByte" : 0, "aShort" : 0, "aInteger" : 0, "aLong" : 0, "aFloat" : 0.0, "aDouble" : 0.0 },
"74" : {"@id" : 74, "@collection" : [false ] },
- "77" : {"@id" : 77, "@collection" : ["AAA=" ] },
+ "77" : {"@id" : 77, "@collection" : "AAA=" },
"80" : {"@id" : 80, "@collection" : [ ] },
"83" : {"@id" : 83, "@collection" : [null ] } },
"@cas_views" : {
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesOmits.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesOmits.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesOmits.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/allValuesOmits.txt Tue Sep 16 18:17:33 2014
@@ -2,6 +2,7 @@
"AllTypes" : {
"@id" : "org.apache.uima.test.AllTypes",
"@featureRefs" : ["sofa", "aFS", "aArrayMrBoolean", "aArrayMrByte", "aArrayMrShort", "aArrayMrString", "aListMrInteger", "aListMrString", "aListFs", "aListMrFs" ],
+ "@featureByteArrays" : ["aArrayByte" ],
"@superTypes" : ["uima.tcas.Annotation", "uima.cas.AnnotationBase", "uima.cas.TOP" ] },
"BooleanArray" : {
"@id" : "uima.cas.BooleanArray",
@@ -21,10 +22,10 @@
"@superTypes" : ["uima.cas.FSArray" ] } },
"@cas_feature_structures" : [
{"@id" : 28, "@type" : "Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" },
- {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : ["AAA=" ], "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : "AAA=", "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
{"@id" : 35, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false },
{"@id" : 74, "@type" : "BooleanArray", "@collection" : [false ] },
- {"@id" : 77, "@type" : "ByteArray", "@collection" : ["AAA=" ] },
+ {"@id" : 77, "@type" : "ByteArray", "@collection" : "AAA=" },
{"@id" : 80, "@type" : "ShortArray", "@collection" : [ ] },
{"@id" : 83, "@type" : "StringArray", "@collection" : [null ] } ],
"@cas_views" : {
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/delta.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/delta.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/delta.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/delta.txt Tue Sep 16 18:17:33 2014
@@ -2,6 +2,7 @@
"AllTypes" : {
"@id" : "org.apache.uima.test.AllTypes",
"@featureRefs" : ["sofa", "aFS", "aArrayMrBoolean", "aArrayMrByte", "aArrayMrShort", "aArrayMrString", "aListMrInteger", "aListMrString", "aListFs", "aListMrFs" ],
+ "@featureByteArrays" : ["aArrayByte" ],
"@superTypes" : ["uima.tcas.Annotation", "uima.cas.AnnotationBase", "uima.cas.TOP" ] },
"BooleanArray" : {
"@id" : "uima.cas.BooleanArray",
@@ -21,16 +22,16 @@
"@superTypes" : ["uima.cas.FSArray" ] } },
"@cas_feature_structures" : [
{"@id" : 28, "@type" : "Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" },
- {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : ["AAA=" ], "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
- {"@id" : 95, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false, "aInteger" : 1, "aLong" : 4321, "aFloat" : "NaN", "aDouble" : "-Infinity", "aString" : "some \"String\"", "aFS" : 122, "aArrayBoolean" : [ ], "aArrayMrBoolean" : 160, "aArrayMrByte" : 163, "aArrayByte" : ["" ], "aArrayShort" : [0, 0 ], "aArrayMrShort" : 166, "aArrayString" : [ ], "aArrayMrString" : 169, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 74, "aArrayMrByte" : 77, "aArrayByte" : "AAA=", "aArrayShort" : [ ], "aArrayMrShort" : 80, "aArrayString" : [null ], "aArrayMrString" : 83, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ {"@id" : 95, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false, "aInteger" : 1, "aLong" : 4321, "aFloat" : "NaN", "aDouble" : "-Infinity", "aString" : "some \"String\"", "aFS" : 122, "aArrayBoolean" : [ ], "aArrayMrBoolean" : 160, "aArrayMrByte" : 163, "aArrayByte" : "", "aArrayShort" : [0, 0 ], "aArrayMrShort" : 166, "aArrayString" : [ ], "aArrayMrString" : 169, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
{"@id" : 35, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false },
{"@id" : 74, "@type" : "BooleanArray", "@collection" : [false ] },
- {"@id" : 77, "@type" : "ByteArray", "@collection" : ["AAA=" ] },
+ {"@id" : 77, "@type" : "ByteArray", "@collection" : "AAA=" },
{"@id" : 80, "@type" : "ShortArray", "@collection" : [ ] },
{"@id" : 83, "@type" : "StringArray", "@collection" : [null ] },
{"@id" : 122, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false },
{"@id" : 160, "@type" : "BooleanArray", "@collection" : [false ] },
- {"@id" : 163, "@type" : "ByteArray", "@collection" : ["AAA=" ] },
+ {"@id" : 163, "@type" : "ByteArray", "@collection" : "AAA=" },
{"@id" : 166, "@type" : "ShortArray", "@collection" : [ ] },
{"@id" : 169, "@type" : "StringArray", "@collection" : [null ] } ],
"@cas_views" : {
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/delta2.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/delta2.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/delta2.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/delta2.txt Tue Sep 16 18:17:33 2014
@@ -2,6 +2,7 @@
"AllTypes" : {
"@id" : "org.apache.uima.test.AllTypes",
"@featureRefs" : ["sofa", "aFS", "aArrayMrBoolean", "aArrayMrByte", "aArrayMrShort", "aArrayMrString", "aListMrInteger", "aListMrString", "aListFs", "aListMrFs" ],
+ "@featureByteArrays" : ["aArrayByte" ],
"@superTypes" : ["uima.tcas.Annotation", "uima.cas.AnnotationBase", "uima.cas.TOP" ] },
"BooleanArray" : {
"@id" : "uima.cas.BooleanArray",
@@ -16,10 +17,10 @@
"@id" : "uima.cas.StringArray",
"@superTypes" : ["uima.cas.FSArray" ] } },
"@cas_feature_structures" : [
- {"@id" : 95, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false, "aInteger" : 1, "aLong" : 4321, "aFloat" : "NaN", "aDouble" : "-Infinity", "aString" : "some \"String\"", "aFS" : 122, "aArrayBoolean" : [ ], "aArrayMrBoolean" : 160, "aArrayMrByte" : 163, "aArrayByte" : ["" ], "aArrayShort" : [0, 0 ], "aArrayMrShort" : 166, "aArrayString" : [ ], "aArrayMrString" : 169, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ {"@id" : 95, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false, "aInteger" : 1, "aLong" : 4321, "aFloat" : "NaN", "aDouble" : "-Infinity", "aString" : "some \"String\"", "aFS" : 122, "aArrayBoolean" : [ ], "aArrayMrBoolean" : 160, "aArrayMrByte" : 163, "aArrayByte" : "", "aArrayShort" : [0, 0 ], "aArrayMrShort" : 166, "aArrayString" : [ ], "aArrayMrString" : 169, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
{"@id" : 122, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false },
{"@id" : 160, "@type" : "BooleanArray", "@collection" : [false ] },
- {"@id" : 163, "@type" : "ByteArray", "@collection" : ["AAA=" ] },
+ {"@id" : 163, "@type" : "ByteArray", "@collection" : "AAA=" },
{"@id" : 166, "@type" : "ShortArray", "@collection" : [ ] },
{"@id" : 169, "@type" : "StringArray", "@collection" : [null ] } ],
"@cas_views" : {
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/multipleViews.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/multipleViews.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/multipleViews.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/multipleViews.txt Tue Sep 16 18:17:33 2014
@@ -2,6 +2,7 @@
"AllTypes" : {
"@id" : "org.apache.uima.test.AllTypes",
"@featureRefs" : ["sofa", "aFS", "aArrayMrBoolean", "aArrayMrByte", "aArrayMrShort", "aArrayMrString", "aListMrInteger", "aListMrString", "aListFs", "aListMrFs" ],
+ "@featureByteArrays" : ["aArrayByte" ],
"@superTypes" : ["uima.tcas.Annotation", "uima.cas.AnnotationBase", "uima.cas.TOP" ] },
"BooleanArray" : {
"@id" : "uima.cas.BooleanArray",
@@ -22,16 +23,16 @@
"@cas_feature_structures" : [
{"@id" : 28, "@type" : "Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" },
{"@id" : 94, "@type" : "Sofa", "sofaNum" : 2, "sofaID" : "View2" },
- {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false, "aInteger" : 1, "aLong" : 4321, "aFloat" : "NaN", "aDouble" : "-Infinity", "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [ ], "aArrayMrBoolean" : 73, "aArrayMrByte" : 76, "aArrayByte" : ["" ], "aArrayShort" : [0, 0 ], "aArrayMrShort" : 79, "aArrayString" : [ ], "aArrayMrString" : 82, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
- {"@id" : 101, "@type" : "AllTypes", "sofa" : 94, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 128, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 167, "aArrayMrByte" : 170, "aArrayByte" : ["AAA=" ], "aArrayShort" : [ ], "aArrayMrShort" : 173, "aArrayString" : [null ], "aArrayMrString" : 176, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ {"@id" : 1, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false, "aInteger" : 1, "aLong" : 4321, "aFloat" : "NaN", "aDouble" : "-Infinity", "aString" : "some \"String\"", "aFS" : 35, "aArrayBoolean" : [ ], "aArrayMrBoolean" : 73, "aArrayMrByte" : 76, "aArrayByte" : "", "aArrayShort" : [0, 0 ], "aArrayMrShort" : 79, "aArrayString" : [ ], "aArrayMrString" : 82, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
+ {"@id" : 101, "@type" : "AllTypes", "sofa" : 94, "aBoolean" : true, "aByte" : -117, "aShort" : -112, "aLong" : 1234, "aFloat" : 1.3, "aDouble" : 2.6, "aString" : "some \"String\"", "aFS" : 128, "aArrayBoolean" : [false ], "aArrayMrBoolean" : 167, "aArrayMrByte" : 170, "aArrayByte" : "AAA=", "aArrayShort" : [ ], "aArrayMrShort" : 173, "aArrayString" : [null ], "aArrayMrString" : 176, "aListInteger" : [ ], "aListString" : ["testStr" ], "aListFs" : [0 ] },
{"@id" : 35, "@type" : "AllTypes", "sofa" : 28, "aBoolean" : false },
{"@id" : 73, "@type" : "BooleanArray", "@collection" : [false ] },
- {"@id" : 76, "@type" : "ByteArray", "@collection" : ["AAA=" ] },
+ {"@id" : 76, "@type" : "ByteArray", "@collection" : "AAA=" },
{"@id" : 79, "@type" : "ShortArray", "@collection" : [ ] },
{"@id" : 82, "@type" : "StringArray", "@collection" : [null ] },
{"@id" : 128, "@type" : "AllTypes", "sofa" : 94, "aBoolean" : false },
{"@id" : 167, "@type" : "BooleanArray", "@collection" : [false ] },
- {"@id" : 170, "@type" : "ByteArray", "@collection" : ["AAA=" ] },
+ {"@id" : 170, "@type" : "ByteArray", "@collection" : "AAA=" },
{"@id" : 173, "@type" : "ShortArray", "@collection" : [ ] },
{"@id" : 176, "@type" : "StringArray", "@collection" : [null ] } ],
"@cas_views" : {
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision.txt Tue Sep 16 18:17:33 2014
@@ -1 +1 @@
-{"@context":{"cas:Sofa":{"@id":"uima.cas.Sofa","@featureRefs":["sofaArray"],"@superTypes":["uima.cas.TOP"]},"test:Token":{"@id":"org.apache.uima.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation","uima.cas.AnnotationBase","uima.cas.TOP"]},"test2:Token":{"@id":"org.apache.uimax.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]}},"@cas_feature_structures":[{"@id":5,"@type":"cas:Sofa","sofaNum":1,"sofaID":"_InitialView"},{"@id":1,"@type":"test:Token","sofa":5,"begin":0,"end":0},{"@id":12,"@type":"test2:Token","sofa":5,"begin":0,"end":0}],"@cas_views":{"5":[1,12]}}
\ No newline at end of file
+{"@context":{"Sofa":{"@id":"uima.cas.Sofa","@featureRefs":["sofaArray"],"@superTypes":["uima.cas.TOP"]},"test:Token":{"@id":"org.apache.uima.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation","uima.cas.AnnotationBase","uima.cas.TOP"]},"test2:Token":{"@id":"org.apache.uimax.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]}},"@cas_feature_structures":[{"@id":5,"@type":"Sofa","sofaNum":1,"sofaID":"_InitialView"},{"@id":1,"@type":"test:Token","sofa":5,"begin":0,"end":0},{"@id":12,"@type":"test2:Token","sofa":5,"begin":0,"end":0}],"@cas_views":{"5":[1,12]}}
\ No newline at end of file
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2.txt Tue Sep 16 18:17:33 2014
@@ -1 +1 @@
-{"@context":{"cas:Sofa":{"@id":"uima.cas.Sofa","@featureRefs":["sofaArray"],"@superTypes":["uima.cas.TOP"]},"test:Token":{"@id":"org.apache.uima.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation","uima.cas.AnnotationBase","uima.cas.TOP"]},"test22:Token":{"@id":"org.apache.uima.test2.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]},"test2:Token":{"@id":"org.apache.uimax.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]}},"@cas_feature_structures":[{"@id":5,"@type":"cas:Sofa","sofaNum":1,"sofaID":"_InitialView"},{"@id":1,"@type":"test:Token","sofa":5,"begin":0,"end":0},{"@id":12,"@type":"test2:Token","sofa":5,"begin":0,"end":0},{"@id":16,"@type":"test22:Token","sofa":5,"begin":0,"end":0}],"@cas_views":{"5":[1,12,16]}}
\ No newline at end of file
+{"@context":{"Sofa":{"@id":"uima.cas.Sofa","@featureRefs":["sofaArray"],"@superTypes":["uima.cas.TOP"]},"test:Token":{"@id":"org.apache.uima.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation","uima.cas.AnnotationBase","uima.cas.TOP"]},"test22:Token":{"@id":"org.apache.uima.test2.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]},"test2:Token":{"@id":"org.apache.uimax.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]}},"@cas_feature_structures":[{"@id":5,"@type":"Sofa","sofaNum":1,"sofaID":"_InitialView"},{"@id":1,"@type":"test:Token","sofa":5,"begin":0,"end":0},{"@id":12,"@type":"test2:Token","sofa":5,"begin":0,"end":0},{"@id":16,"@type":"test22:Token","sofa":5,"begin":0,"end":0}],"@cas_views":{"5":[1,12,16]}}
\ No newline at end of file
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2Omits.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2Omits.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2Omits.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2Omits.txt Tue Sep 16 18:17:33 2014
@@ -1 +1 @@
-{"@context":{"cas:Sofa":{"@id":"uima.cas.Sofa","@featureRefs":["sofaArray"],"@superTypes":["uima.cas.TOP"]},"test:Token":{"@id":"org.apache.uima.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation","uima.cas.AnnotationBase","uima.cas.TOP"]},"test22:Token":{"@id":"org.apache.uima.test2.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]},"test2:Token":{"@id":"org.apache.uimax.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]}},"@cas_feature_structures":[{"@id":5,"@type":"cas:Sofa","sofaNum":1,"sofaID":"_InitialView"},{"@id":1,"@type":"test:Token","sofa":5},{"@id":12,"@type":"test2:Token","sofa":5},{"@id":16,"@type":"test22:Token","sofa":5}],"@cas_views":{"5":[1,12,16]}}
\ No newline at end of file
+{"@context":{"Sofa":{"@id":"uima.cas.Sofa","@featureRefs":["sofaArray"],"@superTypes":["uima.cas.TOP"]},"test:Token":{"@id":"org.apache.uima.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation","uima.cas.AnnotationBase","uima.cas.TOP"]},"test22:Token":{"@id":"org.apache.uima.test2.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]},"test2:Token":{"@id":"org.apache.uimax.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]}},"@cas_feature_structures":[{"@id":5,"@type":"Sofa","sofaNum":1,"sofaID":"_InitialView"},{"@id":1,"@type":"test:Token","sofa":5},{"@id":12,"@type":"test2:Token","sofa":5},{"@id":16,"@type":"test22:Token","sofa":5}],"@cas_views":{"5":[1,12,16]}}
\ No newline at end of file
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2pp.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2pp.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2pp.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2pp.txt Tue Sep 16 18:17:33 2014
@@ -1,5 +1,5 @@
{"@context" : {
- "cas:Sofa" : {
+ "Sofa" : {
"@id" : "uima.cas.Sofa",
"@featureRefs" : ["sofaArray" ],
"@superTypes" : ["uima.cas.TOP" ] },
@@ -16,7 +16,7 @@
"@featureRefs" : ["sofa" ],
"@superTypes" : ["uima.tcas.Annotation" ] } },
"@cas_feature_structures" : [
- {"@id" : 5, "@type" : "cas:Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" },
+ {"@id" : 5, "@type" : "Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" },
{"@id" : 1, "@type" : "test:Token", "sofa" : 5, "begin" : 0, "end" : 0 },
{"@id" : 12, "@type" : "test2:Token", "sofa" : 5, "begin" : 0, "end" : 0 },
{"@id" : 16, "@type" : "test22:Token", "sofa" : 5, "begin" : 0, "end" : 0 } ],
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2ppOmits.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2ppOmits.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2ppOmits.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollision2ppOmits.txt Tue Sep 16 18:17:33 2014
@@ -1,5 +1,5 @@
{"@context" : {
- "cas:Sofa" : {
+ "Sofa" : {
"@id" : "uima.cas.Sofa",
"@featureRefs" : ["sofaArray" ],
"@superTypes" : ["uima.cas.TOP" ] },
@@ -16,7 +16,7 @@
"@featureRefs" : ["sofa" ],
"@superTypes" : ["uima.tcas.Annotation" ] } },
"@cas_feature_structures" : [
- {"@id" : 5, "@type" : "cas:Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" },
+ {"@id" : 5, "@type" : "Sofa", "sofaNum" : 1, "sofaID" : "_InitialView" },
{"@id" : 1, "@type" : "test:Token", "sofa" : 5 },
{"@id" : 12, "@type" : "test2:Token", "sofa" : 5 },
{"@id" : 16, "@type" : "test22:Token", "sofa" : 5 } ],
Modified: uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollisionOmits.txt
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollisionOmits.txt?rev=1625349&r1=1625348&r2=1625349&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollisionOmits.txt (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/CasSerialization/expected/nameSpaceCollisionOmits.txt Tue Sep 16 18:17:33 2014
@@ -1 +1 @@
-{"@context":{"cas:Sofa":{"@id":"uima.cas.Sofa","@featureRefs":["sofaArray"],"@superTypes":["uima.cas.TOP"]},"test:Token":{"@id":"org.apache.uima.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation","uima.cas.AnnotationBase","uima.cas.TOP"]},"test2:Token":{"@id":"org.apache.uimax.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]}},"@cas_feature_structures":[{"@id":5,"@type":"cas:Sofa","sofaNum":1,"sofaID":"_InitialView"},{"@id":1,"@type":"test:Token","sofa":5},{"@id":12,"@type":"test2:Token","sofa":5}],"@cas_views":{"5":[1,12]}}
\ No newline at end of file
+{"@context":{"Sofa":{"@id":"uima.cas.Sofa","@featureRefs":["sofaArray"],"@superTypes":["uima.cas.TOP"]},"test:Token":{"@id":"org.apache.uima.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation","uima.cas.AnnotationBase","uima.cas.TOP"]},"test2:Token":{"@id":"org.apache.uimax.test.Token","@featureRefs":["sofa"],"@superTypes":["uima.tcas.Annotation"]}},"@cas_feature_structures":[{"@id":5,"@type":"Sofa","sofaNum":1,"sofaID":"_InitialView"},{"@id":1,"@type":"test:Token","sofa":5},{"@id":12,"@type":"test2:Token","sofa":5}],"@cas_views":{"5":[1,12]}}
\ No newline at end of file