private Map<String, Object> setProperties( NamedTypeDeclarationContext source, NamedDataSchema target) throws ParseException { Map<String, Object> properties = new HashMap<String, Object>(); properties.putAll(target.getProperties()); if (source.doc != null) { target.setDoc(source.doc.value); } for (PropDeclarationContext prop: source.props) { addPropertiesAtPath(properties, prop); } target.setProperties(properties); return properties; }
private Map<String, Object> setProperties( NamedTypeDeclarationContext source, NamedDataSchema target) throws ParseException { Map<String, Object> properties = new HashMap<>(); properties.putAll(target.getProperties()); if (source.doc != null) { target.setDoc(source.doc.value); } for (PropDeclarationContext prop: source.props) { addPropertiesAtPath(properties, prop); } target.setProperties(properties); return properties; }
if (doc != null) namedSchema.setDoc(doc);