protected final void readComplex(Element element, ComplexType ctype, Map map, boolean inlineBlobs) throws IOException { Iterator<Map.Entry> it = map.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = it.next(); readProperty(element, ctype.getNamespace(), ctype.getField(entry.getKey().toString()), entry.getValue(), inlineBlobs); } }
@Override public String getQualifiedName(ComplexType input) { return context.getService().encodeName(input.getNamespace().prefix) + ":" + getName(input); }
@Override public Schema createSchema(ComplexType input) { Schema schema = Schema.createRecord(getName(input), null, input.getNamespace().prefix, false); List<Field> fields = new ArrayList<>(input.getFields().size()); for (org.nuxeo.ecm.core.schema.types.Field f : context.sort(input.getFields())) { String fieldName = context.getService().encodeName(f.getName().getLocalName()); Schema fieldSchema = context.createSchema(f.getType()); if (f.isNillable()) { fieldSchema = nullable(fieldSchema); } fields.add(new Field(fieldName, fieldSchema, null, (Object) null)); } schema.setFields(fields); return schema; }