/** * Writes a set of schema properties to .pdl. * @param properties provides the properties to write. */ private boolean writeProperties(Map<String, Object> properties) throws IOException { writeProperties(Collections.emptyList(), properties); return !properties.isEmpty(); }
writeProperties(pathParts, (DataMap) value);
private void writeFixed(FixedDataSchema schema) throws IOException { writeDoc(schema.getDoc()); writeProperties(schema.getProperties()); write("fixed "); write(toTypeIdentifier(schema)); write(" "); write(String.valueOf(schema.getSize())); }
private void writeTyperef(TyperefDataSchema schema) throws IOException { writeDoc(schema.getDoc()); writeProperties(schema.getProperties()); write("typeref "); write(toTypeIdentifier(schema)); write(" = "); DataSchema ref = schema.getRef(); writeReferenceOrInline(ref, schema.isRefDeclaredInline()); }
DataMap propertiesMap = new DataMap(coercePropertyToDataMapOrFail(schema, "symbolProperties", properties.remove("symbolProperties"))); DataMap deprecatedMap = coercePropertyToDataMapOrFail(schema, "deprecatedSymbols", properties.remove("deprecatedSymbols")); boolean hasProperties = writeProperties(properties); if (hasDoc || hasProperties) { indent(); writeProperties(symbolProperties); writeLine(symbol);
private void writeRecord(RecordDataSchema schema) throws IOException boolean hasProperties = writeProperties(schema.getProperties()); if (hasDoc || hasProperties) { indent(); writeProperties(field.getProperties()); if (field.getOrder() != null && !field.getOrder().equals(RecordDataSchema.Field.Order.ASCENDING))