String.format( "Unable to wrap attribute in class '%s'. '%s' doesn't have required property '%s'.", clazz.getName(), targetAttribute.getName(), xsdName));
if (simpleValue != null) { encodeSimpleAttribute( complexAttribute.getName().getLocalPart(), simpleValue, attributes); } else {
String.format( "Unable to wrap attribute in class '%s'. '%s' doesn't have required property '%s'.", clazz.getName(), targetAttribute.getName(), xsdName));
/** Encode a complex attribute as a JSON object. */ private void encodeComplexAttribute( ComplexAttribute attribute, Map<NameImpl, String> attributes) { // get the attribute name and start a JSON object String name = attribute.getName().getLocalPart(); jsonWriter.key(name); if (attributes != null && !attributes.isEmpty()) { // we have some attributes to encode jsonWriter.array(); } // let's see if we have actually some properties to encode if (attribute.getProperties() != null && !attribute.getProperties().isEmpty()) { jsonWriter.object(); // encode the object properties, since this is not a top feature or a // chained feature we don't need to explicitly handle the geometry attribute encodeProperties(null, attribute.getType(), attribute.getProperties()); // end the attribute JSON object jsonWriter.endObject(); } if (attributes != null && !attributes.isEmpty()) { // encode the attributes list encodeAttributes(attributes); jsonWriter.endArray(); } }