if (feature instanceof EAttribute) {
EDataType dataType = (EDataType) feature.getEType();
if (feature.isMany()) {
if (nextToken == JsonToken.START_ARRAY) {
EList values = new BasicEList();
while (jp.nextToken() != JsonToken.END_ARRAY) {
values.add(parseValueForDataType(jp, dataType));
}
result.eSet(feature, values);
}
}
else {
result.eSet(feature, parseValueForDataType(jp, dataType));
}
}
else if (feature instanceof EReference) {
EReference eRef = (EReference) feature;
if (!eRef.isContainment()) {
continue; // Non-containment references are currently ignored
}
if (feature.isMany() && nextToken == JsonToken.START_ARRAY) {
EList values = new BasicEList();
while (jp.nextToken() != JsonToken.END_ARRAY) {
values.add(from(jp, eRef.getEReferenceType()));
}
result.eSet(feature, values);
}
else {
result.eSet(feature, from(jp, eRef.getEReferenceType()));